StreamingContext Structure

 

Describes the source and destination of a given serialized stream, and provides an additional caller-defined context.

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

[SerializableAttribute]
[ComVisibleAttribute(true)]
public value struct StreamingContext

NameDescription
System_CAPS_pubmethodStreamingContext(StreamingContextStates)

Initializes a new instance of the StreamingContext class with a given context state.

System_CAPS_pubmethodStreamingContext(StreamingContextStates, Object^)

Initializes a new instance of the StreamingContext class with a given context state, and some additional information.

NameDescription
System_CAPS_pubpropertyContext

Gets context specified as part of the additional context.

System_CAPS_pubpropertyState

Gets the source or destination of the transmitted data.

NameDescription
System_CAPS_pubmethodEquals(Object^)

Determines whether two StreamingContext instances contain the same values.(Overrides ValueType::Equals(Object^).)

System_CAPS_pubmethodGetHashCode()

Returns a hash code of this object.(Overrides ValueType::GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns the fully qualified type name of this instance.(Inherited from ValueType.)

Indicates the source or destination of the bits that the formatter uses. Classes with surrogates or that implement ISerializable can serialize or ignore fields and values based on the information stored in the streaming context. For example, a window handle is still valid if the State property is set to System.Runtime.Serialization.StreamingContextStates.CrossProcess.

The following code example demonstrates the StreamingContext structure.

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

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: