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


C# Verbosity类代码示例

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


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

示例1: Write

 public void Write(Verbosity verbosity, LogLevel level, string format, params object[] args)
 {
     if (verbosity > Verbosity)
     {
         return;
     }
     lock (_lock)
     {
         try
         {
             var palette = _palettes[level];
             var tokens = FormatParser.Parse(format);
             foreach (var token in tokens)
             {
                 SetPalette(token, palette);
                 _console.Write("{0}", token.Render(args));
             }
         }
         finally
         {
             _console.ResetColor();
             _console.WriteLine();
         }
     }
 }
开发者ID:SimpleGitVersion,项目名称:CodeCake,代码行数:25,代码来源:CakeBuildLog.cs

示例2: CreateUser

 public static string CreateUser(Geocode geocode, bool debugEnabled, Verbosity verbosity, List<string> fields)
 {
     var url = new Url(UserServiceBase);
     url.Append("create");
     HandleDefaults(url, geocode, debugEnabled, verbosity, fields);
     return url.ToString();
 }
开发者ID:beer-bahadur,项目名称:appacitive-dotnet-sdk,代码行数:7,代码来源:Urls.cs

示例3: WriteInfo

        public static void WriteInfo(Verbosity vLevel, string message)
        {
            if(vLevel < verbosityLevel)
                return;

            infoLog.WriteLine(DateTime.Now + ":" + message);
        }
开发者ID:Khazuar,项目名称:BOS,代码行数:7,代码来源:Log.cs

示例4: Init

 public static void Init(Verbosity verbosity, TextWriter ilog, TextWriter glog, TextWriter elog)
 {
     verbosityLevel = verbosity;
     infoLog = ilog;
     gameLog = glog;
     errorLog = elog;
 }
开发者ID:Khazuar,项目名称:BOS,代码行数:7,代码来源:Log.cs

示例5: CakeBuildLog

 public CakeBuildLog(IConsole console, Verbosity verbosity = Verbosity.Normal)
 {
     _console = console;
     _lock = new object();
     _palettes = CreatePalette();
     Verbosity = verbosity;
 }
开发者ID:SimpleGitVersion,项目名称:CodeCake,代码行数:7,代码来源:CakeBuildLog.cs

示例6: Logger

 public Logger(Stream stream, Verbosity? verbosity = null)
     : this(verbosity)
 {
     if (!Attach(stream)) {
             Debug("Failed to attach stream for logging.");
         }
 }
开发者ID:XerShades-Archive,项目名称:Reoria-LotD-Attempt-1,代码行数:7,代码来源:Logger.cs

示例7: SetStatusText

 internal void SetStatusText( Verbosity verbosity, string text )
 {
     StatusUpdate del = delegate
     {
         this.toolStripStatusLabel1.Text = text;
         switch( verbosity )
         {
             case Verbosity.Critical:
                 this.toolStripStatusLabel1.ForeColor = Color.Red;
                 break;
             default:
             case Verbosity.Normal:
                 this.toolStripStatusLabel1.ForeColor = SystemColors.ControlText;
                 break;
             case Verbosity.Verbose:
                 this.toolStripStatusLabel1.ForeColor = Color.Green;
                 break;
             case Verbosity.Everything:
                 this.toolStripStatusLabel1.ForeColor = Color.Blue;
                 break;
         }
     };
     if( this.InvokeRequired == true )
         this.Invoke( del, verbosity, text );
     else
         del( verbosity, text );
 }
开发者ID:BradFuller,项目名称:pspplayer,代码行数:27,代码来源:DebugView.cs

示例8: Log

 public static void Log(Verbosity verbosity,string format, params object[] arg0)
 {
     if ((int)verbosity >= (int)CurrentVerbosity)
     {
         Console.WriteLine(String.Format("{0}: ", verbosity.ToString()) + format, arg0);
     }
 }
开发者ID:RobertFrydenlund,项目名称:SpotifyPlugin,代码行数:7,代码来源:Out.cs

示例9: LogEntry

 public LogEntry(string message, Verbosity verbosity = Verbosity.Info)
     : this()
 {
     VerbosityLevel = verbosity;
     Timestamp = DateTime.Now;
     Message = message ?? string.Empty;
 }
开发者ID:nick-randal,项目名称:UsefulCSharp,代码行数:7,代码来源:LogEntry.cs

示例10: CreateArticle

 public static string CreateArticle(string type, Geocode geocode, bool debugEnabled, Verbosity verbosity, List<string> fields)
 {
     var url = new Url(ArticleServiceBase);
     url.Append(type);
     HandleDefaults(url, geocode, debugEnabled, verbosity, fields);
     return url.ToString();
 }
开发者ID:neilunadkat,项目名称:appacitive-dotnet-sdk,代码行数:7,代码来源:Urls.cs

示例11: LogMessage

 public void LogMessage(string message, Severity severity, Verbosity verbosity)
 {
     foreach (ILogWriter logWriter in this.writers)
     {
         logWriter.Log(severity, verbosity, message);
     }
 }
开发者ID:EmmaZhu,项目名称:azure-sdk-tools,代码行数:7,代码来源:Logger.cs

示例12: WriteLine

 public void WriteLine(Verbosity verbosity, string format, params object[] args)
 {
     if (Console.KeyAvailable)
     {
         var ki = Console.ReadKey(true);
         switch (ki.Key)
         {
             case ConsoleKey.D0:
             case ConsoleKey.D1:
             case ConsoleKey.D2:
             case ConsoleKey.D3:
             case ConsoleKey.D4:
             case ConsoleKey.D5:
                 var nv = (Verbosity)(ki.Key - ConsoleKey.D0);
                 Verbosity = nv;
                 Console.Clear();
                 break;
             default:
                 break;
         }
     }
     if (Verbosity >= verbosity)
         Console.WriteLine(String.Format(String.Format("{0}: ", verbosity) + format, args));
     if (LogfileVerbosity >= verbosity)
         WriteLogFile(String.Format(String.Format("{0}: ", verbosity) + format, args), false);
 }
开发者ID:belucha,项目名称:hashlinkcopy,代码行数:26,代码来源:Logger.cs

示例13: DeleteArticle

 public static string DeleteArticle(string type, string id, bool deleteConnections, Geocode location, bool enableDebug, Verbosity verbosity, List<string> fields)
 {
     var url = new Url(ArticleServiceBase).Append(type).Append(id);
     if (deleteConnections == true)
         url.QueryString["deleteconnections"] = "true";
     HandleDefaults(url, location, enableDebug, verbosity, fields);
     return url.ToString();
 }
开发者ID:neilunadkat,项目名称:appacitive-dotnet-sdk,代码行数:8,代码来源:Urls.cs

示例14: UpdateArticle

 public static string UpdateArticle(string type, string id, int revision, Geocode geocode, bool enableDebug, Verbosity verbosity, List<string> fields)
 {
     var url = new Url(ArticleServiceBase).Append(type).Append(id);
     if (revision > 0)
         url.QueryString["revision"] = revision.ToString();
     HandleDefaults(url, geocode, enableDebug, verbosity, fields);
     return url.ToString();
 }
开发者ID:neilunadkat,项目名称:appacitive-dotnet-sdk,代码行数:8,代码来源:Urls.cs

示例15: WriteLine

 public static void WriteLine(string value = null, Verbosity? minimumVerbosity = null)
 {
     if (minimumVerbosity == null || _verbosity >= minimumVerbosity)
     {
         _hasWritten = true;
         System.Console.WriteLine(value);
     }
 }
开发者ID:Rashed-Hoque,项目名称:IdSharp,代码行数:8,代码来源:Program.cs


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