Ejemplo n.º 1
0
 public TransactionGrain(
     [TransactionalState("Info")] ITransactionalState <Info> info)
 {
     this.info = info ?? throw new ArgumentNullException(nameof(info));
 }
Ejemplo n.º 2
0
 public AccountGrain(
     [TransactionalState("balance")] ITransactionalState <Balance> balance)
 {
     _balance = balance ?? throw new ArgumentNullException(nameof(balance));
 }
Ejemplo n.º 3
0
 public BallGrain(
     [TransactionalState("attr")] ITransactionalState <BallAttr> attr)
 {
     this.attr = attr ?? throw new ArgumentNullException(nameof(attr));
 }
 public SingleStateTransactionalGrain(
     [TransactionalState(TransactionTestConstants.TransactionStore)]
     ITransactionalState <GrainData> data)
 {
     this.data = data;
 }
Ejemplo n.º 5
0
 public TotalHashIndexPartitionedPerKeyBucketImplTransactional(
     [TransactionalState(IndexingConstants.BucketStateName, IndexingConstants.INDEXING_STORAGE_PROVIDER_NAME)]
     ITransactionalState <HashIndexBucketState <K, V> > transactionalState)
     : base(transactionalState)
 {
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Performs an update operation, without returning any result.
 /// </summary>
 /// <param name="transactionalState">Transactional state to perform update upon.</param>
 /// <param name="updateAction">An action that updates the state.</param>
 public static Task PerformUpdate <TState>(this ITransactionalState <TState> transactionalState, Action <TState> updateAction)
     where TState : class, new()
 {
     return(transactionalState.PerformUpdate <bool>(state => { updateAction(state); return true; }));
 }
Ejemplo n.º 7
0
 public AccountGrain(ILogger <AccountGrain> logger, [TransactionalState("balance")] ITransactionalState <Balance> balance)
     : base(logger)
 {
     this.balance = balance ?? throw new ArgumentNullException(nameof(balance));
 }
Ejemplo n.º 8
0
 public AccountGrain(
     [TransactionalState("balance")] ITransactionalState <Balance> balance) =>
Ejemplo n.º 9
0
 private protected HashIndexPartitionedPerKeyBucket(ITransactionalState <HashIndexBucketState <K, V> > transactionalState)
     : base(transactionalState)
 {
 }
Ejemplo n.º 10
0
 public AccountGrain([TransactionalState("balance", StorageProviders.DefaultProviderName)] ITransactionalState <TBalance> balance)
 {
     _balance = balance ?? throw new ArgumentNullException(nameof(balance));
 }
Ejemplo n.º 11
0
 public Grain2([TransactionalState("grain2")] ITransactionalState <Grain2State> state)
 {
     _state = state;
 }