Click or drag to resize

MetadataReference Class



Represents metadata image reference.
Inheritance Hierarchy

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public abstract class MetadataReference

The MetadataReference type exposes the following members.

Constructors
  NameDescription
Protected methodMetadataReference
Initializes a new instance of the MetadataReference class
Top
Properties
  NameDescription
Public propertyDisplay
Path or name used in error messages to identity the reference.
Public propertyProperties
Top
Methods
  NameDescription
Public methodStatic memberCreateFromAssembly(Assembly) Obsolete.
Creates a reference to a loaded assembly.
Public methodStatic memberCreateFromAssembly(Assembly, MetadataReferenceProperties, DocumentationProvider) Obsolete.
Creates a reference to a loaded assembly.
Public methodStatic memberCreateFromFile
Creates a reference to an assembly or standalone module stored in a file. Reads the content of the file into memory.
Public methodStatic memberCreateFromImage(IEnumerableT, Void, Byte, MetadataReferenceProperties)
Public methodStatic memberCreateFromImage(ImmutableArrayByte, MetadataReferenceProperties, DocumentationProvider, String)
Creates a reference to a single-module assembly or a standalone module stored in memory.
Public methodStatic memberCreateFromStream
Creates a reference to a single-module assembly or a stand-alone module from data in specified stream. Reads the content of the stream into memory and closes the stream upon return.
Public methodWithAliases(IEnumerableT)
Public methodWithAliases(ImmutableArrayString)
Returns an instance of the reference with specified aliases.
Public methodWithEmbedInteropTypes
Returns an instance of the reference with specified interop types embedding.
Public methodWithProperties
Returns an instance of the reference with specified properties, or this instance if properties haven't changed.
Top
Remarks
Represents a logical location of the image, not the content of the image. The content might change in time. A snapshot is taken when the compiler queries the reference for its metadata.
See Also