Пример #1
0
        public override MonitorWorkItem Start(ITaskExecutionContext context)
        {
            MonitorConfiguration monitorConfiguration = this._configuration.Get <MonitorConfiguration>();

            monitorConfiguration.Assert();
            return((new MonitorWorkItem(monitorConfiguration)).AddIgnoreFilter(new MessageContainsText(monitorConfiguration.IgnoreErrorsWithMessagesContaining)).AddTargetRedirect(new RedirectForMonitorTargets(monitorConfiguration.Targets)).AddMessageGroupingPatterns(monitorConfiguration.MessageGroupingPatterns));
        }
Пример #2
0
        public override MonitorWorkItem Start(ITaskExecutionContext context)
        {
            MonitorConfiguration configuration = context.TypedBag <MonitorConfiguration>(ConfigurationName);

            configuration.Assert();

            return(new MonitorWorkItem(configuration)
                   .AddIgnoreFilter(new MessageContainsText(configuration.IgnoreErrorsWithMessagesContaining))
                   .AddTargetRedirect(new RedirectForMonitorTargets(configuration.Targets))
                   .AddMessageGroupingPatterns(configuration.MessageGroupingPatterns));
        }