IDehydrationContext.TryAddValue<T>(String, T) 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.
Attempts to a value to the dehydration context, associated with the provided key, serializing it using Serializer.
If a serializer is found for the value, and the key has not already been added, then the value is added and the method returns true
.
If no serializer exists or the key has already been added, then the value is not added and the method returns false
.
public bool TryAddValue<T> (string key, T? value);
abstract member TryAddValue : string * 'T -> bool
Public Function TryAddValue(Of T) (key As String, value As T) As Boolean
Type Parameters
- T
Parameters
- key
- String
The key.
- value
- T
The value to add.