Interface IProtoResource
Something the current test owns. Resources are released in reverse registration order during teardown, after test hooks and attributes have run; the test's clients are part of the same ordered release, so a resource registered after a client releases before it.
public interface IProtoResource
- Extension Methods
Properties
Description
Gets a single line describing the resource for the trace, report and viewer.
string Description { get; }
Property Value
Id
Gets the stable identity of the resource, for example customer:42.
string Id { get; }
Property Value
Kind
Gets the resource kind, for example database or entity.
string Kind { get; }
Property Value
Scope
Gets how long the resource lives. Defaults to the test that registered it.
ProtoResourceScope Scope { get; }
Property Value
Methods
ReleaseAsync(ProtoResourceReleaseContext)
Releases the resource. Each resource is released at most once, so implementations do not have to guard against repeated calls, but must tolerate a failed release being reported.
ValueTask ReleaseAsync(ProtoResourceReleaseContext context)
Parameters
contextProtoResourceReleaseContext