BinaryFormatter 클래스

정의

개체 또는 연결된 개체의 전체 그래프를 이진 형식으로 직렬화하고 역직렬화합니다.

public ref class BinaryFormatter sealed : System::Runtime::Remoting::Messaging::IRemotingFormatter
public ref class BinaryFormatter sealed : 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
public sealed class BinaryFormatter : System.Runtime.Serialization.IFormatter
type BinaryFormatter = class
    interface IRemotingFormatter
    interface IFormatter
[<System.Runtime.InteropServices.ComVisible(true)>]
type BinaryFormatter = class
    interface IRemotingFormatter
    interface IFormatter
type BinaryFormatter = class
    interface IFormatter
Public NotInheritable Class BinaryFormatter
Implements IRemotingFormatter
Public NotInheritable Class BinaryFormatter
Implements IFormatter
상속
BinaryFormatter
특성
구현

설명

경고: BinaryFormatter는 안전하지 않으며 안전하게 만들 수 없습니다. 자세한 내용은 BinaryFormatter 보안 가이드를 참조하세요. BinaryFormatter의 기본 구현은 .NET 9에서 제거되었습니다. 자세한 내용은 BinaryFormatter 마이그레이션 가이드를 참조하세요.

생성자

Name Description
BinaryFormatter()

기본값을 사용하여 클래스의 새 인스턴스를 BinaryFormatter 초기화합니다.

BinaryFormatter(ISurrogateSelector, StreamingContext)

지정된 서로게이트 선택기 및 스트리밍 컨텍스트를 사용하여 클래스의 BinaryFormatter 새 인스턴스를 초기화합니다.

속성

Name Description
AssemblyFormat

어셈블리 찾기 및 로드와 관련하여 역직렬 변환기의 동작을 가져오거나 설정합니다.

Binder

(안전하지 않음) 직렬화된 개체의 형식 SerializationBinder 바인딩을 제어하는 형식의 개체를 가져오거나 설정합니다.

Context

이 포맷터에 StreamingContext 대한 값을 가져오거나 설정합니다.

FilterLevel

수행하는 자동 역직렬화 TypeFilterLevel 의 값을 가져오거나 설정합니다BinaryFormatter.

SurrogateSelector

serialization 및 deserialization 중에 형식 대체를 제어하는 값을 가져오거나 설정합니다 ISurrogateSelector .

TypeFormat

serialize된 스트림에 형식 설명이 배치되는 형식을 가져오거나 설정합니다.

메서드

Name Description
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원격 메서드 호출에 대한 응답을 역직렬화합니다.

적용 대상