Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Set handler for unhandled errors.
 /// </summary>
 public RoutableOptions <TContext, TRequest, TResponse> OnError(Routing <TContext, TRequest, TResponse> routing)
 {
     AppendRoutingToEventPipeline(RoutableEventPipelines.RouteEventError, routing);
     return(this);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Synonym for AppendRoutingToEventPipeline.
 /// </summary>
 public RoutableOptions <TContext, TRequest, TResponse> AddRouting(RoutableEventPipelines eventPipeline, Routing <TContext, TRequest, TResponse> routing) => AppendRoutingToEventPipeline(eventPipeline, routing);