private IList <Counter> SetupDepositCounters(int capacity)
        {
            Counter depositCounter1 = new MonetoryTxnCounter(TokenType.Deposit, capacity);
            Counter depositCounter2 = new MonetoryTxnCounter(TokenType.Deposit, capacity);


            return(new List <Counter>
            {
                depositCounter1,
                depositCounter2
            });
        }
        private IList <Counter> SetupWithdrawCounters(int capacity)
        {
            Counter withdrawCounter1 = new MonetoryTxnCounter(TokenType.Withdraw, capacity);
            Counter withdrawCounter2 = new MonetoryTxnCounter(TokenType.Withdraw, capacity);
            Counter withdrawCounter3 = new MonetoryTxnCounter(TokenType.Withdraw, capacity);

            return(new List <Counter>
            {
                withdrawCounter1,
                withdrawCounter2,
                withdrawCounter3
            });
        }
Пример #3
0
        private IList <Counter> SetupBankCounters(int capacity)
        {
            Counter depositCounter1     = new MonetoryTxnCounter(TokenType.Deposit, capacity);
            Counter withdrawCounter1    = new MonetoryTxnCounter(TokenType.Withdraw, capacity);
            Counter withdrawCounter2    = new MonetoryTxnCounter(TokenType.Withdraw, capacity);
            Counter nonMonetaryCounter1 = new NonMonetoryTxnCounter(TokenType.Other, capacity);
            Counter nonMonetaryCounter2 = new NonMonetoryTxnCounter(TokenType.Other, capacity);

            return(new List <Counter>
            {
                depositCounter1,
                withdrawCounter1,
                withdrawCounter2,
                nonMonetaryCounter1,
                nonMonetaryCounter2
            });
        }