Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetCustomAttributes() [6/10]

static object[] System.Reflection.CustomAttribute.GetCustomAttributes ( RuntimeModule decoratedModule,
int decoratedMetadataToken,
int pcaCount,
RuntimeType attributeFilterType )
inlinestaticprivate

Definition at line 286 of file CustomAttribute.cs.

287 {
288 RuntimeType.ListBuilder<object> attributes = default(RuntimeType.ListBuilder<object>);
289 AddCustomAttributes(ref attributes, decoratedModule, decoratedMetadataToken, attributeFilterType, mustBeInheritable: false, default(RuntimeType.ListBuilder<object>));
290 RuntimeType elementType = (((object)attributeFilterType == null || attributeFilterType.IsValueType || attributeFilterType.ContainsGenericParameters) ? ((RuntimeType)typeof(object)) : attributeFilterType);
291 object[] array = CreateAttributeArrayHelper(elementType, attributes.Count + pcaCount);
292 for (int i = 0; i < attributes.Count; i++)
293 {
294 array[i] = attributes[i];
295 }
296 return array;
297 }
static object[] CreateAttributeArrayHelper(RuntimeType elementType, int elementCount)
static unsafe void AddCustomAttributes(ref RuntimeType.ListBuilder< object > attributes, RuntimeModule decoratedModule, int decoratedMetadataToken, RuntimeType attributeFilterType, bool mustBeInheritable, RuntimeType.ListBuilder< object > derivedAttributes)

References System.Reflection.CustomAttribute.AddCustomAttributes(), System.array, System.RuntimeType.ContainsGenericParameters, System.Reflection.CustomAttribute.CreateAttributeArrayHelper(), System.elementType, and System.Type.IsValueType.