示例#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 AddPlugins(PipelineBatch pipelineBatch)
        {
            TelemetryActivitySettings telemetryPlugin = new TelemetryActivitySettings()
            {
                Enabled = false
            };

            pipelineBatch.AddPlugin <TelemetryActivitySettings>(telemetryPlugin);
            MultiModeSupportSettings newPlugin2 = new MultiModeSupportSettings()
            {
                SupportedModes = new List <string>()
            };

            pipelineBatch.AddPlugin <MultiModeSupportSettings>(newPlugin2);
        }