diff options
Diffstat (limited to 'Mono.Cecil/AssemblyReader.cs')
-rw-r--r-- | Mono.Cecil/AssemblyReader.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Mono.Cecil/AssemblyReader.cs b/Mono.Cecil/AssemblyReader.cs index da9d5bc..5576ee0 100644 --- a/Mono.Cecil/AssemblyReader.cs +++ b/Mono.Cecil/AssemblyReader.cs @@ -2558,6 +2558,17 @@ namespace Mono.Cecil { return (int) size; } + public IEnumerable<CustomAttribute> GetCustomAttributes () + { + InitializeTypeDefinitions (); + + var length = image.TableHeap [Table.CustomAttribute].Length; + var custom_attributes = new Collection<CustomAttribute> ((int) length); + ReadCustomAttributeRange (new Range (1, length), custom_attributes); + + return custom_attributes; + } + public byte [] ReadCustomAttributeBlob (uint signature) { return ReadBlob (signature); |