public void SetRoute(Func <ISubstituteState, IRoute> getRoute)
        {
            Trace($"SetRoute(routeFactory: {getRoute.DiagName()})");
#pragma warning disable 618 // Just proxy it.
            _impl.SetRoute(getRoute);
#pragma warning restore 618
        }
Пример #2
0
 void RaiseEventIfSet(ICallRouter callRouter)
 {
     if (_getArgumentsForRaisingEvent.Value != null)
     {
         callRouter.SetRoute <RaiseEventRoute>(_getArgumentsForRaisingEvent.Value);
         _getArgumentsForRaisingEvent.Value = null;
     }
 }
Пример #3
0
 void RaiseEventIfSet(ICallRouter callRouter)
 {
     if (_getArgumentsForRaisingEvent.Value != null)
     {
         var routes = new RouteFactory();
         callRouter.SetRoute(x => routes.RaiseEvent(x, _getArgumentsForRaisingEvent.Value));
         _getArgumentsForRaisingEvent.Value = null;
     }
 }
 void RaiseEventIfSet(ICallRouter callRouter)
 {
     if (_getArgumentsForRaisingEvent.Value != null)
     {
         var routes = new RouteFactory();
         callRouter.SetRoute(x => routes.RaiseEvent(x, _getArgumentsForRaisingEvent.Value));
         _getArgumentsForRaisingEvent.Value = null;
     }
 }
Пример #5
0
 void RaiseEventIfSet(ICallRouter callRouter)
 {
     if (_getArgumentsForRaisingEvent.Value != null)
     {
         callRouter.SetRoute<RaiseEventRoute>(_getArgumentsForRaisingEvent.Value);
         _getArgumentsForRaisingEvent.Value = null;
     }
 }
Пример #6
0
 public void Do(Action <CallInfo> callbackWithArguments)
 {
     _callRouter.SetRoute <DoWhenCalledRoute>(callbackWithArguments, _matchArgs);
     _call(_substitute);
 }
Пример #7
0
 /// <summary>
 /// Perform this action when called.
 /// </summary>
 /// <param name="callbackWithArguments"></param>
 public void Do(Action <CallInfo> callbackWithArguments)
 {
     _callRouter.SetRoute(x => _routeFactory.DoWhenCalled(x, callbackWithArguments, _matchArgs));
     _call(_substitute);
 }