Exemplo n.º 1
0

        
Exemplo n.º 2
0
        public static async Task <IAsyncEnumerable <T> > CreateLinqAsyncEnumerable <T>(
            this IReliableQueue <T> dictionary, Microsoft.ServiceFabric.Data.ITransaction txn)
        {
            var enumerable = await dictionary.CreateEnumerableAsync(txn).ConfigureAwait(false);

            return(enumerable.AsAsyncEnumerable());
        }
Exemplo n.º 3
0
        public Task RemoveAsync(Fabric.ITransaction tx, Uri name, TimeSpan timeout)
        {
            Fabric.IReliableState result;
            this.store.TryRemove(name, out result);

            return(Task.FromResult(true));
        }
Exemplo n.º 4
0

        
Exemplo n.º 5
0
        public Task RemoveAsync(Fabric.ITransaction tx, string name)
        {
            Fabric.IReliableState result;
            this.store.TryRemove(this.ToUri(name), out result);

            return(Task.FromResult(true));
        }
Exemplo n.º 6
0
        public static async Task <IAsyncEnumerable <KeyValuePair <TKey, TValue> > > CreateLinqAsyncEnumerable <TKey, TValue>(
            this IReliableDictionary <TKey, TValue> dictionary, Microsoft.ServiceFabric.Data.ITransaction txn, Func <TKey, bool> filter, EnumerationMode enumerationMode)
            where TKey : IComparable <TKey>, IEquatable <TKey>
        {
            var enumerable = await dictionary.CreateEnumerableAsync(txn, filter, enumerationMode).ConfigureAwait(false);

            return(enumerable.AsAsyncEnumerable());
        }
Exemplo n.º 7
0

        
Exemplo n.º 8
0

        
Exemplo n.º 9
0

        
Exemplo n.º 10
0

        
Exemplo n.º 11
0
 public Task <T> GetOrAddAsync <T>(Fabric.ITransaction tx, Uri name, TimeSpan timeout) where T : Fabric.IReliableState
 {
     return(Task.FromResult((T)this.store.GetOrAdd(name, this.GetDependency(typeof(T)))));
 }
Exemplo n.º 12
0

        
Exemplo n.º 13
0

        
Exemplo n.º 14
0

        
Exemplo n.º 15
0

        
Exemplo n.º 16
0
 public ServiceFabricTransaction(ServiceFabricTransaction transaction)
 {
     _transaction       = transaction.Tx;
     _transactionClosed = null;
     _ignoreCommits     = true;
 }
Exemplo n.º 17
0
 public ServiceFabricTransaction(IReliableStateManager stateManager, Action <bool> transactionClosed)
 {
     _transaction       = stateManager.CreateTransaction();
     _transactionClosed = transactionClosed;
     _ignoreCommits     = false;
 }
Exemplo n.º 18
0
 public Task ClearAsync(Fabric.ITransaction tx)
 {
     this.store.Clear();
     return(Task.FromResult(true));
 }
Exemplo n.º 19
0

        
Exemplo n.º 20
0

        
Exemplo n.º 21
0

        
Exemplo n.º 22
0

        
Exemplo n.º 23
0

        
Exemplo n.º 24
0

        
Exemplo n.º 25
0

        
Exemplo n.º 26
0

        
Exemplo n.º 27
0

        
Exemplo n.º 28
0

        
Exemplo n.º 29
0

        
Exemplo n.º 30
0
 public Task <T> GetOrAddAsync <T>(Fabric.ITransaction tx, string name) where T : Fabric.IReliableState
 {
     return(Task.FromResult((T)this.store.GetOrAdd(this.ToUri(name), this.GetDependency(typeof(T)))));
 }