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
[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.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
[<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 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 セキュリティ ガイド」を参照してください。 BinaryFormatter のインボックス実装は、.NET 9 で削除されました。 詳細については、「 BinaryFormatter 移行ガイド」を参照してください。

コンストラクター

名前 説明
BinaryFormatter()
古い.

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

BinaryFormatter(ISurrogateSelector, StreamingContext)
古い.

指定されたサロゲート セレクターとストリーミング コンテキストを使用して、 BinaryFormatter クラスの新しいインスタンスを初期化します。

プロパティ

名前 説明
AssemblyFormat
古い.

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

Binder
古い.

(セキュリティで保護されていない)シリアル化されたオブジェクトの型へのバインドを制御する SerializationBinder 型のオブジェクトを取得または設定します。

Context
古い.

このフォーマッタの StreamingContext を取得または設定します。

FilterLevel
古い.

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

SurrogateSelector
古い.

シリアル化と逆シリアル化の間に型の置換を制御する ISurrogateSelector を取得または設定します。

TypeFormat
古い.

シリアル化されたストリームで型の説明をレイアウトする形式を取得または設定します。

メソッド

名前 説明
Deserialize(Stream, HeaderHandler)
古い.

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

Deserialize(Stream)
古い.

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

DeserializeMethodResponse(Stream, HeaderHandler, IMethodCallMessage)
古い.

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

Equals(Object)
古い.

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

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

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

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

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

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

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

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

指定したヘッダーをアタッチする特定のストリームに、指定したトップ (ルート) を持つオブジェクトまたはオブジェクトのグラフをシリアル化します。

Serialize(Stream, Object)
古い.

指定したストリームに対して、指定したトップ (ルート) を持つオブジェクトまたはオブジェクトのグラフをシリアル化します。

ToString()
古い.

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

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

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

UnsafeDeserializeMethodResponse(Stream, HeaderHandler, IMethodCallMessage)
古い.

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

適用対象