示例#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)));
 }