示例#1
0
        public EndpointMiddleware(RequestDelegate next, IDecompilationProvider decompilationProvider, ILoggerFactory loggerFactory)
        {
            _next   = next;
            _logger = loggerFactory.CreateLogger <EndpointMiddleware>();
            var types = typeof(EndpointMiddleware).Assembly.DefinedTypes
                        .Where(type => !type.IsAbstract && typeof(BaseMiddleware).GetTypeInfo().IsAssignableFrom(type))
                        .Select(t => (BaseMiddleware)Activator.CreateInstance(t, next, decompilationProvider));

            _endpointHandlers = types.ToDictionary(
                x => x.EndpointName,
                endpoint => endpoint,
                StringComparer.OrdinalIgnoreCase
                );

            _endpoints = new HashSet <string>(
                _endpointHandlers.Keys,
                StringComparer.OrdinalIgnoreCase
                );
        }
示例#2
0
 public BaseMiddleware(RequestDelegate next, IDecompilationProvider decompilationProvider)
 {
     _next = next;
     _decompilationProvider = decompilationProvider;
 }
示例#3
0
 public DecompileMemberMiddleware(RequestDelegate next, IDecompilationProvider decompilationProvider)
     : base(next, decompilationProvider)
 {
 }
示例#4
0
 public AddAssemblyMiddleware(RequestDelegate next, IDecompilationProvider decompilationProvider)
     : base(next, decompilationProvider)
 {
 }
 public ListNamespacesMiddleware(RequestDelegate next, IDecompilationProvider decompilationProvider)
     : base(next, decompilationProvider)
 {
 }