MetadataReaderProvider.FromMetadataImage Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
FromMetadataImage(ImmutableArray<Byte>) |
Creates a provider over a byte array. |
FromMetadataImage(Byte*, Int32) |
Creates a metadata provider over an image stored in memory. |
- Source:
- MetadataReaderProvider.cs
- 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
.NET 9 and other versions
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- MetadataReaderProvider.cs
- 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
start
is Zero.
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
.NET 9 and other versions
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: