Exemplo n.º 1
0
 /// <inheritdoc />
 public Task <IPersistentStore <Guid, string> > CreatePersistentStoreKeyGuidValueStringAsync(
     string storeIdentifier,
     DataRetentionPolicy retentionPolicy,
     CancellationToken token)
 {
     return(Task.FromResult((IPersistentStore <Guid, string>) new InMemoryStore <Guid, string>()));
 }
Exemplo n.º 2
0
 /// <inheritdoc />
 public Task <IPersistentStore <string, int> > CreatePersistentStoreForIntAsync(
     string storeIdentifier,
     DataRetentionPolicy retentionPolicy,
     CancellationToken token)
 {
     return(Task.FromResult((IPersistentStore <string, int>) new InMemoryStore <string, int>()));
 }
Exemplo n.º 3
0
        public TypedObjectStore(
            ILogger logger,
            IStoreProvider storeProvider,
            string uniqueStoreIdentifier,
            DataRetentionPolicy retentionPolicy,
            CancellationToken cancellationToken)
        {
            Assert.IsNotNull(logger, "logger != null");
            Assert.IsNotNull(storeProvider, "storeProvider != null");
            Assert.IsNotNull(retentionPolicy, "retentionPolicy != null");
            Assert.IsNotEmptyOrNull(uniqueStoreIdentifier, "uniqueStoreIdentifier != null/empty");

            this.storeProvider       = storeProvider;
            this.dataRetentionPolicy = retentionPolicy;
            this.storeIdentifier     = uniqueStoreIdentifier;
            this.cancellationToken   = cancellationToken;
            this.logger = logger;
        }