Skip to content

CoreHostingExtensions Methods

Extensions for ISiloBuilder instances.

AddActivityPropagation(ISiloBuilder)

staticextension
View source
public static ISiloBuilder AddActivityPropagation(this ISiloBuilder builder)
Add System.Diagnostics.Activity.Current propagation through grain calls. Note: according to System.Diagnostics.ActivitySource.StartActivity activity will be created only when any listener for activity exists System.Diagnostics.ActivitySource.HasListeners and System.Diagnostics.ActivityListener.Sample returns System.Diagnostics.ActivitySamplingResult.PropagationData.

Parameters

builderISiloBuilder
The builder.

Returns

The builder.

AddDistributedGrainDirectory(ISiloBuilder, string?)

staticextension
View source
[System.Diagnostics.CodeAnalysis.Experimental(ORLEANSEXP003)]
public static ISiloBuilder AddDistributedGrainDirectory(this ISiloBuilder siloBuilder, string? name = null)
Opts-in to the experimental distributed grain directory.

Parameters

siloBuilderISiloBuilder
The silo builder to register the directory implementation with.
namestring?
The name of the directory to register, or null to register the directory as the default.

Returns

The provided silo builder.

UseDevelopmentClustering(ISiloBuilder, IPEndPoint)

staticextension
View source
public static ISiloBuilder UseDevelopmentClustering(this ISiloBuilder builder, IPEndPoint primarySiloEndpoint)
Configures the silo to use development-only clustering.

Parameters

builderISiloBuilder
primarySiloEndpointIPEndPoint
The endpoint of the primary silo, or null to use this silo as the primary.

Returns

The silo builder.

UseLocalhostClustering(ISiloBuilder, int, int, IPEndPoint?, string, string)

staticextension
View source
public static ISiloBuilder UseLocalhostClustering(this ISiloBuilder builder, int siloPort = 11111, int gatewayPort = 30000, IPEndPoint? primarySiloEndpoint = null, string serviceId = "dev", string clusterId = "dev")
Configures the silo to use development-only clustering and listen on localhost.

Parameters

builderISiloBuilder
The silo builder.
siloPortint
The silo port.
gatewayPortint
The gateway port.
primarySiloEndpointIPEndPoint?
The endpoint of the primary silo, or null to use this silo as the primary.
serviceIdstring
The service id.
clusterIdstring
The cluster id.

Returns

The silo builder.