Class CredentialsStore
- Namespace
- RustPlusApi.Fcm.Registration
- Assembly
- RustPlusApi.Fcm.Registration.dll
Persists Credentials to JSON (the rustplus.config.json equivalent),
so they survive between the one-time registration and later RustPlusFcm runs.
public static class CredentialsStore
- Inheritance
-
CredentialsStore
- Inherited Members
Methods
Deserialize(string)
Deserializes json back into a Credentials instance.
public static Credentials Deserialize(string json)
Parameters
jsonstringThe JSON string produced by Serialize(Credentials).
Returns
Exceptions
- InvalidOperationException
Thrown when
jsoncannot be deserialized.
Load(string)
Reads the file at path and deserializes it into a Credentials instance.
public static Credentials Load(string path)
Parameters
pathstringThe file path previously written by Save(string, Credentials).
Returns
Save(string, Credentials)
Serializes credentials and writes the result to path.
public static void Save(string path, Credentials credentials)
Parameters
pathstringThe file path to write to.
credentialsCredentialsThe credentials to persist.
Serialize(Credentials)
Serializes credentials to an indented JSON string.
public static string Serialize(Credentials credentials)
Parameters
credentialsCredentialsThe credentials to serialize.