コード例 #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);
        }
コード例 #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);
 }
コード例 #3
0
 /// <summary>
 /// Synonym for AppendRoutingToEventPipeline.
 /// </summary>
 public RoutableOptions <TContext, TRequest, TResponse> AddRouting(RoutableEventPipelines eventPipeline, Routing <TContext, TRequest, TResponse> routing) => AppendRoutingToEventPipeline(eventPipeline, routing);