Skip to content

DependencyResource

1 min read

Import: import system.webapi;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

DependencyResource

A dependency value and its asynchronous release operation.

public class DependencyResource<T>

value

The dependency value passed to the handler.

public value: T

cleanup

Asynchronous cleanup action, given the cancellation token.

public cleanup: fun(CancellationToken): Future<void>

constructor

Creates a DependencyResource with value, cleanup.

public constructor(value: T, cleanup: fun(CancellationToken): Future<void>)