/// <summary> /// Initializes new instance of <see cref="LazyController"/>. /// </summary> /// <param name="convertor">Instance of <see cref="IResponseConversionProvider{TConvertedResponse}"/>.</param> /// <param name="logger"></param> protected LazyController(IResponseConversionProvider <IHttpActionResult> convertor, ILogProvider logger) { Dispatcher = ServiceDispatcherFactory <IHttpActionResult> .Create( convertor ?? new ResponseConversionProvider(this), logger ?? new NullLogProvider()); }
/// <summary> /// Initializes new instance of <see cref="LazyController"/>. /// </summary> /// <param name="convertor">Instance of <see cref="IResponseConversionProvider{TConvertedResponse}"/>.</param> protected LazyController(IResponseConversionProvider <IHttpActionResult> convertor) : this(convertor, null) { }
public static IServiceDispatcher <T> Create(IResponseConversionProvider <T> convertor) { return(new ServiceDispatcher <T>(convertor.ConvertResponse)); }