StrongNameKeyPair 构造函数

定义

初始化 StrongNameKeyPair 类的新实例。

重载

名称 说明
StrongNameKeyPair(Byte[])

初始化类的新实例 StrongNameKeyPair ,从 byte 数组生成密钥对。

StrongNameKeyPair(FileStream)

初始化类的新实例 ,从 /> 生成密钥对。

StrongNameKeyPair(String)

初始化类的新实例 ,从 /> 生成密钥对。

StrongNameKeyPair(SerializationInfo, StreamingContext)
已过时.

初始化类的新实例 StrongNameKeyPair ,从序列化数据生成密钥对。

StrongNameKeyPair(Byte[])

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

初始化类的新实例 StrongNameKeyPair ,从 byte 数组生成密钥对。

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())

参数

keyPairArray
Byte[]

包含键对的类型 byte 数组。

例外

keyPairArraynull

调用方没有所需的权限。

仅限 .NET 6+ :在所有情况下。

另请参阅

适用于

StrongNameKeyPair(FileStream)

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

初始化类的新实例 ,从 /> 生成密钥对。

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)

参数

keyPairFile
FileStream

一个 FileStream 包含密钥对的键对。

例外

keyPairFilenull

调用方没有所需的权限。

仅限 .NET 6+ :在所有情况下。

另请参阅

适用于

StrongNameKeyPair(String)

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

初始化类的新实例 ,从 /> 生成密钥对。

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

参数

keyPairContainer
String

包含密钥对的字符串。

例外

keyPairContainernull

调用方没有所需的权限。

仅限 .NET Core 和 .NET 5+ :在所有情况下。

注解

密钥对位于命名密钥容器中。

另请参阅

适用于

StrongNameKeyPair(SerializationInfo, StreamingContext)

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

注意

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

初始化类的新实例 StrongNameKeyPair ,从序列化数据生成密钥对。

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);
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}")>]
new System.Reflection.StrongNameKeyPair : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.StrongNameKeyPair
new System.Reflection.StrongNameKeyPair : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.StrongNameKeyPair
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

保存序列化对象数据的 SerializationInfo 对象。

context
StreamingContext

包含 StreamingContext 有关源或目标的上下文信息的对象。

属性

例外

仅限 .NET Core 和 .NET 5+ :在所有情况下。

注解

在反序列化期间调用此构造函数以重新构造通过流传输的异常对象。 有关详细信息,请参阅 XML 和 SOAP 序列化

另请参阅

适用于