示例#1
0
        public static MathContext Create()
        {
            if (_perThreadStack == null)
            {
                _perThreadStack = new Stack <MathContext>();
                _perThreadStack.Push(_root);
            }
            MathContext ctx = new MathContext(_perThreadStack.Peek(), _perThreadStack);

            _perThreadStack.Push(ctx);
            return(ctx);
        }
 private MathContext(MathContext parent, Stack<MathContext> stack)
 {
     _parent = parent;
     _localStack = stack;
     _iid = Guid.NewGuid();
 }
 public static MathContext Create()
 {
     if(_perThreadStack == null)
     {
         _perThreadStack = new Stack<MathContext>();
         _perThreadStack.Push(_root);
     }
     MathContext ctx = new MathContext(_perThreadStack.Peek(), _perThreadStack);
     _perThreadStack.Push(ctx);
     return ctx;
 }
示例#4
0
 private MathContext(MathContext parent, Stack <MathContext> stack)
 {
     _parent     = parent;
     _localStack = stack;
     _iid        = Guid.NewGuid();
 }