Dela via


FakeHostingExtensions Class

Definition

Extension methods supporting host unit testing scenarios.

public ref class FakeHostingExtensions abstract sealed
[System.Diagnostics.CodeAnalysis.Experimental("EXTEXP0009", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public static class FakeHostingExtensions
[<System.Diagnostics.CodeAnalysis.Experimental("EXTEXP0009", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type FakeHostingExtensions = class
Public Module FakeHostingExtensions
Inheritance
FakeHostingExtensions
Attributes

Methods

AddFakeLoggingOutputSink(IHostBuilder, Action<String>)

Adds an action invoked on each log message.

Configure(IHostBuilder, Action<IHostBuilder>)

Exposes IHostBuilder for changes via a delegate.

ConfigureAppConfiguration(IHostBuilder, String, String)

Adds a configuration value.

ConfigureAppConfiguration(IHostBuilder, ValueTuple<String,String>[])

Adds configuration entries.

ConfigureHostConfiguration(IHostBuilder, String, String)

Adds a configuration value.

ConfigureHostConfiguration(IHostBuilder, ValueTuple<String,String>[])

Adds configuration entries.

GetFakeLogCollector(IHost)

Gets the object that collects log records sent to the fake logger.

GetFakeRedactionCollector(IHost)

Gets the object reporting all redactions performed.

StartAndStopAsync(IHostedService, CancellationToken)

Starts and immediately stops the service.

Applies to