SerializationInfo 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 SerializationInfo 類別的新執行個體。
多載
SerializationInfo(Type, IFormatterConverter) |
已淘汰.
建立 SerializationInfo 類別的新執行個體。 |
SerializationInfo(Type, IFormatterConverter, Boolean) |
已淘汰.
初始化 SerializationInfo 類別的新執行個體。 |
SerializationInfo(Type, IFormatterConverter)
警告
Formatter-based serialization is obsolete and should not be used.
重要
此 API 不符合 CLS 規範。
建立 SerializationInfo 類別的新執行個體。
public:
SerializationInfo(Type ^ type, System::Runtime::Serialization::IFormatterConverter ^ converter);
[System.CLSCompliant(false)]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter);
[System.CLSCompliant(false)]
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter);
[<System.CLSCompliant(false)>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter -> System.Runtime.Serialization.SerializationInfo
[<System.CLSCompliant(false)>]
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter -> System.Runtime.Serialization.SerializationInfo
Public Sub New (type As Type, converter As IFormatterConverter)
參數
- converter
- IFormatterConverter
在還原序列化期間所使用的 IFormatterConverter。
- 屬性
例外狀況
type
或 converter
為 null
。
備註
當做 參數傳遞的 converter
會將 IFormatterConverter 資料從其內部表示轉換成使用者所要求的表單。 內 SerializationInfo 資料的內部表示取決於建立它的格式器。
適用於
SerializationInfo(Type, IFormatterConverter, Boolean)
警告
Formatter-based serialization is obsolete and should not be used.
重要
此 API 不符合 CLS 規範。
初始化 SerializationInfo 類別的新執行個體。
public:
SerializationInfo(Type ^ type, System::Runtime::Serialization::IFormatterConverter ^ converter, bool requireSameTokenInPartialTrust);
[System.CLSCompliant(false)]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter, bool requireSameTokenInPartialTrust);
[System.CLSCompliant(false)]
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter, bool requireSameTokenInPartialTrust);
[<System.CLSCompliant(false)>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter * bool -> System.Runtime.Serialization.SerializationInfo
[<System.CLSCompliant(false)>]
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter * bool -> System.Runtime.Serialization.SerializationInfo
Public Sub New (type As Type, converter As IFormatterConverter, requireSameTokenInPartialTrust As Boolean)
參數
- converter
- IFormatterConverter
在還原序列化期間所使用的 IFormatterConverter。
- requireSameTokenInPartialTrust
- Boolean
指出物件是否在部分信任中需要相同的語彙基元。
- 屬性