mscorlib(4.0.0.0) API with additions
StreamingContext.cs
2 
4 {
7  [ComVisible(true)]
8  [__DynamicallyInvokable]
9  public struct StreamingContext
10  {
11  internal object m_additionalContext;
12 
13  internal StreamingContextStates m_state;
14 
17  public object Context => m_additionalContext;
18 
21  public StreamingContextStates State => m_state;
22 
26  {
27  this = new StreamingContext(state, null);
28  }
29 
33  public StreamingContext(StreamingContextStates state, object additional)
34  {
35  m_state = state;
36  m_additionalContext = additional;
37  }
38 
43  [__DynamicallyInvokable]
44  public override bool Equals(object obj)
45  {
46  if (!(obj is StreamingContext))
47  {
48  return false;
49  }
50  if (((StreamingContext)obj).m_additionalContext == m_additionalContext && ((StreamingContext)obj).m_state == m_state)
51  {
52  return true;
53  }
54  return false;
55  }
56 
59  [__DynamicallyInvokable]
60  public override int GetHashCode()
61  {
62  return (int)m_state;
63  }
64  }
65 }
StreamingContextStates State
Gets the source or destination of the transmitted data.
Definition: __Canon.cs:3
Describes the source and destination of a given serialized stream, and provides an additional caller-...
override int GetHashCode()
Returns a hash code of this object.
override bool Equals(object obj)
Determines whether two T:System.Runtime.Serialization.StreamingContext instances contain the same val...
object Context
Gets context specified as part of the additional context.
Specifies that the class can be serialized.
StreamingContextStates
Defines a set of flags that specifies the source or destination context for the stream during seriali...
StreamingContext(StreamingContextStates state)
Initializes a new instance of the T:System.Runtime.Serialization.StreamingContext class with a given ...
StreamingContext(StreamingContextStates state, object additional)
Initializes a new instance of the T:System.Runtime.Serialization.StreamingContext class with a given ...