BinaryFormatter クラス

定義

注意事項

BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.

オブジェクト、または接続されているオブジェクトのグラフ全体を、バイナリ形式でシリアル化および逆シリアル化します。

public ref class BinaryFormatter sealed : System::Runtime::Serialization::IFormatter
public ref class BinaryFormatter sealed : System::Runtime::Remoting::Messaging::IRemotingFormatter
public sealed class BinaryFormatter : System.Runtime.Serialization.IFormatter
[System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class BinaryFormatter : System.Runtime.Serialization.IFormatter
public sealed class BinaryFormatter : System.Runtime.Remoting.Messaging.IRemotingFormatter
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class BinaryFormatter : System.Runtime.Remoting.Messaging.IRemotingFormatter
type BinaryFormatter = class
    interface IFormatter
[<System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type BinaryFormatter = class
    interface IFormatter
type BinaryFormatter = class
    interface IRemotingFormatter
    interface IFormatter
[<System.Runtime.InteropServices.ComVisible(true)>]
type BinaryFormatter = class
    interface IRemotingFormatter
    interface IFormatter
Public NotInheritable Class BinaryFormatter
Implements IFormatter
Public NotInheritable Class BinaryFormatter
Implements IRemotingFormatter
継承
BinaryFormatter
属性
実装

注釈

警告: BinaryFormatter は安全ではありません。セキュリティで保護することはできません。 詳細については、 BinaryFormatter セキュリティ ガイドSystem.Runtime.Serialization.Formatters.Binary.BinaryFormatter クラスを参照してください。

コンストラクター

BinaryFormatter()
古い.

BinaryFormatter クラスの新しいインスタンスを既定値で初期化します。

BinaryFormatter(ISurrogateSelector, StreamingContext)
古い.

サロゲート セレクターおよびストリーム コンテキストを指定して、BinaryFormatter クラスの新しいインスタンスを初期化します。

プロパティ

AssemblyFormat
古い.

アセンブリの検索と読み込みに関するデシリアライザーの動作を取得または設定します。

Binder
古い.

(安全ではありません) シリアル化されたオブジェクトから型へのバインディングを制御する、SerializationBinder 型のオブジェクトを取得または設定します。

Context
古い.

対象のフォーマッタで使用する StreamingContext を取得または設定します。

FilterLevel
古い.

TypeFilterLevel が実行する自動逆シリアル化の BinaryFormatter を取得または設定します。

SurrogateSelector
古い.

シリアル化中および逆シリアル化中に行われる型の置換を制御する ISurrogateSelector を取得または設定します。

TypeFormat
古い.

シリアル化されたストリームにおける型の記述のレイアウト形式を取得または設定します。

メソッド

Deserialize(Stream)
古い.

指定したストリームをオブジェクト グラフに逆シリアル化します。

Deserialize(Stream, HeaderHandler)
古い.

指定したストリームをオブジェクト グラフに逆シリアル化します。 そのストリーム内にヘッダーがある場合は、指定した HeaderHandler がそのヘッダーを処理します。

DeserializeMethodResponse(Stream, HeaderHandler, IMethodCallMessage)
古い.

指定した Stream から、リモート メソッド呼び出しへの応答を逆シリアル化します。

Equals(Object)
古い.

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()
古い.

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()
古い.

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()
古い.

現在の Object の簡易コピーを作成します。

(継承元 Object)
Serialize(Stream, Object)
古い.

オブジェクト、または先頭 (ルート) を指定したオブジェクト グラフを、指定したストリームにシリアル化します。

Serialize(Stream, Object, Header[])
古い.

オブジェクト、または先頭 (ルート) を指定したオブジェクト グラフを、指定したヘッダーを結び付けて、指定したストリームにシリアル化します。

ToString()
古い.

現在のオブジェクトを表す文字列を返します。

(継承元 Object)
UnsafeDeserialize(Stream, HeaderHandler)
古い.

指定したストリームをオブジェクト グラフに逆シリアル化します。 そのストリーム内にヘッダーがある場合は、指定した HeaderHandler がそのヘッダーを処理します。

UnsafeDeserializeMethodResponse(Stream, HeaderHandler, IMethodCallMessage)
古い.

指定した Stream から、リモート メソッド呼び出しへの応答を逆シリアル化します。

適用対象