Closed IsThatUniqueEnough closed 8 months ago
Thanks, good catch.
I'd like to normalize this by default but I don't want to break backwards compatibility. I'll probably add it as an optional feature that is disabled by default for the current version (v6), and then next version (v7) will have a breaking change to enable normalization by default.
I've added a normalize
parameter to AddUserName. Default is false for now, but will consider changing it to true in a future major version release. Thanks again for this issue report.
Thanks, Yesterdays changes all work like a charm.
When changing the default please consider that usernames on systems other than Windows can be case sensitive. If they aren't I'm not sure whether Environment.UserName
is normalized or as typed.
The least surprising behaviour would probably be to default to normalization on Windows only.
AddUserName()
creates a component that returns the value ofEnvironment.UserName
. Usernames on windows are case-insensitive andEnvironment.UserName
returns the name exactly as entered when the user logged in. So for a user named "sam" the component could e.g. return "sam", "Sam", "sAm",... depending on how the user typed the name while logging in.For ID'ing purposes it would be desireable to (optionally?) normalize the case of the value to e.g. all lower case.