diff options
author | Michal Strehovský <michals@microsoft.com> | 2015-12-15 06:06:35 +0300 |
---|---|---|
committer | Michal Strehovský <michals@microsoft.com> | 2015-12-15 06:06:35 +0300 |
commit | bdd1cc1f511642071a1f2f5e2069a908b7685233 (patch) | |
tree | b99c6c785eab92e12fb84c78f939a5e47865f440 /src/Common | |
parent | 964952dfbda231ab28e582ce4638488729e94e57 (diff) |
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; |