Mono.Cecil.WindowsRuntimeProjections.HasAttribute C# (CSharp) Метод

HasAttribute() статический приватный Метод

static private HasAttribute ( Mono.Cecil.TypeDefinition type, string @namespace, string name ) : bool
type Mono.Cecil.TypeDefinition
@namespace string
name string
Результат bool
        static bool HasAttribute(TypeDefinition type, string @namespace, string name)
        {
            foreach (var attribute in type.CustomAttributes) {
                var attribute_type = attribute.AttributeType;
                if (attribute_type.Name == name && attribute_type.Namespace == @namespace)
                    return true;
            }
            return false;
        }