Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 3
0
 public SandboxedKeyValueStoreController(
     ISandboxedKeyValueStore store,
     ISessionResolver sessionResolver)
 {
     Store           = store;
     SessionResolver = sessionResolver;
 }
Exemplo n.º 4
0
 public TodoService(ISandboxedKeyValueStore keyValueStore, IAuthService auth)
 {
     _store       = keyValueStore;
     _authService = auth;
 }
Exemplo n.º 5
0
        // SetMany

        public static Task SetMany(this ISandboxedKeyValueStore keyValueStore,
                                   Session session, (string Key, string Value, Moment? ExpiresAt)[] items,
Exemplo n.º 6
0
 public static Task Set(this ISandboxedKeyValueStore keyValueStore,
                        Session session, string key, string value, CancellationToken cancellationToken = default)
 => keyValueStore.Set(session, key, value, null, cancellationToken);
Exemplo n.º 7
0
 public TodoService(ISandboxedKeyValueStore store, IAuthService authService)
 {
     _store       = store;
     _authService = authService;
 }
Exemplo n.º 8
0
 public TodoService(ISandboxedKeyValueStore store, IAuth auth)
 {
     _store = store;
     _auth  = auth;
 }