Example #1
0
 public ProcessExitConfiguration Custom <TCustomHandler>()
     where TCustomHandler : class, IProcessExitHandler
 {
     this._customInstance = null;
     this._customType     = typeof(TCustomHandler);
     return(this);
 }
 public InstrumentationHelper(IProcessExitHandler processExitHandler, IRetryHelper retryHelper, IFileSystem fileSystem, ILogger logger)
 {
     processExitHandler.Add((s, e) => RestoreOriginalModules());
     _retryHelper = retryHelper;
     _fileSystem  = fileSystem;
     _logger      = logger;
 }
Example #3
0
 public ProcessExitConfiguration Custom(IProcessExitHandler customHandler)
 {
     if (customHandler == null)
     {
         throw new ArgumentNullException("customHandler");
     }
     this._customInstance = customHandler;
     this._customType     = null;
     return(this);
 }
Example #4
0
        public RequestReception(ILogger <RequestReception> logger,
                                IProcessExitHandler processExitHandler,
                                MicroServiceHost microServiceProvider)
        {
            _logger = logger;
            _MicroServiceProvider = microServiceProvider;
            _processExitHandler   = processExitHandler;
            _SSLConfiguration     = _MicroServiceProvider.ServiceProvider.GetService <SSLConfiguration>();

            var handlerTypes = typeof(RequestReception).Assembly.DefinedTypes.Where(m => m.ImplementedInterfaces.Contains(typeof(IRequestHandler)));

            foreach (var type in handlerTypes)
            {
                var handler = (IRequestHandler)microServiceProvider.ServiceProvider.GetService(type);
                _cache[handler.MatchType] = handler;
            }
        }
Example #5
0
 public InstrumentationHelper(IProcessExitHandler processExitHandler, IRetryHelper retryHelper)
 {
     processExitHandler.Add((s, e) => RestoreOriginalModules());
     _retryHelper = retryHelper;
 }