public static Task Set(this ISandboxedKeyValueStore keyValueStore, Session session, string key, string value, Moment?expiresAt, CancellationToken cancellationToken = default) { var command = new SandboxedSetCommand(session, key, value, expiresAt); return(keyValueStore.Set(command, cancellationToken)); }
public static Task Set <T>(this ISandboxedKeyValueStore keyValueStore, Session session, string key, T value, Moment?expiresAt, CancellationToken cancellationToken = default) { var sValue = JsonSerialized.New(value).SerializedValue; return(keyValueStore.Set(session, key, sValue, expiresAt, cancellationToken)); }
public static Task Set(this ISandboxedKeyValueStore keyValueStore, Session session, string key, string value, CancellationToken cancellationToken = default) => keyValueStore.Set(session, key, value, null, cancellationToken);