FormatterServices.GetSerializableMembers 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
특정 클래스에 대해 serialize할 수 있는 모든 멤버를 반환합니다.
오버로드
| Name | Description |
|---|---|
| GetSerializableMembers(Type) |
지정된 Type클래스의 serialize 가능한 멤버를 모두 가져옵니다. |
| GetSerializableMembers(Type, StreamingContext) |
지정된 클래스와 제공Type된 StreamingContext 클래스의 serialize 가능한 멤버를 모두 가져옵니다. |
GetSerializableMembers(Type)
- Source:
- FormatterServices.cs
- Source:
- FormatterServices.cs
- Source:
- FormatterServices.cs
- Source:
- FormatterServices.cs
- Source:
- FormatterServices.cs
- Source:
- FormatterServices.cs
지정된 Type클래스의 serialize 가능한 멤버를 모두 가져옵니다.
public:
static cli::array <System::Reflection::MemberInfo ^> ^ GetSerializableMembers(Type ^ type);
public static System.Reflection.MemberInfo[] GetSerializableMembers(Type type);
[System.Security.SecurityCritical]
public static System.Reflection.MemberInfo[] GetSerializableMembers(Type type);
static member GetSerializableMembers : Type -> System.Reflection.MemberInfo[]
[<System.Security.SecurityCritical>]
static member GetSerializableMembers : Type -> System.Reflection.MemberInfo[]
Public Shared Function GetSerializableMembers (type As Type) As MemberInfo()
매개 변수
- type
- Type
serialize되는 형식입니다.
반품
일시적이지 않은 비정적 멤버 형식 MemberInfo 의 배열입니다.
- 특성
예외
매개 변수는 type .입니다 null.
호출자에게 필요한 권한이 없습니다.
설명
일반적으로 클래스의 직렬화 가능 멤버는 필드 및 속성과 같은 비정적 비정적 멤버입니다. 포함하려면 속성에 getter와 setter가 모두 있어야 합니다. 인터페이스를 ISerializable 구현하거나 serialization 서로게이트가 있는 클래스는 이러한 멤버를 모두 직렬화하거나 추가 멤버를 직렬화할 필요가 없습니다.
메서드는 GetSerializableMembers 메서드를 Type.GetFields 호출하기 때문에 사전순 또는 선언 순서와 같은 특정 순서로 필드를 반환하지 않습니다. 코드는 필드가 반환되는 순서에 따라 달라지지 않아야 합니다.
추가 정보
적용 대상
GetSerializableMembers(Type, StreamingContext)
- Source:
- FormatterServices.cs
- Source:
- FormatterServices.cs
- Source:
- FormatterServices.cs
- Source:
- FormatterServices.cs
- Source:
- FormatterServices.cs
- Source:
- FormatterServices.cs
지정된 클래스와 제공Type된 StreamingContext 클래스의 serialize 가능한 멤버를 모두 가져옵니다.
public:
static cli::array <System::Reflection::MemberInfo ^> ^ GetSerializableMembers(Type ^ type, System::Runtime::Serialization::StreamingContext context);
public static System.Reflection.MemberInfo[] GetSerializableMembers(Type type, System.Runtime.Serialization.StreamingContext context);
[System.Security.SecurityCritical]
public static System.Reflection.MemberInfo[] GetSerializableMembers(Type type, System.Runtime.Serialization.StreamingContext context);
static member GetSerializableMembers : Type * System.Runtime.Serialization.StreamingContext -> System.Reflection.MemberInfo[]
[<System.Security.SecurityCritical>]
static member GetSerializableMembers : Type * System.Runtime.Serialization.StreamingContext -> System.Reflection.MemberInfo[]
Public Shared Function GetSerializableMembers (type As Type, context As StreamingContext) As MemberInfo()
매개 변수
- type
- Type
serialize 또는 복제되는 형식입니다.
- context
- StreamingContext
serialization이 발생하는 컨텍스트입니다.
반품
일시적이지 않은 비정적 멤버 형식 MemberInfo 의 배열입니다.
- 특성
예외
매개 변수는 type .입니다 null.
호출자에게 필요한 권한이 없습니다.
설명
일반적으로 클래스의 직렬화 가능 멤버는 필드 및 속성과 같은 비정적 비정적 멤버입니다. 포함하려면 속성에 getter와 setter가 모두 있어야 합니다. serialization 서로게이트를 ISerializable 구현하거나 포함하는 클래스는 이러한 멤버를 모두 직렬화하거나 추가 멤버를 직렬화할 필요가 없습니다.
열거형 값을 포함하는 context 경우 StreamingContextStates.Clone 임시 필드도 이 메서드에서 반환된 배열에 MemberInfo 포함됩니다.
메서드는 GetSerializableMembers 메서드를 Type.GetFields 호출하기 때문에 사전순 또는 선언 순서와 같은 특정 순서로 필드를 반환하지 않습니다. 코드는 필드가 반환되는 순서에 따라 달라지지 않아야 합니다.