Redigera

Dela via


IRehydrationContext.TryGetValue<T>(String, T) Method

Definition

Tries to get a value from the rehydration context, associated with the provided key, deserializing it using Serializer. If a serializer is found for the value, and the key is present, then the value is deserialized 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 TryGetValue<T> (string key, out T? value);
abstract member TryGetValue : string * 'T -> bool
Public Function TryGetValue(Of T) (key As String, ByRef value As T) As Boolean

Type Parameters

T

Parameters

key
String

The key.

value
T

The value, if present.

Returns

true if the key exists in the context, otherwise false.

Applies to