Επεξεργασία

Κοινή χρήση μέσω


StrongNameKeyPair Constructors

Definition

Initializes a new instance of the StrongNameKeyPair class.

Overloads

StrongNameKeyPair(Byte[])

Initializes a new instance of the StrongNameKeyPair class, building the key pair from a byte array.

StrongNameKeyPair(FileStream)

Initializes a new instance of the StrongNameKeyPair class, building the key pair from a FileStream.

StrongNameKeyPair(String)

Initializes a new instance of the StrongNameKeyPair class, building the key pair from a String.

StrongNameKeyPair(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the StrongNameKeyPair class, building the key pair from serialized data.

StrongNameKeyPair(Byte[])

Source:
StrongNameKeyPair.cs
Source:
StrongNameKeyPair.cs
Source:
StrongNameKeyPair.cs

Initializes a new instance of the StrongNameKeyPair class, building the key pair from a byte array.

public:
 StrongNameKeyPair(cli::array <System::Byte> ^ keyPairArray);
public StrongNameKeyPair (byte[] keyPairArray);
new System.Reflection.StrongNameKeyPair : byte[] -> System.Reflection.StrongNameKeyPair
Public Sub New (keyPairArray As Byte())

Parameters

keyPairArray
Byte[]

An array of type byte containing the key pair.

Exceptions

keyPairArray is null.

The caller does not have the required permission.

.NET 6+ only: In all cases.

See also

Applies to

StrongNameKeyPair(FileStream)

Source:
StrongNameKeyPair.cs
Source:
StrongNameKeyPair.cs
Source:
StrongNameKeyPair.cs

Initializes a new instance of the StrongNameKeyPair class, building the key pair from a FileStream.

public:
 StrongNameKeyPair(System::IO::FileStream ^ keyPairFile);
public StrongNameKeyPair (System.IO.FileStream keyPairFile);
new System.Reflection.StrongNameKeyPair : System.IO.FileStream -> System.Reflection.StrongNameKeyPair
Public Sub New (keyPairFile As FileStream)

Parameters

keyPairFile
FileStream

A FileStream containing the key pair.

Exceptions

keyPairFile is null.

The caller does not have the required permission.

.NET 6+ only: In all cases.

See also

Applies to

StrongNameKeyPair(String)

Source:
StrongNameKeyPair.cs
Source:
StrongNameKeyPair.cs
Source:
StrongNameKeyPair.cs

Initializes a new instance of the StrongNameKeyPair class, building the key pair from a String.

public:
 StrongNameKeyPair(System::String ^ keyPairContainer);
public StrongNameKeyPair (string keyPairContainer);
new System.Reflection.StrongNameKeyPair : string -> System.Reflection.StrongNameKeyPair
Public Sub New (keyPairContainer As String)

Parameters

keyPairContainer
String

A string containing the key pair.

Exceptions

keyPairContainer is null.

The caller does not have the required permission.

.NET Core and .NET 5+ only: In all cases.

Remarks

The key pair is in a named key container.

See also

Applies to

StrongNameKeyPair(SerializationInfo, StreamingContext)

Source:
StrongNameKeyPair.cs
Source:
StrongNameKeyPair.cs
Source:
StrongNameKeyPair.cs

Caution

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Initializes a new instance of the StrongNameKeyPair class, building the key pair from serialized data.

protected:
 StrongNameKeyPair(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected StrongNameKeyPair (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected StrongNameKeyPair (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Reflection.StrongNameKeyPair : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.StrongNameKeyPair
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Reflection.StrongNameKeyPair : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.StrongNameKeyPair
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

A SerializationInfo object that holds the serialized object data.

context
StreamingContext

A StreamingContext object that contains contextual information about the source or destination.

Attributes

Exceptions

.NET Core and .NET 5+ only: In all cases.

Remarks

This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. For more information, see XML and SOAP Serialization.

See also

Applies to