Редагувати

Поділитися через


MetadataReaderProvider.FromMetadataImage Method

Definition

Overloads

FromMetadataImage(ImmutableArray<Byte>)

Creates a provider over a byte array.

FromMetadataImage(Byte*, Int32)

Creates a metadata provider over an image stored in memory.

FromMetadataImage(ImmutableArray<Byte>)

Source:
MetadataReaderProvider.cs
Source:
MetadataReaderProvider.cs
Source:
MetadataReaderProvider.cs

Creates a provider over a byte array.

public:
 static System::Reflection::Metadata::MetadataReaderProvider ^ FromMetadataImage(System::Collections::Immutable::ImmutableArray<System::Byte> image);
public static System.Reflection.Metadata.MetadataReaderProvider FromMetadataImage (System.Collections.Immutable.ImmutableArray<byte> image);
static member FromMetadataImage : System.Collections.Immutable.ImmutableArray<byte> -> System.Reflection.Metadata.MetadataReaderProvider
Public Shared Function FromMetadataImage (image As ImmutableArray(Of Byte)) As MetadataReaderProvider

Parameters

image
ImmutableArray<Byte>

Metadata image.

Returns

The new provider.

Exceptions

image is null.

Remarks

The content of the image is not read during the construction of the MetadataReaderProvider.

Applies to

FromMetadataImage(Byte*, Int32)

Source:
MetadataReaderProvider.cs
Source:
MetadataReaderProvider.cs
Source:
MetadataReaderProvider.cs

Creates a metadata provider over an image stored in memory.

public:
 static System::Reflection::Metadata::MetadataReaderProvider ^ FromMetadataImage(System::Byte* start, int size);
public static System.Reflection.Metadata.MetadataReaderProvider FromMetadataImage (byte* start, int size);
static member FromMetadataImage : nativeptr<byte> * int -> System.Reflection.Metadata.MetadataReaderProvider

Parameters

start
Byte*

Pointer to the start of the metadata blob.

size
Int32

The size of the metadata blob.

Returns

The new metadata provider.

Exceptions

size is negative.

Remarks

The memory is owned by the caller and is not released on disposal of the MetadataReaderProvider.

The caller is responsible for keeping the memory alive and unmodified throughout the lifetime of the MetadataReaderProvider.

The content of the blob is not read during the construction of the MetadataReaderProvider.

Applies to