当前位置: 首页>>代码示例>>C#>>正文


C# SourceLevels类代码示例

本文整理汇总了C#中SourceLevels的典型用法代码示例。如果您正苦于以下问题:C# SourceLevels类的具体用法?C# SourceLevels怎么用?C# SourceLevels使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SourceLevels类属于命名空间,在下文中一共展示了SourceLevels类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LogSource

		/// <summary>
		/// Initializes a new instance of the <see cref="LogSource"/> class with a name, a collection of <see cref="TraceListener"/>s and a level.
		/// </summary>
		/// <param name="name">The name for the instance.</param>
		/// <param name="traceListeners">The collection of <see cref="TraceListener"/>s.</param>
		/// <param name="level">The <see cref="SourceLevels"/> value.</param>
		public LogSource(string name, List<TraceListener> traceListeners, SourceLevels level)
		{
			this.name = name;
			this.traceListeners = traceListeners;
			this.level = level;
			this.instrumentationProvider = new LoggingInstrumentationProvider();
		}
开发者ID:wuyingyou,项目名称:uniframework,代码行数:13,代码来源:LogSource.cs

示例2: TraceManager

		internal TraceManager()
		{
			this.defaultLogFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\Microsoft\\Care Suite\\Windows Device Recovery Tool\\Traces\\";
			this.currentTracingLevel = SourceLevels.All;
			this.Tracers = new List<IThreadSafeTracer>();
			AppDomain.CurrentDomain.ProcessExit += new EventHandler(this.OnCurrentDomainProcessExit);
		}
开发者ID:kissstudio,项目名称:Topawes,代码行数:7,代码来源:TraceManager.cs

示例3: TraceSourceInfo

		internal TraceSourceInfo (string name, SourceLevels levels, TraceImplSettings settings)
		{
			this.name = name;
			this.levels = levels;
			this.listeners = new TraceListenerCollection (false);
			this.listeners.Add (new DefaultTraceListener(), settings);
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:TraceSourceInfo.cs

示例4: LogLevel

 LogLevel(string name, int index, SourceLevels sourceLevel, TraceEventType traceEventType)
 {
     Name = name;
     _index = index;
     SourceLevel = sourceLevel;
     TraceEventType = traceEventType;
 }
开发者ID:kotvisbj,项目名称:MassTransit,代码行数:7,代码来源:LogLevel.cs

示例5: LogSourceData

 /// <summary>
 /// Initializes a new instance of the <see cref="LogSourceData"/> class with the specified parameters.
 /// </summary>
 /// <param name="name">The name for the log source.</param>
 /// <param name="level">The level for the log source.</param>
 /// <param name="autoFlush"><see langword="true"/> to enable auto-flush; otherwise, <see langword="false"/>.</param>
 /// <param name="traceListeners">One or more <see cref="TraceListener"/> objects.</param>
 public LogSourceData(string name, SourceLevels level, bool autoFlush, params TraceListener[] traceListeners)
 {
     this.Name = name;
     this.Level = level;
     this.AutoFlush = autoFlush;
     this.Listeners = traceListeners.ToList();
 }
开发者ID:Brar,项目名称:entlib,代码行数:14,代码来源:LogSourceData.cs

示例6: TraceSourceSetting

        /// <summary>
        /// Initializes a new instance of the <see cref="TraceSourceSetting"/> class.
        /// </summary>
        /// <param name="sourceName">Name of the source.</param>
        /// <param name="loggingLevel">The logging level.</param>
        public TraceSourceSetting(string sourceName, SourceLevels loggingLevel)
        {
            Guard.NotNullOrEmpty(() => sourceName, sourceName);

            this.SourceName = sourceName;
            this.LoggingLevel = loggingLevel;
        }
开发者ID:NuPattern,项目名称:NuPattern,代码行数:12,代码来源:TraceSourceSetting.cs

示例7: TraceSourceInfo

		internal TraceSourceInfo (string name, SourceLevels levels, TraceImplSettings settings)
		{
			this.name = name;
			this.levels = levels;
			this.listeners = new TraceListenerCollection ();
			this.listeners.Add (new DefaultTraceListener() { IndentSize = settings.IndentSize });
		}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:TraceSourceInfo.cs

示例8: LogSource

 /// <summary>
 /// Initializes a new instance of the <see cref="LogSource"/> class with a name, a collection of <see cref="TraceListener"/>s, a level and the auto flush.
 /// </summary>
 /// <param name="name">The name for the instance.</param>
 /// <param name="traceListeners">The collection of <see cref="TraceListener"/>s.</param>
 /// <param name="level">The <see cref="SourceLevels"/> value.</param>
 /// <param name="autoFlush">If Flush should be called on the Listeners after every write.</param>
 public LogSource(string name, IEnumerable<TraceListener> traceListeners, SourceLevels level, bool autoFlush)
 {
     this.name = name;
     this.traceListeners = new List<TraceListener>(traceListeners);
     this.level = level;
     this.autoFlush = autoFlush;
 }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:14,代码来源:LogSource.cs

示例9: AssertNoBindingErrorsTraceListener

		private AssertNoBindingErrorsTraceListener(SourceLevels level)
		{

			WindowsRegistryAssert.HasDword(@"Software\Microsoft\Tracing\WPF", "ManagedTracing",1,"You need to add this key to your registry for Wpf report Binding Errors. \n" + RegEditText);
			PresentationTraceSources.DataBindingSource.Listeners.Add(this);
			PresentationTraceSources.DataBindingSource.Switch.Level = level;
		}
开发者ID:manuc66,项目名称:ApprovalTests.Net,代码行数:7,代码来源:AssertNoBindingErrorsTraceListener.cs

示例10: LoggingLevel

 LoggingLevel(string name, int index, SourceLevels sourceLevel, TraceEventType traceEventType)
 {
     _name = name;
     _index = index;
     _sourceLevel = sourceLevel;
     _traceEventType = traceEventType;
 }
开发者ID:CharlieBP,项目名称:Topshelf,代码行数:7,代码来源:LoggingLevel.cs

示例11: SetTraceLevel

 public static void SetTraceLevel(LogCategory category, SourceLevels sourceLevel)
 {
     var sourceSwitch = new SourceSwitch(string.Format(CultureInfo.InvariantCulture, "MigSharp.{0}.Switch", category))
     {
         Level = sourceLevel
     };
     Sources[category].Switch = sourceSwitch;
 }
开发者ID:mediocreguy,项目名称:MigSharp,代码行数:8,代码来源:Log.cs

示例12: GetAllEventsSource

        private EntLib.TraceSourceData GetAllEventsSource(SourceLevels level)
        {
            var source = new EntLib.TraceSourceData();
            source.DefaultLevel = level;
            this.AddEventLogTraceListenerReference(source);

            return source;
        }
开发者ID:paulkearney,项目名称:brnkly,代码行数:8,代码来源:LoggingConfigurationSourceFactory.cs

示例13: WriteLine

 public void WriteLine(SourceLevels level, string message, string category)
 {
     Console.Out.Write(String.Format("{0} {1}", LevelToString(level), category));
     Console.Out.Write(": ");
     Console.Out.Write(message);
     Console.Out.Write(Environment.NewLine);
     Console.Out.Flush();
 }
开发者ID:jonfunkhouser,项目名称:couchbase-lite-net,代码行数:8,代码来源:ColorConsoleLogger.cs

示例14: LogManager

        /// <summary>
        /// Initializes the configured switches for <see cref="LogManager"/>.
        /// </summary>
        /// <param name="diagnosticsSection">The system.diagnostics configuration section.</param>
        internal LogManager(ConfigurationSection diagnosticsSection)
        {
            SourceSwitch defaultSwitch;

            configuredSources = GetConfiguredSources(diagnosticsSection);
            configuredSwitches = GetConfiguredSwitches(diagnosticsSection);
            defaultLevel = configuredSwitches.TryGetValue("default", out defaultSwitch) ? defaultSwitch.Level : SourceLevels.Warning;
        }
开发者ID:SparkSoftware,项目名称:infrastructure,代码行数:12,代码来源:LogManager.cs

示例15: PiiTraceSource

        internal PiiTraceSource(string name, string eventSourceName, SourceLevels levels)
            : base(name, levels)
        {
#pragma warning disable 618
            Fx.Assert(!String.IsNullOrEmpty(eventSourceName), "Event log source name must be valid");
#pragma warning restore 618
            this.eventSourceName = eventSourceName;
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:8,代码来源:PiiTraceSource.cs


注:本文中的SourceLevels类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。