public async Task <Modifiable> OnSent(ITypedBuilderContext context, HttpRequestMessage request, HttpResponseMessage response) { TypedSentContext handlerContext = null; foreach (var handlerInfo in GetHandlerInfo(HandlerType.Sent)) { if (handlerContext == null) { handlerContext = ((Func <ITypedBuilderContext, HttpRequestMessage, HttpResponseMessage, TypedSentContext>)handlerInfo.InitialConstructor)(context, request, response); } else { handlerContext = ((Func <TypedSentContext, TypedSentContext>)handlerInfo.ContinuationConstructor)(handlerContext); } await handlerInfo.Handler(handlerContext); } return(handlerContext?.GetHandlerResult()); }
public virtual Task OnSent(TypedSentContext context) { return(Task.FromResult(true)); }
internal TypedSentContext(TypedSentContext context) : base(context) { }