Table of Contents

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 InvocationMatcher

An invocation matcher used to determine if the handler should handle an invocation.

isCatchAllHandler bool

Set 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

bool

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 TException

The 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.

Progress Telerik

Premium sponsor: Progress Telerik.

Packt

Editorial support provided by Packt.

.NET Foundation

Supported by the .NET Foundation.