本文整理汇总了C#中IMessageLogger.?.SendMessage方法的典型用法代码示例。如果您正苦于以下问题:C# IMessageLogger.?.SendMessage方法的具体用法?C# IMessageLogger.?.SendMessage怎么用?C# IMessageLogger.?.SendMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMessageLogger
的用法示例。
在下文中一共展示了IMessageLogger.?.SendMessage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DiscoverTests
static void DiscoverTests(IEnumerable<string> sources, IMessageLogger logger, ITestCaseDiscoverySink discoverySink, IRunSettings settings) {
var sourcesSet = new HashSet<string>(sources, StringComparer.OrdinalIgnoreCase);
var executorUri = new Uri(PythonConstants.TestExecutorUriString);
// Test list is sent to us via our run settings which we use to smuggle the
// data we have in our analysis process.
var doc = new XPathDocument(new StringReader(settings.SettingsXml));
foreach (var t in TestReader.ReadTests(doc, sourcesSet, m => {
logger?.SendMessage(TestMessageLevel.Warning, m);
})) {
var tc = new TestCase(t.FullyQualifiedName, executorUri, t.SourceFile) {
DisplayName = t.DisplayName,
LineNumber = t.LineNo,
CodeFilePath = t.FileName
};
discoverySink.SendTestCase(tc);
}
}