Exemple #1
0
        /// <summary>
        /// Builds the <see cref="Pipeline"/> for use with <see cref="Server"/>
        /// </summary>
        /// <returns></returns>
        public Pipeline Build()
        {
            PipelineDelagate pipeline = ExecuteMainHandler;

            middlewares.Reverse();
            foreach (var middleware in middlewares)
            {
                pipeline = middleware(pipeline);
            }
            return(new Pipeline(pipeline));
        }
        private PipelineDelagate WrapClass <T>(PipelineDelagate next, params object[] args)
        {
            var ctorArgs = new object[args.Length + 1];

            ctorArgs[0] = next;
            Array.Copy(args, 0, ctorArgs, 1, args.Length);
            var        type     = typeof(T);
            var        instance = Activator.CreateInstance(type, ctorArgs);
            MethodInfo method   = type.GetMethod("Invoke");

            return((PipelineDelagate)method.CreateDelegate(typeof(PipelineDelagate), instance));
        }
 internal Pipeline(PipelineDelagate middlewareChain)
 {
     processChain = middlewareChain;
 }
 public PolicyMiddleware(PipelineDelagate next, PolicyMiddlewareOptions options)
 {
     _next    = next;
     _options = options;
 }
 public PolicyMiddleware(PipelineDelagate next)
 {
     _next = next;
 }
Exemple #6
0
 public TimeoutMiddleware(PipelineDelagate next, ILogger <TimeoutMiddleware> logger, TimeoutMiddlewareOptions options)
 {
     _next    = next;
     _logger  = logger;
     _options = options;
 }
Exemple #7
0
 public TimeoutMiddleware(PipelineDelagate next, ILogger <TimeoutMiddleware> logger)
 {
     _next   = next;
     _logger = logger;
 }
Exemple #8
0
 public StartInit(PipelineDelagate next)
 {
     _next = next;
 }
 public FlowCommonMarkToHtml(PipelineDelagate next)
 {
     _next = next;
 }
Exemple #10
0
 public LoggingMiddleware(PipelineDelagate next)
 {
     _next = next;
 }
Exemple #11
0
 public StartProcess(PipelineDelagate next, Pipeline pipeline)
 {
     _next          = next;
     _item_pipeline = pipeline;
 }
Exemple #12
0
 public LoggingMiddleware(PipelineDelagate next, ILogger <LoggingMiddleware> logger)
 {
     _next   = next;
     _logger = logger;
 }
Exemple #13
0
 public StartPlugin(PipelineDelagate next)
 {
     _next = next;
 }
Exemple #14
0
 public TimerMiddleware(PipelineDelagate next)
 {
     _next = next;
 }
 public TimerMiddleware(PipelineDelagate next, ILogger <CodeBuilder> logger)
 {
     _next   = next;
     _logger = logger;
 }
Exemple #16
0
 public FlowTemplateProcessor(PipelineDelagate next)
 {
     _next = next;
 }
Exemple #17
0
 public ExceptionMiddleware(PipelineDelagate next)
 {
     _next = next;
 }
Exemple #18
0
 public TimeoutMiddleware(PipelineDelagate next, TimeoutMiddlewareOptions options)
 {
     _next    = next;
     _options = options;
 }