Esempio n. 1
0
        public void ApplySettings(PipelineBatch pipelineBatch)
        {
            var telemetryPlugin = new TelemetryActivitySettings
            {
                Enabled = TelemetryEnabled
            };

            pipelineBatch.AddPlugin(telemetryPlugin);

            var supportedModesPlugin2 = new MultiModeSupportSettings
            {
                SupportedModes = new List <string>()
            };

            pipelineBatch.AddPlugin(supportedModesPlugin2);

            var pipelineBatchSummary = new PipelineBatchSummary()
            {
                IncludeStackTraceForExceptions = IsIncludeStackTraceForExceptions
            };

            foreach (var logLevel in LogLevels)
            {
                pipelineBatchSummary.LogLevels.Add(logLevel);
            }
            pipelineBatch.AddPlugin(pipelineBatchSummary);

            SitecoreItemSettings newPlugin = new SitecoreItemSettings()
            {
                ItemId = Guid.Parse(pipelineBatch.Identifier)
            };

            pipelineBatch.AddPlugin(newPlugin);
            pipelineBatch.AddPlugin(VerificationLogSettings);
        }
 protected static void AddLogLevel(PipelineBatchSummary taskSettings)
 {
     taskSettings.LogLevels.Add(LogLevel.Debug);
     taskSettings.LogLevels.Add(LogLevel.Error);
     taskSettings.LogLevels.Add(LogLevel.Fatal);
     taskSettings.LogLevels.Add(LogLevel.Info);
     taskSettings.LogLevels.Add(LogLevel.Warn);
 }
        protected static void AddRequiredPlugins(PipelineBatch pipelineBatch)
        {
            PipelineBatchSummary pipelineBatchSummary = new PipelineBatchSummary()
            {
                IncludeStackTraceForExceptions = true
            };

            AddLogLevel(pipelineBatchSummary);
            pipelineBatch.AddPlugin <PipelineBatchSummary>(pipelineBatchSummary);
            SitecoreItemSettings newPlugin = new SitecoreItemSettings()
            {
                ItemId = Guid.Parse(pipelineBatch.Identifier)
            };

            pipelineBatch.AddPlugin(newPlugin);
        }