/// <summary> /// Prepend a routing instance to handle requests to the specified pipeline. /// </summary> /// <seealso cref="RoutableEventPipelines"/> public RoutableOptions <TContext, TRequest, TResponse> PrependRoutingToEventPipeline(RoutableEventPipelines eventPipeline, Routing <TContext, TRequest, TResponse> routing) { var list = GetEventPipelineRouting(eventPipeline); lock (list) { list.Insert(0, routing); } return(this); }
/// <summary> /// Set handler for unhandled errors. /// </summary> public RoutableOptions <TContext, TRequest, TResponse> OnError(Routing <TContext, TRequest, TResponse> routing) { AppendRoutingToEventPipeline(RoutableEventPipelines.RouteEventError, routing); return(this); }
/// <summary> /// Synonym for AppendRoutingToEventPipeline. /// </summary> public RoutableOptions <TContext, TRequest, TResponse> AddRouting(RoutableEventPipelines eventPipeline, Routing <TContext, TRequest, TResponse> routing) => AppendRoutingToEventPipeline(eventPipeline, routing);