本文整理汇总了C#中TestContext.LogDebug方法的典型用法代码示例。如果您正苦于以下问题:C# TestContext.LogDebug方法的具体用法?C# TestContext.LogDebug怎么用?C# TestContext.LogDebug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestContext
的用法示例。
在下文中一共展示了TestContext.LogDebug方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
protected override async Task<MonoSslStream> Start (TestContext ctx, Stream stream, MSI.MonoTlsSettings settings, CancellationToken cancellationToken)
{
ctx.LogMessage ("Connected.");
var targetHost = Parameters.TargetHost ?? EndPoint.HostName ?? EndPoint.Address;
ctx.LogDebug (1, "Using '{0}' as target host.", targetHost);
var client = await ConnectionProvider.CreateClientStreamAsync (stream, targetHost, Parameters, settings, cancellationToken);
ctx.LogMessage ("Successfully authenticated client.");
return client;
}
示例2: LogDebug
protected void LogDebug (TestContext ctx, int level, string message, params object[] args)
{
var sb = new StringBuilder ();
sb.AppendFormat ("[{0}]: {1}", GetType ().Name, message);
if (args.Length > 0)
sb.Append (" -");
foreach (var arg in args) {
sb.Append (" ");
sb.Append (arg);
}
var formatted = sb.ToString ();
ctx.LogDebug (level, formatted);
}
示例3: SelectCiphers
protected void SelectCiphers (TestContext ctx, ICollection<CipherSuiteCode> ciphers)
{
if (ciphers == null)
return;
ctx.LogDebug (2, "Select Ciphers: {0}", string.Join (":", ciphers));
openssl.SetCipherList (ciphers);
}