Редагувати

Поділитися через


StreamingContext Constructors

Definition

Initializes a new instance of the StreamingContext class.

Overloads

StreamingContext(StreamingContextStates)
Obsolete.

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

StreamingContext(StreamingContextStates, Object)
Obsolete.

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

StreamingContext(StreamingContextStates)

Source:
StreamingContext.cs
Source:
StreamingContext.cs
Source:
StreamingContext.cs

Caution

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

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

public:
 StreamingContext(System::Runtime::Serialization::StreamingContextStates state);
public StreamingContext (System.Runtime.Serialization.StreamingContextStates state);
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public StreamingContext (System.Runtime.Serialization.StreamingContextStates state);
new System.Runtime.Serialization.StreamingContext : System.Runtime.Serialization.StreamingContextStates -> System.Runtime.Serialization.StreamingContext
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Runtime.Serialization.StreamingContext : System.Runtime.Serialization.StreamingContextStates -> System.Runtime.Serialization.StreamingContext
Public Sub New (state As StreamingContextStates)

Parameters

state
StreamingContextStates

A bitwise combination of the StreamingContextStates values that specify the source or destination context for this StreamingContext.

Attributes

See also

Applies to

StreamingContext(StreamingContextStates, Object)

Source:
StreamingContext.cs
Source:
StreamingContext.cs
Source:
StreamingContext.cs

Caution

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

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

public:
 StreamingContext(System::Runtime::Serialization::StreamingContextStates state, System::Object ^ additional);
public StreamingContext (System.Runtime.Serialization.StreamingContextStates state, object? additional);
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public StreamingContext (System.Runtime.Serialization.StreamingContextStates state, object? additional);
public StreamingContext (System.Runtime.Serialization.StreamingContextStates state, object additional);
new System.Runtime.Serialization.StreamingContext : System.Runtime.Serialization.StreamingContextStates * obj -> System.Runtime.Serialization.StreamingContext
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Runtime.Serialization.StreamingContext : System.Runtime.Serialization.StreamingContextStates * obj -> System.Runtime.Serialization.StreamingContext
Public Sub New (state As StreamingContextStates, additional As Object)

Parameters

state
StreamingContextStates

A bitwise combination of the StreamingContextStates values that specify the source or destination context for this StreamingContext.

additional
Object

Any additional information to be associated with the StreamingContext. This information is available to any object that implements ISerializable or any serialization surrogate. Most users do not need to set this parameter.

Attributes

See also

Applies to