Class JSRuntimeInvocationHandler
- Namespace
- Bunit
- Assembly
- Bunit.Web.dll
Represents a handler for an invocation of a JavaScript function which returns nothing, with specific arguments.
public class JSRuntimeInvocationHandler : JSRuntimeInvocationHandlerBase<IJSVoidResult>
- Inheritance
-
JSRuntimeInvocationHandler
- Inherited Members
- Extension Methods
Constructors
JSRuntimeInvocationHandler(InvocationMatcher, bool)
Initializes a new instance of the JSRuntimeInvocationHandler class.
protected JSRuntimeInvocationHandler(InvocationMatcher matcher, bool isCatchAllHandler)
Parameters
matcher
InvocationMatcherAn invocation matcher used to determine if the handler should handle an invocation.
isCatchAllHandler
boolSet to true if this handler is a catch all handler, that should only be used if there are no other non-catch all handlers available.
Properties
IsVoidResultHandler
Gets a value indicating whether this handler is set up to handle calls to InvokeVoidAsync(string, object[])
.
public override sealed bool IsVoidResultHandler { get; }
Property Value
Methods
SetCanceled()
Marks the Task that invocations will receive as canceled.
public JSRuntimeInvocationHandler SetCanceled()
Returns
- JSRuntimeInvocationHandler
This handler to allow calls to be chained.
SetException<TException>(TException)
Sets the TException
exception that invocations will receive.
public JSRuntimeInvocationHandler SetException<TException>(TException exception) where TException : Exception
Parameters
exception
TExceptionThe exception to set.
Returns
- JSRuntimeInvocationHandler
This handler to allow calls to be chained.
Type Parameters
TException
SetVoidResult()
Completes the current awaiting void invocation requests.
public JSRuntimeInvocationHandler SetVoidResult()
Returns
- JSRuntimeInvocationHandler
This handler to allow calls to be chained.