public static bool Implements(this TypeDefinition typeDefinition, System.Type type)
        {
            if (type.IsInterface == false) {
                throw new InvalidOperationException("The <type> argument (" + type.Name + ") must be an Interface type.");
            }

            var referenceFinder = new ReferenceFinder(typeDefinition.Module);
            var baseTypeDefinition = referenceFinder.GetTypeReference(type);

            return typeDefinition.Implements(baseTypeDefinition);
        }
Ejemplo n.º 2
0
 public MethodDecorator(ModuleDefinition moduleDefinition)
 {
     this._referenceFinder = new ReferenceFinder(moduleDefinition);
 }
Ejemplo n.º 3
0
 public MethodDecorator(ModuleDefinition moduleDefinition)
 {
     this._referenceFinder = new ReferenceFinder(moduleDefinition);
 }
Ejemplo n.º 4
0
 public MethodDecorator(ModuleDefinition moduleDefinition, XElement config)
 {
     ReadXmlConfig(config);
     this._referenceFinder = new ReferenceFinder(moduleDefinition);
 }