Ejemplo n.º 1
0
            public int Dub(int number)
            {
                var result = number;

                if (number < 0)
                {
                    result = Increment.Inc(result);
                    for (int i = 0; i < number * -1; i++)
                    {
                        result = Decrement.Dec(result);
                    }
                    result = Decrement.Dec(result);
                }
                else
                {
                    result = Decrement.Dec(result);
                    for (int i = 0; i < number; i++)
                    {
                        result = Increment.Inc(result);
                    }
                    result = Increment.Inc(result);
                }

                return(NumberProcessor.Proc(result));
            }
Ejemplo n.º 2
0
            public override MethodResult <int> Handle(int i)
            {
                Context.Cache.Set("result", i);

                if (Increment2.IsNull() && Double.IsNull())
                {
                    return(Increment.Inc(i));
                }
                return(i);
            }