/// <summary> /// Initializes a new instance of the <see cref="ContentEnvelopeHandlerWithResultAndClass{TPayload, THandler, TResult}"/> class. /// </summary> /// <param name="handler">The instance to use to handle the payload.</param> public ContentEnvelopeHandlerWithResultAndClass(THandler handler) { this.handler = handler; }
private TResult Dispatch <TParam1, TParam2, TParam3, TResult>(TPayloadBase payload, string contentType, string handlerClass, TParam1 param1, TParam2 param2, TParam3 param3) { IContentHandlerWithResult <TPayloadBase, TParam1, TParam2, TParam3, TResult> handler = this.serviceProvider.GetRequiredContent <IContentHandlerWithResult <TPayloadBase, TParam1, TParam2, TParam3, TResult> >(ContentHandlerUtilities.GetHandlerContentType(contentType, handlerClass)); return(handler.Handle(payload, param1, param2, param3)); }