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 }
void RaiseEventIfSet(ICallRouter callRouter) { if (_getArgumentsForRaisingEvent.Value != null) { callRouter.SetRoute <RaiseEventRoute>(_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; } }
void RaiseEventIfSet(ICallRouter callRouter) { if (_getArgumentsForRaisingEvent.Value != null) { callRouter.SetRoute<RaiseEventRoute>(_getArgumentsForRaisingEvent.Value); _getArgumentsForRaisingEvent.Value = null; } }
public void Do(Action <CallInfo> callbackWithArguments) { _callRouter.SetRoute <DoWhenCalledRoute>(callbackWithArguments, _matchArgs); _call(_substitute); }
/// <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); }