Mono.Cecil.WindowsRuntimeProjections.HasAttribute C# (CSharp) Method

HasAttribute() static private method

static private HasAttribute ( Mono.Cecil.TypeDefinition type, string @namespace, string name ) : bool
type Mono.Cecil.TypeDefinition
@namespace string
name string
return 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;
        }