PersistentComponentState.TryTakeFromJson<TValue>(String, TValue) 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.
Tries to retrieve the persisted state as JSON with the given key
and deserializes it into an
instance of type TValue
.
When the key is present, the state is successfully returned via instance
and removed from the PersistentComponentState.
public bool TryTakeFromJson<TValue> (string key, out TValue? instance);
member this.TryTakeFromJson : string * 'Value -> bool
Public Function TryTakeFromJson(Of TValue) (key As String, ByRef instance As TValue) As Boolean
Type Parameters
- TValue
Parameters
- key
- String
The key used to persist the instance.
- instance
- TValue
The persisted instance.
Returns
true
if the state was found; false
otherwise.