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

◆ GetCustomAttributeRecords()

static CustomAttributeRecord[] System.Reflection.RuntimeCustomAttributeData.GetCustomAttributeRecords ( RuntimeModule module,
int targetToken )
inlinestaticpackage

Definition at line 289 of file RuntimeCustomAttributeData.cs.

290 {
291 MetadataImport metadataImport = module.MetadataImport;
292 metadataImport.EnumCustomAttributes(targetToken, out var result);
293 if (result.Length == 0)
294 {
295 return Array.Empty<CustomAttributeRecord>();
296 }
297 CustomAttributeRecord[] array = new CustomAttributeRecord[result.Length];
298 for (int i = 0; i < array.Length; i++)
299 {
300 metadataImport.GetCustomAttributeProps(result[i], out array[i].tkCtor.Value, out array[i].blob);
301 }
302 return array;
303 }

References System.array.

Referenced by System.Reflection.CustomAttribute.AddCustomAttributes(), System.Reflection.CustomAttribute.GetAttributeUsage(), and System.Reflection.RuntimeCustomAttributeData.GetCustomAttributes().