StreamingContextStates Enum
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Formatter-based serialization is obsolete and should not be used.
Defines a set of flags that specifies the source or destination context for the stream during serialization.
This enumeration supports a bitwise combination of its member values.
public enum class StreamingContextStates
[System.Flags]
public enum StreamingContextStates
[System.Flags]
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public enum StreamingContextStates
[System.Flags]
[System.Serializable]
public enum StreamingContextStates
[System.Flags]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum StreamingContextStates
[<System.Flags>]
type StreamingContextStates =
[<System.Flags>]
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type StreamingContextStates =
[<System.Flags>]
[<System.Serializable>]
type StreamingContextStates =
[<System.Flags>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type StreamingContextStates =
Public Enum StreamingContextStates
- Inheritance
- Attributes
Name | Value | Description |
---|---|---|
CrossProcess | 1 | Specifies that the source or destination context is a different process on the same computer. |
CrossMachine | 2 | Specifies that the source or destination context is a different computer. |
File | 4 | 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 | 8 | 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 | 16 | 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 | 32 | Specifies that the serialization context is unknown. |
Clone | 64 | 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 | 128 | Specifies that the source or destination context is a different AppDomain. (For a description of AppDomains, see Application Domains). |
All | 255 | Specifies that the serialized data can be transmitted to or received from any of the other contexts. |
Product | Versions (Obsolete) |
---|---|
.NET | 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 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: