Exemplo n.º 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);
     }));
 }
Exemplo n.º 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);
     }));
 }
Exemplo n.º 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);
     }));
 }
Exemplo n.º 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);
     }));
 }
Exemplo n.º 5
0
 public Resource GetResource(icResource item)
 {
     return(TryGetOrAdd(_resourcecache, item, res => ILSpyHelper.FindMatchingResource(AssemblyDefinition, res)));
 }
Exemplo n.º 6
0
 public TypeDefinition GetTypeDefinition(icTypeDefinition item)
 {
     return(TryGetOrAdd(_typecache, item, tdef => ILSpyHelper.FindMatchingType(AssemblyDefinition, tdef)));
 }
Exemplo n.º 7
0
 public AssemblyNameReference GetAssemblyNameReference(icAssemblyNameReference item)
 {
     return(TryGetOrAdd(_assemblynamereferencecache, item, anref => ILSpyHelper.FindMatchingAssemblyReference(AssemblyDefinition, anref)));
 }