StreamingContextStates 枚举

定义

注意

Formatter-based serialization is obsolete and should not be used.

定义一组标志,指定序列化期间流的源或目标上下文。

此枚举支持其成员值的按位组合。

public enum class StreamingContextStates
[System.Flags]
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public enum StreamingContextStates
[System.Flags]
public enum StreamingContextStates
[System.Flags]
[System.Serializable]
public enum StreamingContextStates
[System.Flags]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum StreamingContextStates
[<System.Flags>]
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type StreamingContextStates = 
[<System.Flags>]
type StreamingContextStates = 
[<System.Flags>]
[<System.Serializable>]
type StreamingContextStates = 
[<System.Flags>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type StreamingContextStates = 
Public Enum StreamingContextStates
继承
StreamingContextStates
属性

字段

名称 说明
CrossProcess 1

指定源或目标上下文在同一台计算机上是不同的进程。

CrossMachine 2

指定源或目标上下文是不同的计算机。

File 4

指定源或目标上下文是一个文件。 用户可以假定文件将比创建文件的过程更长,并且不以反序列化方式序列化对象需要从当前进程访问任何数据。

Persistence 8

指定源或目标上下文是持久存储,可能包括数据库、文件或其他后盾存储。 用户可以假定持久化的数据将比创建数据而不是序列化对象的过程更长,以便反序列化需要从当前进程访问任何数据。

Remoting 16

指定数据远程到未知位置的上下文。 用户无法假设这是否在同一台计算机上。

Other 32

指定序列化上下文未知。

Clone 64

指定正在克隆对象图。 用户可以假定克隆的图形将继续存在于同一进程中,并且可以安全地访问句柄或其他对非托管资源的引用。

CrossAppDomain 128

指定源或目标上下文是不同的 AppDomain。

All 255

指定可向任何其他上下文传输或接收序列化数据。

适用于

另请参阅