示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
 public static Task Set(this ISandboxedKeyValueStore keyValueStore,
                        Session session, string key, string value, CancellationToken cancellationToken = default)
 => keyValueStore.Set(session, key, value, null, cancellationToken);