本文整理汇总了C#中Verbosity类的典型用法代码示例。如果您正苦于以下问题:C# Verbosity类的具体用法?C# Verbosity怎么用?C# Verbosity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Verbosity类属于命名空间,在下文中一共展示了Verbosity类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: WriteLine
public void WriteLine( Verbosity verbosity, Feature feature, string value )
{
// if log to vs
if( false )
{
Debug.WriteLine( string.Format( "{0}: {1}", feature, value ) );
}
this.logControl.AddLine( verbosity, feature, value );
}
开发者ID:BradFuller,项目名称:pspplayer,代码行数:9,代码来源:LogTool.cs
示例17: ApiRequest
protected ApiRequest(string sessionToken, Environment environment, string userToken = null, Geocode location = null, bool enableDebugging = false, Verbosity verbosity = Verbosity.Info)
{
this.SessionToken = sessionToken;
this.CurrentLocation = location;
this.Verbosity = verbosity;
this.UserToken = userToken;
this.Environment = environment;
this.Fields = new List<string>();
}
开发者ID:beer-bahadur,项目名称:appacitive-dotnet-sdk,代码行数:9,代码来源:ApiRequest.cs
示例18: UpdateUserRequest
public UpdateUserRequest(string sessionToken, Environment environment, string userToken = null, Geocode location = null, bool enableDebugging = false, Verbosity verbosity = Verbosity.Info) :
base(sessionToken, environment, userToken, location, enableDebugging, verbosity)
{
this.PropertyUpdates = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
this.AttributeUpdates = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
this.AddedTags = new List<string>();
this.RemovedTags = new List<string>();
this.Revision = 0;
}
开发者ID:beer-bahadur,项目名称:appacitive-dotnet-sdk,代码行数:9,代码来源:UpdateUserRequest.cs
示例19: RunnerBase
public RunnerBase(Verbosity verbosity, Formats formats, TextWriter writer, CancellationToken cancellationToken, Progress<Indicator> progress, SemaphoreSlim semaphore)
{
this.verbosity = verbosity;
this.formats = formats;
this.cancellationToken = cancellationToken;
this.writer = writer;
this.progress = progress;
this.handler = new EventHandler<Indicator>((_, v) => WriteProgress(v));
this.semaphore = semaphore;
}
开发者ID:AMDL,项目名称:amdl2maml,代码行数:10,代码来源:RunnerBase.cs
示例20: ApiRequest
protected ApiRequest(string apiKey, string sessionToken, Environment environment, string userToken = null, Geocode location = null, bool enableDebugging = false, Verbosity verbosity = Verbosity.Info)
{
this.ApiKey = apiKey;
this.UseApiSession = string.IsNullOrWhiteSpace(sessionToken) ? false : true;
this.SessionToken = sessionToken;
this.CurrentLocation = location;
this.Verbosity = verbosity;
this.UserToken = userToken;
this.Environment = environment;
this.Fields = new List<string>();
}
开发者ID:neilunadkat,项目名称:appacitive-dotnet-sdk,代码行数:11,代码来源:ApiRequest.cs
注:本文中的Verbosity类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论