System.Reflection.CustomAttribute.GetCustomAttributes C# (CSharp) Method

GetCustomAttributes() static private method

static private GetCustomAttributes ( Assembly assembly, RuntimeType caType ) : Object[]
assembly Assembly
caType RuntimeType
return Object[]
        internal static Object[] GetCustomAttributes(Assembly assembly, RuntimeType caType) 
        {
            int pcaCount = 0;
            Attribute[] pca = PseudoCustomAttribute.GetCustomAttributes(assembly, caType, out pcaCount);
            object[] attributes = GetCustomAttributes(assembly.ManifestModule, assembly.AssemblyHandle.GetToken(), pcaCount, caType);
            if (pcaCount > 0) Array.Copy(pca, 0, attributes, attributes.Length - pcaCount, pcaCount);
            return attributes;
        }

Same methods

CustomAttribute::GetCustomAttributes ( Module module, RuntimeType caType ) : Object[]
CustomAttribute::GetCustomAttributes ( ParameterInfo parameter, RuntimeType caType ) : Object[]
CustomAttribute::GetCustomAttributes ( RuntimeConstructorInfo ctor, RuntimeType caType ) : Object[]
CustomAttribute::GetCustomAttributes ( RuntimeEventInfo e, RuntimeType caType ) : Object[]
CustomAttribute::GetCustomAttributes ( RuntimeFieldInfo field, RuntimeType caType ) : Object[]
CustomAttribute::GetCustomAttributes ( RuntimeMethodInfo method, RuntimeType caType, bool inherit ) : Object[]
CustomAttribute::GetCustomAttributes ( RuntimePropertyInfo property, RuntimeType caType ) : Object[]
CustomAttribute::GetCustomAttributes ( RuntimeType type, RuntimeType caType, bool inherit ) : Object[]
CustomAttribute::GetCustomAttributes ( Module decoratedModule, int decoratedMetadataToken, int pcaCount, RuntimeType attributeFilterType ) : object[]
CustomAttribute::GetCustomAttributes ( Module decoratedModule, int decoratedMetadataToken, int pcaCount, RuntimeType attributeFilterType, bool mustBeInheritable, IList derivedAttributes ) : object[]

Usage Example

Exemplo n.º 1
0
 public override Object[] GetCustomAttributes(bool inherit)
 {
     return(CustomAttribute.GetCustomAttributes(this, typeof(object) as RuntimeType));
 }
All Usage Examples Of System.Reflection.CustomAttribute::GetCustomAttributes