public SendAfterEndpointEventConfiguration Returns <T1, T2, T3, T4, T5, T6, T7, T8>(Func <T1, T2, T3, T4, T5, T6, T7, T8, R> returnValueProducer) { var sequence = new TriggeredMessageSequence(); var inspector = new RouteInvocationTriggeringSequenceOfEvents(_route, _matcher, sequence); _route.AddReturn(inspector, new ProduceDelegateReturnValue(returnValueProducer, new MapRequestToDelegateHeuristic(_route.Route, returnValueProducer))); return(new SendAfterEndpointEventConfiguration(sequence, _service)); }
public SendAfterEndpointEventConfiguration Returns(R returnValue) { var sequence = new TriggeredMessageSequence(); var inspector = new RouteInvocationTriggeringSequenceOfEvents(_route, _matcher, sequence); _route.AddReturn(inspector, new ProduceStaticReturnValue(returnValue)); return(new SendAfterEndpointEventConfiguration(sequence, _service)); }
public ReturnFromPostInvocationConfiguration With(IPostInvocationConfiguration configuration) { var sequence = new TriggeredMessageSequence(); var inspector = new RouteInvocationTriggeringSequenceOfEvents(_route, configuration.CreateInvocationInspector(_route), sequence); var returnValueProxy = new NullOrInvocationReturnValueProducer(); _route.AddReturn(inspector, returnValueProxy); return new ReturnFromPostInvocationConfiguration(sequence, _service, returnValueProxy); }
public ReturnFromPostInvocationConfiguration With(IPostInvocationConfiguration configuration) { var sequence = new TriggeredMessageSequence(); var inspector = new RouteInvocationTriggeringSequenceOfEvents(_route, configuration.CreateInvocationInspector(_route), sequence); var returnValueProxy = new NullOrInvocationReturnValueProducer(); _route.AddReturn(inspector, returnValueProxy); return(new ReturnFromPostInvocationConfiguration(sequence, _service, returnValueProxy)); }