grumpydev / TinyIoC

An easy to use, hassle free, Inversion of Control Container for small projects, libraries and beginners alike.
MIT License
830 stars 235 forks source link

Using the wrong string comparison #13

Open davkean opened 13 years ago

davkean commented 13 years ago

Attempting to compile this under Portable Library, I noticed that you are using the wrong string comparison - you're using InvariantCulture instead of Ordinal. Common mistake - hence why we removed it from Portable (and will be removed from .NET for Metro apps if it hasn't already been).

Think of InvariantCulture as en-US that basically doesn't change from .NET version to version, whereas ordinal is a byte-to-byte comparison. An example of two methods names that will be considered equal using invariant are 'encyclopaedia' and 'encyclopædia' despite the runtime considering them as different.

Feel free to ping offline if you would like more information.

David Kean david DOT kean AT microsoft DOT com

grumpydev commented 13 years ago

You're right, thanks, this is a mistake I noticed when I started the WinRT port. That port is in another branch if you're interested.

oliverw commented 12 years ago

What's the state of the WinRT port? It seems to compile after a couple tweaks (mostly dealing with IsGenericType errors) but would you consider it usable?

grumpydev commented 12 years ago

There's a winrt branch that seems to work, but hasn't been extensively tested.