다음을 통해 공유


StreamingContextStates Enumeration

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Defines a set of flags that specifies the source or destination context for the stream during serialization.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  System.Runtime.Serialization
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
<FlagsAttribute> _
<ComVisibleAttribute(True)> _
Public Enumeration StreamingContextStates
[FlagsAttribute]
[ComVisibleAttribute(true)]
public enum StreamingContextStates

Members

Member name Description
CrossProcess Specifies that the source or destination context is a different process on the same computer.
CrossMachine Specifies that the source or destination context is a different computer.
File Specifies that the source or destination context is a file. Users can assume that files will last longer than the process that created them and not serialize objects in such a way that deserialization will require accessing any data from the current process.
Persistence Specifies that the source or destination context is a persisted store, which could include databases, files, or other backing stores. Users can assume that persisted data will last longer than the process that created the data and not serialize objects so that deserialization will require accessing any data from the current process.
Remoting Specifies that the data is remoted to a context in an unknown location. Users cannot make any assumptions whether this is on the same computer.
Other Specifies that the serialization context is unknown.
Clone Specifies that the object graph is being cloned. Users can assume that the cloned graph will continue to exist within the same process and be safe to access handles or other references to unmanaged resources.
CrossAppDomain Specifies that the source or destination context is a different AppDomain. For information on AppDomains, see Application Domains.
All Specifies that the serialized data can be transmitted to or received from any of the other contexts.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.