StreamingContextStates Enumeration

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)

[SerializableAttribute]
[FlagsAttribute]
[ComVisibleAttribute(true)]
public enum class StreamingContextStates

Member nameDescription
CrossProcessSpecifies that the source or destination context is a different process on the same computer.
CrossMachineSpecifies that the source or destination context is a different computer.
FileSpecifies 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.
PersistenceSpecifies 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.
RemotingSpecifies that the data is remoted to a context in an unknown location. Users cannot make any assumptions whether this is on the same computer.
OtherSpecifies that the serialization context is unknown.
CloneSpecifies 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.
CrossAppDomainSpecifies that the source or destination context is a different AppDomain. (For a description of AppDomains, see Application Domains).
AllSpecifies that the serialized data can be transmitted to or received from any of the other contexts.

The following code example demonstrates the use of the StreamingContextStates enum.

No code example is currently available or this language may not be supported.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft