StreamingContext Struct

Definition

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

public struct StreamingContext
public readonly struct StreamingContext
[System.Serializable]
public struct StreamingContext
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct StreamingContext
Inheritance
StreamingContext
Attributes

Remarks

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.

Constructors

StreamingContext(StreamingContextStates, Object)
Obsolete.

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

StreamingContext(StreamingContextStates)
Obsolete.

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

Properties

Context

Gets context specified as part of the additional context.

State
Obsolete.

Gets the source or destination of the transmitted data.

Methods

Equals(Object)

Determines whether two StreamingContext instances contain the same values.

GetHashCode()

Returns a hash code of this object.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

See also