Created
June 18, 2012 12:37
-
-
Save mkrueger/2948184 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public IList<ITypeDefinition> NestedTypes { | |
get { | |
IList<ITypeDefinition> result = LazyInit.VolatileRead(ref this.nestedTypes); | |
if (result != null) { | |
return result; | |
} else { | |
result = ( | |
from part in parts | |
from nestedTypeRef in part.NestedTypes | |
group nestedTypeRef by nestedTypeRef.Name into g | |
select new DefaultResolvedTypeDefinition(new SimpleTypeResolveContext(this), g.ToArray()) | |
).ToList<ITypeDefinition>().AsReadOnly(); | |
return LazyInit.GetOrSet(ref this.nestedTypes, result); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment