Esempio n. 1
0
        public void Handle(PapercutClientReadyEvent @event)
        {
            _logger.Debug("{@PapercutClientReadyEvent}", @event);

            if (_httpServerEnabled)
            {
                StartHttpServer();
            }
        }
Esempio n. 2
0
        public void Handle(PapercutClientReadyEvent @event)
        {
            this._logger.Debug("{@PapercutClientReadyEvent}", @event);

            if (this._httpPort != 0)
            {
                this.StartHttpServer();
            }
        }
Esempio n. 3
0
 public void Handle(PapercutClientReadyEvent @event)
 {
     _logger.Debug("Attempting to Load Rules from {RuleFileName} on AppReady", RuleFileName);
     try
     {
         // accessing "Rules" forces the collection to be loaded
         if (Rules.Any())
         {
             _logger.Information(
                 "Loaded {RuleCount} from {RuleFileName}",
                 Rules.Count,
                 RuleFileName);
         }
     }
     catch (Exception ex)
     {
         _logger.Error(ex, "Error loading rules from file {RuleFileName}", RuleFileName);
     }
 }
        public Task HandleAsync(PapercutClientReadyEvent @event, CancellationToken token = default)
        {
            this.Logger.Debug("Attempting to Load Rules from {RuleFileName} on AppReady", this.RuleFileName);

            try
            {
                // accessing "Rules" forces the collection to be loaded
                if (this.Rules.Any())
                {
                    this.Logger.Information(
                        "Loaded {RuleCount} from {RuleFileName}",
                        this.Rules.Count,
                        this.RuleFileName);
                }
            }
            catch (Exception ex)
            {
                this.Logger.Error(ex, "Error loading rules from file {RuleFileName}", this.RuleFileName);
            }

            return(Task.CompletedTask);
        }
Esempio n. 5
0
 public void Handle(PapercutClientReadyEvent @event)
 {
     StartHttpServer();
 }
Esempio n. 6
0
        public void Handle(PapercutClientReadyEvent @event)
        {
            this._logger.Debug("{@PapercutClientReadyEvent}", @event);

            Task.Run(async() => await StartHttpServer());
        }