Created
June 4, 2012 16:35
-
-
Save anonymous/2869440 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <Name>Avoid naming types and namespaces with the same identifier</Name> | |
// Not only this can provoke compiler resolution collision, | |
// but also, this makes code less maintainable because | |
// concepts are not concisely identified. | |
warnif count > 0 | |
let hashsetShortNames = Namespaces.Where(n => n.Name.Length > 0).Select(n => n.SimpleName).ToHashSet() | |
from t in JustMyCode.Types | |
where hashsetShortNames.Contains(t.Name) | |
select new { t, namespaces = Namespaces.Where(n => n.SimpleName == t.Name) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment