Method FromJson
FromJson(string)
Reads a state written by ToJson(), by this release or an earlier one.
public static AgentRunState FromJson(string json)
Parameters
jsonstringThe JSON text.
Returns
- AgentRunState
The state, migrated to CurrentSchemaVersion.
Exceptions
- ArgumentNullException
Thrown when
jsonis null or empty.- AgentRunStateVersionException
Thrown when the state was written by a newer release.
- JsonException
Thrown when the text is not a run state.