예제 #1
0
 public FieldDefinition GetFieldDefinition(icFieldDefinition item)
 {
     return(TryGetOrAdd(_fieldcache, item, fdef =>
     {
         var tdef = GetTypeDefinition(item.DeclaringType);
         return tdef == null ? null : ILSpyHelper.FindMatchingField(tdef, fdef);
     }));
 }
예제 #2
0
 public EventDefinition GetEventDefinition(icEventDefinition item)
 {
     return(TryGetOrAdd(_eventcache, item, edef =>
     {
         var tdef = GetTypeDefinition(item.DeclaringType);
         return tdef == null ? null : ILSpyHelper.FindMatchingEvent(tdef, edef);
     }));
 }
예제 #3
0
 public PropertyDefinition GetPropertyDefinition(icPropertyDefinition item)
 {
     return(TryGetOrAdd(_propertycache, item, pdef =>
     {
         var tdef = GetTypeDefinition(item.DeclaringType);
         return tdef == null ? null : ILSpyHelper.FindMatchingProperty(tdef, pdef);
     }));
 }
예제 #4
0
 public MethodDefinition GetMethodDefinition(icMethodDefinition item)
 {
     return(TryGetOrAdd(_methodcache, item, mdef =>
     {
         var tdef = GetTypeDefinition(item.DeclaringType);
         return tdef == null ? null : ILSpyHelper.FindMatchingMethod(tdef, mdef);
     }));
 }
예제 #5
0
 public Resource GetResource(icResource item)
 {
     return(TryGetOrAdd(_resourcecache, item, res => ILSpyHelper.FindMatchingResource(AssemblyDefinition, res)));
 }
예제 #6
0
 public TypeDefinition GetTypeDefinition(icTypeDefinition item)
 {
     return(TryGetOrAdd(_typecache, item, tdef => ILSpyHelper.FindMatchingType(AssemblyDefinition, tdef)));
 }
예제 #7
0
 public AssemblyNameReference GetAssemblyNameReference(icAssemblyNameReference item)
 {
     return(TryGetOrAdd(_assemblynamereferencecache, item, anref => ILSpyHelper.FindMatchingAssemblyReference(AssemblyDefinition, anref)));
 }