2 types derived from Metadata
Microsoft.CodeAnalysis (2)
MetadataReference\AssemblyMetadata.cs (1)
21public sealed class AssemblyMetadata : Metadata
MetadataReference\ModuleMetadata.cs (1)
21public sealed partial class ModuleMetadata : Metadata
102 references to Metadata
Microsoft.CodeAnalysis (36)
MetadataReference\AssemblyMetadata.cs (4)
197/// <exception cref="ArgumentException"><paramref name="modules"/> is empty or contains a module that doesn't own its image (was created via <see cref="Metadata.Copy"/>).</exception> 229/// <exception cref="ArgumentException"><paramref name="modules"/> is empty or contains a module that doesn't own its image (was created via <see cref="Metadata.Copy"/>).</exception> 242/// <exception cref="ArgumentException"><paramref name="modules"/> is empty or contains a module that doesn't own its image (was created via <see cref="Metadata.Copy"/>).</exception> 268protected override Metadata CommonCopy()
MetadataReference\Metadata.cs (2)
55protected abstract Metadata CommonCopy(); 60public Metadata Copy()
MetadataReference\MetadataImageReference.cs (3)
19private readonly Metadata _metadata; 21internal MetadataImageReference(Metadata metadata, MetadataReferenceProperties properties, DocumentationProvider? documentation, string? filePath, string? display) 28protected override Metadata GetMetadataImpl()
MetadataReference\MetadataReference.cs (7)
104/// Reusing <see cref="Metadata"/> object to create multiple references allows for sharing data across these references. 125Metadata metadata = properties.Kind switch 146/// Reusing <see cref="Metadata"/> object to create multiple references allows for sharing data across these references. 163Metadata metadata = properties.Kind switch 188/// Reusing <see cref="Metadata"/> object to create multiple references allows for sharing data across these references. 206Metadata metadata = properties.Kind switch 230/// Reusing <see cref="Metadata"/> object allows for sharing data across these references.
MetadataReference\ModuleMetadata.cs (2)
82/// cref="Metadata.Copy"/> will not call this when they are disposed.</param> 287protected override Metadata CommonCopy()
MetadataReference\PortableExecutableReference.cs (10)
144/// <see cref="Metadata"/> objects may cache information decoded from the PE image. 145/// Reusing <see cref="Metadata"/> instances across metadata references will result in better performance. 147/// The calling <see cref="Compilation"/> doesn't take ownership of the <see cref="Metadata"/> objects returned by this method. 149/// The <see cref="Metadata"/> object is kept alive by the <see cref="Compilation"/> that called <see cref="GetMetadataNoCopy"/> 154protected abstract Metadata GetMetadataImpl(); 156internal Metadata GetMetadataNoCopy() 162/// Returns a copy of the <see cref="Metadata"/> object this <see cref="PortableExecutableReference"/> 168public Metadata GetMetadata() 174/// Returns the <see cref="MetadataId"/> for this reference's <see cref="Metadata"/>. 175/// This will be equivalent to calling <see cref="GetMetadata()"/>.<see cref="Metadata.Id"/>,
ReferenceManager\CommonReferenceManager.Resolution.cs (8)
321Metadata? metadata = GetMetadata(peReference, MessageProvider, location, diagnostics); 475private Metadata? GetMetadata(PortableExecutableReference peReference, CommonMessageProvider messageProvider, Location location, DiagnosticBag diagnostics) 477Metadata? existingMetadata; 487Metadata? newMetadata; 526private bool TryGetObservedMetadata(PortableExecutableReference peReference, DiagnosticBag diagnostics, out Metadata? metadata) 530Debug.Assert(existing is Metadata || existing is Diagnostic); 532metadata = existing as Metadata; 547var metadata = GetMetadata(peReference, MessageProvider, Location.None, diagnostics);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Compilation\CompilationAPITests.cs (3)
2171private readonly IEnumerator<Metadata> _metadataSequence; 2174public EvolvingTestReference(IEnumerable<Metadata> metadataSequence) 2185protected override Metadata GetMetadataImpl()
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
LanguageServices\FSharpVisualStudioWorkspaceExtensions.cs (1)
15public static Metadata GetMetadata(this VisualStudioWorkspace workspace, string fullPath, DateTime snapshotTimestamp)
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.ShadowCopyReference.cs (1)
31protected override Metadata GetMetadataImpl()
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\MetadataService.cs (1)
61protected override Metadata GetMetadataImpl()
Microsoft.CodeAnalysis.Scripting (14)
Hosting\AssemblyLoader\MetadataShadowCopy.cs (2)
30public Metadata Metadata { get; } 32internal MetadataShadowCopy(FileShadowCopy primaryModule, FileShadowCopy documentationFileOpt, Metadata metadataCopy)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (12)
38public readonly Metadata Private; 40public CacheEntry(TPublic @public, Metadata @private) 56private readonly Dictionary<FileKey, CacheEntry<Metadata>> _noShadowCopyCache = new Dictionary<FileKey, CacheEntry<Metadata>>(); 230public Metadata GetMetadata(string fullPath, MetadataImageKind kind) 241CacheEntry<Metadata> existing; 248Metadata newMetadata; 263CacheEntry<Metadata> existing; 270Metadata publicMetadata = newMetadata.Copy(); 271_noShadowCopyCache.Add(key, new CacheEntry<Metadata>(publicMetadata, newMetadata)); 417Metadata privateMetadata; 427var publicMetadata = privateMetadata.Copy();
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
MetadataShadowCopyProviderTests.cs (1)
203var md1 = _provider.GetMetadata(dll.Path, MetadataImageKind.Assembly);
Microsoft.CodeAnalysis.Test.Utilities (8)
CommonTestBase.cs (1)
154var emittedMetadata = verifier.GetMetadata();
Compilation\IRuntimeEnvironment.cs (2)
85private static IEnumerable<ModuleMetadata> EnumerateModules(Metadata metadata) 104var metadata = peRef.GetMetadataNoCopy();
CompilationVerifier.cs (1)
59internal Metadata GetMetadata()
Mocks\TestMetadataReference.cs (4)
16private readonly Metadata _metadata; 19public TestMetadataReference(Metadata metadata = null, string fullPath = null, string display = null) 39protected override Metadata GetMetadataImpl() 85protected override Metadata GetMetadataImpl()
Microsoft.CodeAnalysis.UnitTests (6)
MetadataReferences\AssemblyMetadataTests.cs (2)
102var copy1 = a.Copy(); 112var copy2 = copy1.Copy();
MetadataReferences\MetadataReferenceTests.cs (2)
477protected override Metadata GetMetadataImpl() 505protected override Metadata GetMetadataImpl()
MetadataReferences\ModuleMetadataTests.cs (2)
142var copy1 = m.Copy(); 143var copy2 = copy1.Copy();
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Compilation\CompilationAPITests.vb (3)
2420Private ReadOnly _metadataSequence As IEnumerator(Of Metadata) 2424Public Sub New(metadataSequence As IEnumerable(Of Metadata)) 2433Protected Overrides Function GetMetadataImpl() As Metadata
Compilation\ReferenceManagerTests.vb (1)
1618Dim mca1 As Metadata = refa.GetMetadataNoCopy()
Microsoft.CodeAnalysis.Workspaces (13)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (3)
82private static Metadata? GetMetadataNoThrow(PortableExecutableReference reference) 251Checksum checksum, Metadata? metadata) : IDisposable 272private static ImmutableArray<ModuleMetadata> GetModuleMetadata(Metadata? metadata)
Serialization\SerializedPortableExecutableReference.cs (5)
21private readonly Metadata _metadata; 30Metadata metadata, 48protected override Metadata GetMetadataImpl() 56var metadata = TryGetMetadata(this); 69static ImmutableArray<ModuleMetadata> GetModules(Metadata? metadata)
Serialization\SerializerService_Reference.cs (5)
205private static void WriteMvidsTo(Metadata? metadata, ObjectWriter writer) 321private static void WriteTo(Metadata? metadata, ObjectWriter writer) 372private (Metadata metadata, ImmutableArray<TemporaryStorageStreamHandle> storageHandles)? TryReadMetadataFrom( 491private static Metadata? TryGetMetadata(PortableExecutableReference reference) 523protected override Metadata GetMetadataImpl()
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (5)
VisualStudioMSBuildWorkspaceTests.cs (5)
166var mdp1Sys1 = GetMetadata(p1Sys1); 167var mdp1Sys2 = GetMetadata(p1Sys2); 168var mdp2Sys1 = GetMetadata(p2Sys1); 169var mdp2Sys3 = GetMetadata(p2Sys1); 194private static Metadata GetMetadata(MetadataReference metadataReference)
Microsoft.VisualStudio.LanguageServices (3)
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (2)
36private static readonly ConditionalWeakTable<Metadata, object> s_lifetimeMap = new(); 150internal Metadata GetMetadata(string fullPath, DateTime snapshotTimestamp)
ProjectSystem\MetadataReferences\VisualStudioPortableExecutableReference.cs (1)
73protected override Metadata GetMetadataImpl()
VBCSCompiler (6)
src\Compilers\Server\VBCSCompiler\MetadataCache.cs (6)
20private readonly ConcurrentLruCache<FileKey, Metadata> _metadataCache = 21new ConcurrentLruCache<FileKey, Metadata>(CacheSize); 56internal Metadata GetMetadata(string fullPath, MetadataReferenceProperties properties) 61Metadata? metadata; 80Metadata result = AssemblyMetadata.Create(allModules); 129protected override Metadata GetMetadataImpl()