public ExpirationManager(AzureDocumentDbStorage storage)
        {
            if (storage == null)
            {
                throw new ArgumentNullException(nameof(storage));
            }

            this.storage  = storage;
            checkInterval = storage.Options.ExpirationCheckInterval;
        }
Ejemplo n.º 2
0
        public CountersAggregator(AzureDocumentDbStorage storage)
        {
            if (storage == null)
            {
                throw new ArgumentNullException(nameof(storage));
            }

            this.storage  = storage;
            checkInterval = storage.Options.CountersAggregateInterval;
        }
        internal static Uri ToDocumentCollectionUri(this string document, AzureDocumentDbStorage storage)
        {
            switch (document)
            {
            case "locks": return(storage.Collections.LockDocumentCollectionUri);

            case "jobs": return(storage.Collections.JobDocumentCollectionUri);

            case "lists": return(storage.Collections.ListDocumentCollectionUri);

            case "sets": return(storage.Collections.SetDocumentCollectionUri);

            case "hashes": return(storage.Collections.HashDocumentCollectionUri);

            case "counters": return(storage.Collections.CounterDocumentCollectionUri);

            default: throw new ArgumentException($"{document} document not supported");
            }

            throw new ArgumentException("invalid document type", nameof(document));
        }
Ejemplo n.º 4
0
 public AzureDocumentDbConnection(AzureDocumentDbStorage storage)
 {
     Storage        = storage;
     QueueProviders = storage.QueueProviders;
 }
 public AzureDocumentDbMonitoringApi(AzureDocumentDbStorage storage)
 {
     this.storage = storage;
 }
 public AzureDocumentDbDistributedLock(string resource, TimeSpan timeout, AzureDocumentDbStorage storage)
 {
     this.storage = storage;
     Acquire(resource, timeout);
 }