Created
January 19, 2011 02:11
-
-
Save mgroves/785559 to your computer and use it in GitHub Desktop.
lazy load 5
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 override bool CompileTimeValidate(PostSharp.Reflection.LocationInfo locationInfo) | |
| { | |
| if(!locationInfo.LocationType.IsInterface) | |
| { | |
| Message.Write(SeverityType.Error, "001", "LazyLoad can only be used on Interfaces!"); | |
| return false; | |
| } | |
| _type = DependencyMap.GetConcreteType(locationInfo.LocationType); | |
| if(_type == null) | |
| { | |
| Message.Write(SeverityType.Error, "002", "A concrete type was not found"); | |
| return false; | |
| } | |
| return true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment