diff options
author | David Wrighton <davidwr@microsoft.com> | 2015-12-16 00:30:33 +0300 |
---|---|---|
committer | David Wrighton <davidwr@microsoft.com> | 2015-12-16 00:30:33 +0300 |
commit | 2b68633ecb3ef781ad919a2f457afa43597d0ce6 (patch) | |
tree | b52814aef29b737b2602e066e70d29b4eff141b2 /src/Common | |
parent | a55a1d6136bccca166efc4f7a10bba7e49438e03 (diff) | |
parent | bdd1cc1f511642071a1f2f5e2069a908b7685233 (diff) |
Merge pull request #533 from MichalStrehovsky/assemblydesc
Introduce IAssemblyDesc
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/src/TypeSystem/Common/IAssemblyDesc.cs | 18 | ||||
-rw-r--r-- | src/Common/src/TypeSystem/Ecma/EcmaModule.cs | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/Common/src/TypeSystem/Common/IAssemblyDesc.cs b/src/Common/src/TypeSystem/Common/IAssemblyDesc.cs new file mode 100644 index 000000000..545697628 --- /dev/null +++ b/src/Common/src/TypeSystem/Common/IAssemblyDesc.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Reflection; + +namespace Internal.TypeSystem +{ + /// <summary> + /// Optional interface a <see cref="ModuleDesc"/> should implement if it represents an assembly. + /// </summary> + public interface IAssemblyDesc + { + /// <summary> + /// Gets the assembly name. + /// </summary> + AssemblyName GetName(); + } +} diff --git a/src/Common/src/TypeSystem/Ecma/EcmaModule.cs b/src/Common/src/TypeSystem/Ecma/EcmaModule.cs index 021d48a30..02a808720 100644 --- a/src/Common/src/TypeSystem/Ecma/EcmaModule.cs +++ b/src/Common/src/TypeSystem/Ecma/EcmaModule.cs @@ -12,7 +12,7 @@ using Internal.TypeSystem; namespace Internal.TypeSystem.Ecma { - public sealed class EcmaModule : ModuleDesc + public sealed class EcmaModule : ModuleDesc, IAssemblyDesc { private PEReader _peReader; private MetadataReader _metadataReader; |