Class MessageSinkMessageExtensions
Extension methods for IMessageSinkMessage.
public static class MessageSinkMessageExtensions
- Inheritance
-
MessageSinkMessageExtensions
- Inherited Members
Methods
DispatchWhen<TMessage>(IMessageSinkMessage, MessageHandler<TMessage>?)
Handles a message of a specific type by testing it for the type, as well as verifying that there is a registered callback.
public static bool DispatchWhen<TMessage>(this IMessageSinkMessage message, MessageHandler<TMessage>? callback) where TMessage : IMessageSinkMessage
Parameters
messageIMessageSinkMessageThe message to dispatch.
callbackMessageHandler<TMessage>The callback to dispatch the message to.
Returns
- bool
Returns
trueif processing should continue;falseotherwise.
Type Parameters
TMessage
ToTestCaseDiscovered(ITestCase)
Converts an instance of ITestCase into ITestCaseDiscovered for reporting back to a remote meta-runner.
public static ITestCaseDiscovered ToTestCaseDiscovered(this ITestCase testCase)
Parameters
testCaseITestCase
Returns
WithSourceInfo(ITestCaseDiscovered, string?, int?)
Creates a new ITestCaseDiscovered, replacing the source file and line number information with the provided values.
public static ITestCaseDiscovered WithSourceInfo(this ITestCaseDiscovered discovered, string? sourceFilePath, int? sourceLineNumber)
Parameters
discoveredITestCaseDiscoveredsourceFilePathstringThe source file
sourceLineNumberint?The line number