Skip to content

TestClusterHostFactory Methods

Utility for creating silos given a name and collection of configuration sources.

CreateClusterClient(string, IConfiguration, Action<IHostBuilder>)

static
View source
public static IHost CreateClusterClient(string hostName, IConfiguration configuration, Action<IHostBuilder> postConfigureHostBuilder = null)
Creates the cluster client.

Parameters

hostNamestring
Name of the host.
configurationIConfiguration
The configuration.
postConfigureHostBuilderAction<IHostBuilder>
An optional delegate which can be used to configure the host builder just prior to a host being built.

Returns

The cluster client host.

CreateSiloHost(string, IConfiguration, Action<IHostBuilder>)

static
View source
public static IHost CreateSiloHost(string hostName, IConfiguration configuration, Action<IHostBuilder> postConfigureHostBuilder = null)
Creates an returns a new silo.

Parameters

hostNamestring
The silo name if it is not already specified in the configuration.
configurationIConfiguration
The configuration.
postConfigureHostBuilderAction<IHostBuilder>
An optional delegate which can be used to configure the host builder just prior to a host being built.

Returns

A new silo.

DeserializeConfiguration(string)

static
View source
public static IConfiguration DeserializeConfiguration(string serializedSources)
Deserializes a configuration string.

Parameters

serializedSourcesstring
The serialized sources.

Returns

The deserialized configuration.

SerializeConfiguration(IConfiguration)

static
View source
public static string SerializeConfiguration(IConfiguration configuration)
Serializes configuration to a string.

Parameters

configurationIConfiguration
The configuration.

Returns

The serialized configuration.