Läs på engelska

Dela via


MetadataReference Class

Definition

Represents metadata image reference.

C#
public abstract class MetadataReference
Inheritance
MetadataReference
Derived

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.

Constructors

Properties

Display

Path or name used in error messages to identity the reference.

Properties

Methods

CreateFromAssembly(Assembly, MetadataReferenceProperties, DocumentationProvider)
Obsolete.

Creates a reference to a loaded assembly.

CreateFromAssembly(Assembly)
Obsolete.

Creates a reference to a loaded assembly.

CreateFromFile(String, MetadataReferenceProperties, DocumentationProvider)

Creates a reference to an assembly or standalone module stored in a file. Reads the content of the file into memory.

CreateFromImage(IEnumerable<Byte>, MetadataReferenceProperties, DocumentationProvider, String)

Creates a reference to a single-module assembly or a standalone module stored in memory.

CreateFromImage(ImmutableArray<Byte>, MetadataReferenceProperties, DocumentationProvider, String)

Creates a reference to a single-module assembly or a standalone module stored in memory.

CreateFromStream(Stream, MetadataReferenceProperties, DocumentationProvider, String)

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.

WithAliases(IEnumerable<String>)

Returns an instance of the reference with specified aliases.

WithAliases(ImmutableArray<String>)

Returns an instance of the reference with specified aliases.

WithEmbedInteropTypes(Boolean)

Returns an instance of the reference with specified interop types embedding.

WithProperties(MetadataReferenceProperties)

Returns an instance of the reference with specified properties, or this instance if properties haven't changed.

Applies to

Produkt Versioner
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0