|
4 | 4 |
|
5 | 5 | using Microsoft.CodeAnalysis.Scripting.Hosting; |
6 | 6 |
|
7 | | -namespace Microsoft.CodeAnalysis.Interactive; |
8 | | - |
9 | | -internal partial class InteractiveHost |
| 7 | +namespace Microsoft.CodeAnalysis.Interactive |
10 | 8 | { |
11 | | - /// <summary> |
12 | | - /// Specialize <see cref="PortableExecutableReference"/> with path being the original path of the copy. |
13 | | - /// Logically this reference represents that file, the fact that we load the image from a copy is an implementation detail. |
14 | | - /// </summary> |
15 | | - private sealed class ShadowCopyReference : PortableExecutableReference |
| 9 | + internal partial class InteractiveHost |
16 | 10 | { |
17 | | - private readonly MetadataShadowCopyProvider _provider; |
18 | | - |
19 | | - public ShadowCopyReference(MetadataShadowCopyProvider provider, string originalPath, MetadataReferenceProperties properties) |
20 | | - : base(properties, originalPath) |
| 11 | + /// <summary> |
| 12 | + /// Specialize <see cref="PortableExecutableReference"/> with path being the original path of the copy. |
| 13 | + /// Logically this reference represents that file, the fact that we load the image from a copy is an implementation detail. |
| 14 | + /// </summary> |
| 15 | + private sealed class ShadowCopyReference : PortableExecutableReference |
21 | 16 | { |
22 | | - _provider = provider; |
23 | | - } |
| 17 | + private readonly MetadataShadowCopyProvider _provider; |
24 | 18 |
|
25 | | - protected override DocumentationProvider CreateDocumentationProvider() |
26 | | - { |
27 | | - // TODO (tomat): use file next to the dll (or shadow copy) |
28 | | - return DocumentationProvider.Default; |
29 | | - } |
| 19 | + public ShadowCopyReference(MetadataShadowCopyProvider provider, string originalPath, MetadataReferenceProperties properties) |
| 20 | + : base(properties, originalPath) |
| 21 | + { |
| 22 | + _provider = provider; |
| 23 | + } |
30 | 24 |
|
31 | | - protected override Metadata GetMetadataImpl() |
32 | | - { |
33 | | - return _provider.GetMetadata(FilePath, Properties.Kind); |
34 | | - } |
| 25 | + protected override DocumentationProvider CreateDocumentationProvider() |
| 26 | + { |
| 27 | + // TODO (tomat): use file next to the dll (or shadow copy) |
| 28 | + return DocumentationProvider.Default; |
| 29 | + } |
35 | 30 |
|
36 | | - protected override PortableExecutableReference WithPropertiesImpl(MetadataReferenceProperties properties) |
37 | | - { |
38 | | - return new ShadowCopyReference(_provider, FilePath!, properties); |
| 31 | + protected override Metadata GetMetadataImpl() |
| 32 | + { |
| 33 | + return _provider.GetMetadata(FilePath, Properties.Kind); |
| 34 | + } |
| 35 | + |
| 36 | + protected override PortableExecutableReference WithPropertiesImpl(MetadataReferenceProperties properties) |
| 37 | + { |
| 38 | + return new ShadowCopyReference(_provider, FilePath!, properties); |
| 39 | + } |
39 | 40 | } |
40 | 41 | } |
41 | 42 | } |
0 commit comments