Ejemplo n.º 1
0
        public int Increment(string key)
        {
            ValidateKeyVal(key);
            var command = new IncrementCommand(1, key);

            return(command.Execute());
        }
Ejemplo n.º 2
0
        public int IncrementBy(string key, int count)
        {
            ValidateKeyVal(key);
            var command = new IncrementCommand(count, key);

            return(command.Execute());
        }
Ejemplo n.º 3
0
 protected override void OnBuyCommandExecute()
 {
     if (Quantity == default(float))
     {
         base.OnBuyCommandExecute();
     }
     else if (IncrementCommand != null && IncrementCommand.CanExecute())
     {
         IncrementCommand.Execute();
     }
 }