| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System.Diagnostics; |
| | | 5 | | |
| | | 6 | | namespace System.Reflection.Metadata |
| | | 7 | | { |
| | | 8 | | public readonly partial struct AssemblyDefinition |
| | | 9 | | { |
| | | 10 | | private readonly MetadataReader _reader; |
| | | 11 | | |
| | | 12 | | internal AssemblyDefinition(MetadataReader reader) |
| | 0 | 13 | | { |
| | 0 | 14 | | Debug.Assert(reader != null); |
| | 0 | 15 | | _reader = reader; |
| | 0 | 16 | | } |
| | | 17 | | |
| | | 18 | | public AssemblyHashAlgorithm HashAlgorithm |
| | | 19 | | { |
| | | 20 | | get |
| | 0 | 21 | | { |
| | 0 | 22 | | return _reader.AssemblyTable.GetHashAlgorithm(); |
| | 0 | 23 | | } |
| | | 24 | | } |
| | | 25 | | |
| | | 26 | | public Version Version |
| | | 27 | | { |
| | | 28 | | get |
| | 0 | 29 | | { |
| | 0 | 30 | | return _reader.AssemblyTable.GetVersion(); |
| | 0 | 31 | | } |
| | | 32 | | } |
| | | 33 | | |
| | | 34 | | public AssemblyFlags Flags |
| | | 35 | | { |
| | | 36 | | get |
| | 0 | 37 | | { |
| | 0 | 38 | | return _reader.AssemblyTable.GetFlags(); |
| | 0 | 39 | | } |
| | | 40 | | } |
| | | 41 | | |
| | | 42 | | public StringHandle Name |
| | | 43 | | { |
| | | 44 | | get |
| | 0 | 45 | | { |
| | 0 | 46 | | return _reader.AssemblyTable.GetName(); |
| | 0 | 47 | | } |
| | | 48 | | } |
| | | 49 | | |
| | | 50 | | public StringHandle Culture |
| | | 51 | | { |
| | | 52 | | get |
| | 0 | 53 | | { |
| | 0 | 54 | | return _reader.AssemblyTable.GetCulture(); |
| | 0 | 55 | | } |
| | | 56 | | } |
| | | 57 | | |
| | | 58 | | public BlobHandle PublicKey |
| | | 59 | | { |
| | | 60 | | get |
| | 0 | 61 | | { |
| | 0 | 62 | | return _reader.AssemblyTable.GetPublicKey(); |
| | 0 | 63 | | } |
| | | 64 | | } |
| | | 65 | | |
| | | 66 | | public CustomAttributeHandleCollection GetCustomAttributes() |
| | 0 | 67 | | { |
| | 0 | 68 | | return new CustomAttributeHandleCollection(_reader, EntityHandle.AssemblyDefinition); |
| | 0 | 69 | | } |
| | | 70 | | |
| | | 71 | | public DeclarativeSecurityAttributeHandleCollection GetDeclarativeSecurityAttributes() |
| | 0 | 72 | | { |
| | 0 | 73 | | return new DeclarativeSecurityAttributeHandleCollection(_reader, EntityHandle.AssemblyDefinition); |
| | 0 | 74 | | } |
| | | 75 | | } |
| | | 76 | | } |
| | | 77 | | |