Table of Contents

HostFixture Class

Definition

Namespace
Codebelt.Extensions.Xunit.Hosting
Assemblies
Codebelt.Extensions.Xunit.Hosting.dll
Source
src/Codebelt.Extensions.Xunit.Hosting/HostFixture.cs

Represents the base class from which all implementations of xUnit fixture concept should derive.

public abstract class HostFixture : IHostFixture, IConfigurationTest, IEnvironmentTest, IDisposable, IAsyncLifetime, IAsyncDisposable
Inheritance
HostFixture
Implements
IAsyncLifetime
Derived

Constructors

Name Description
HostFixture()

Initializes a new instance of the HostFixture class.

Properties

Name Description
AsyncHostRunnerCallback

Gets or sets the delegate responsible for running the IHost.

Configuration

Gets the IConfiguration initialized by this instance.

ConfigureCallback

Gets or sets the delegate that initializes the test class.

Disposed

Gets a value indicating whether this HostFixture object is disposed.

Environment

Gets the IHostEnvironment initialized by this instance.

Host

Gets or sets the IHost initialized by this instance.

Methods

Name Description
Dispose()

Releases all resources used by the HostFixture object.

Dispose(bool)

Releases the unmanaged resources used by the HostFixture object and optionally releases the managed resources.

DisposeAsync()

Asynchronously releases the resources used by the HostFixture.

HasTypes(Type, params Type[])

Determines whether the specified type contains one or more of the specified target types.

InitializeAsync()

Called immediately after the class has been created, before it is used.

OnDisposeManagedResources()

Called when this object is being disposed by either Dispose() or Dispose(bool) having disposing set to true and Disposed is false.

OnDisposeManagedResourcesAsync()

Called when this object is being disposed by DisposeAsync().

OnDisposeUnmanagedResources()

Called when this object is being disposed by either Dispose() or Dispose(bool) and Disposed is false.

See Also