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
        }
Ejemplo n.º 2
0
 void RaiseEventIfSet(ICallRouter callRouter)
 {
     if (_getArgumentsForRaisingEvent.Value != null)
     {
         callRouter.SetRoute <RaiseEventRoute>(_getArgumentsForRaisingEvent.Value);
         _getArgumentsForRaisingEvent.Value = null;
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 4
0
 void RaiseEventIfSet(ICallRouter callRouter)
 {
     if (_getArgumentsForRaisingEvent.Value != null)
     {
         var routes = new RouteFactory();
         callRouter.SetRoute(x => routes.RaiseEvent(x, _getArgumentsForRaisingEvent.Value));
         _getArgumentsForRaisingEvent.Value = null;
     }
 }
Ejemplo n.º 5
0
 void RaiseEventIfSet(ICallRouter callRouter)
 {
     if (_getArgumentsForRaisingEvent.Value != null)
     {
         callRouter.SetRoute<RaiseEventRoute>(_getArgumentsForRaisingEvent.Value);
         _getArgumentsForRaisingEvent.Value = null;
     }
 }
Ejemplo n.º 6
0
 public void Do(Action <CallInfo> callbackWithArguments)
 {
     _callRouter.SetRoute <DoWhenCalledRoute>(callbackWithArguments, _matchArgs);
     _call(_substitute);
 }
Ejemplo n.º 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);
 }