protected void Request <TRequest, TResponse>(Expression <Func <Request <TRequest, TResponse> > > propertyExpression, Action <RequestConfigurator <T, TRequest, TResponse> > configureRequest) where TRequest : class where TResponse : class { var configurator = new StateMachineRequestConfigurator <T, TRequest, TResponse>(); configureRequest(configurator); Request(propertyExpression, configurator.Settings); }
public static StateMachineModifier <TInstance> Request <TInstance, TRequest, TResponse>(this StateMachineModifier <TInstance> modifier, Action <RequestConfigurator <TestState, TRequest, TResponse> > configureRequest, string requestName, out Request <TRequest, TResponse> request) where TInstance : class where TRequest : class where TResponse : class { var configurator = new StateMachineRequestConfigurator <TestState, TRequest, TResponse>(); configureRequest(configurator); modifier.Request(requestName, configurator.Settings, out request); return(modifier); }