TurnContextStateCollection.Add Method
Definition
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.
Overloads
Add<T>(T) |
Adds a value to the turn's context. |
Add<T>(String, T) |
Adds a value to the turn's context. |
Add<T>(T)
Adds a value to the turn's context.
public void Add<T> (T value) where T : class;
override this.Add : 'T -> unit (requires 'T : null)
Public Sub Add(Of T As Class) (value As T)
Type Parameters
- T
The type of the object.
Parameters
- value
- T
The object to add.
Exceptions
value
is null.
Remarks
The default service key is the FullName of the object type.
Applies to
Add<T>(String, T)
Adds a value to the turn's context.
public void Add<T> (string key, T value) where T : class;
override this.Add : string * 'T -> unit (requires 'T : null)
Public Sub Add(Of T As Class) (key As String, value As T)
Type Parameters
- T
The type of the object.
Parameters
- key
- String
The name of the object.
- value
- T
The value to add.
Exceptions
key
or value
is null.