public void Handle(PapercutClientReadyEvent @event) { _logger.Debug("{@PapercutClientReadyEvent}", @event); if (_httpServerEnabled) { StartHttpServer(); } }
public void Handle(PapercutClientReadyEvent @event) { this._logger.Debug("{@PapercutClientReadyEvent}", @event); if (this._httpPort != 0) { this.StartHttpServer(); } }
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); }
public void Handle(PapercutClientReadyEvent @event) { StartHttpServer(); }
public void Handle(PapercutClientReadyEvent @event) { this._logger.Debug("{@PapercutClientReadyEvent}", @event); Task.Run(async() => await StartHttpServer()); }