public ThreadLocalContext()
        {
            _lastCallRouter              = new RobustThreadLocal <ICallRouter>();
            _argumentSpecifications      = new RobustThreadLocal <IList <IArgumentSpecification> >(() => new List <IArgumentSpecification>());
            _getArgumentsForRaisingEvent = new RobustThreadLocal <Func <ICall, object[]> >();
            _currentQuery             = new RobustThreadLocal <IQuery>();
            _pendingSpecificationInfo = new RobustThreadLocal <PendingSpecificationInfo>();

            PendingSpecification = new PendingSpecificationWrapper(_pendingSpecificationInfo);
        }
예제 #2
0
        public ThreadLocalContext()
        {
            _lastCallRouter              = new RobustThreadLocal <ICallRouter?>();
            _argumentSpecifications      = new RobustThreadLocal <IList <IArgumentSpecification> >(() => new List <IArgumentSpecification>());
            _getArgumentsForRaisingEvent = new RobustThreadLocal <Func <ICall, object?[]>?>();
            _currentQuery             = new RobustThreadLocal <IQuery?>();
            _pendingSpecificationInfo = new RobustThreadLocal <PendingSpecInfoData>();
            _nextRouteFactory         = new RobustThreadLocal <Tuple <ICallRouter, Func <ISubstituteState, IRoute> >?>();

            PendingSpecification = new PendingSpecificationWrapper(_pendingSpecificationInfo);
        }
예제 #3
0
 public PendingSpecificationWrapper(RobustThreadLocal <PendingSpecificationInfo> valueHolder)
 {
     _valueHolder = valueHolder;
 }