Class ConfigurationExtensions
Represents configuration methods that allows to embed HyParView membership protocol into ASP.NET Core application.
Inherited Members
Namespace: DotNext.Net.Cluster.Discovery.HyParView.Http
Assembly: DotNext.AspNetCore.Cluster.dll
Syntax
[CLSCompliant(false)]
public static class ConfigurationExtensions
Methods
| Edit this page View SourceConfigureLocalPeer(IServiceCollection, IConfiguration)
Allows to inject PeerController, IPeerMesh<TPeer> to application services and establishes network communication with overlay.
Declaration
public static IServiceCollection ConfigureLocalPeer(this IServiceCollection services, IConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The collection of services. |
IConfiguration | configuration | The configuration of local peer. |
Returns
Type | Description |
---|---|
IServiceCollection | The modified collection of services. |
ConfigureLocalPeer(IServiceCollection, Action<HttpPeerConfiguration>)
Allows to inject PeerController, IPeerMesh<TPeer> to application services and establishes network communication with overlay.
Declaration
public static IServiceCollection ConfigureLocalPeer(this IServiceCollection services, Action<HttpPeerConfiguration> configuration)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The collection of services. |
Action<HttpPeerConfiguration> | configuration | The delegate that can be used to configure the local peer. |
Returns
Type | Description |
---|---|
IServiceCollection | The modified collection of services. |
JoinMesh(WebApplicationBuilder)
Allows to inject PeerController, IPeerMesh<TPeer> to application services and establishes network communication with overlay.
Declaration
[CLSCompliant(false)]
public static void JoinMesh(this WebApplicationBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
WebApplicationBuilder | builder | The application builder. |
See Also
| Edit this page View SourceJoinMesh(WebApplicationBuilder, Action<HttpPeerConfiguration, IConfiguration, IHostEnvironment>)
Allows to inject PeerController, IPeerMesh<TPeer> to application services and establishes network communication with overlay.
Declaration
public static void JoinMesh(this WebApplicationBuilder builder, Action<HttpPeerConfiguration, IConfiguration, IHostEnvironment> peerConfig)
Parameters
Type | Name | Description |
---|---|---|
WebApplicationBuilder | builder | The application builder. |
Action<HttpPeerConfiguration, IConfiguration, IHostEnvironment> | peerConfig | The delegate that can be used to provide local peer configuration. |
See Also
| Edit this page View SourceJoinMesh(WebApplicationBuilder, Func<IConfiguration, IHostEnvironment, IConfiguration>)
Allows to inject PeerController, IPeerMesh<TPeer> to application services and establishes network communication with overlay.
Declaration
[CLSCompliant(false)]
public static void JoinMesh(this WebApplicationBuilder builder, Func<IConfiguration, IHostEnvironment, IConfiguration> peerConfig)
Parameters
Type | Name | Description |
---|---|---|
WebApplicationBuilder | builder | The application builder. |
Func<IConfiguration, IHostEnvironment, IConfiguration> | peerConfig | The delegate that can be used to provide local peer configuration. |
See Also
| Edit this page View SourceJoinMesh(WebApplicationBuilder, string)
Allows to inject PeerController, IPeerMesh<TPeer> to application services and establishes network communication with overlay.
Declaration
public static void JoinMesh(this WebApplicationBuilder builder, string configSection)
Parameters
Type | Name | Description |
---|---|---|
WebApplicationBuilder | builder | The application builder. |
string | configSection | The name of configuration section containing configuration of the local peer. |
JoinMesh(IHostBuilder)
Allows to inject PeerController, IPeerMesh<TPeer> to application services and establishes network communication with overlay.
Declaration
public static IHostBuilder JoinMesh(this IHostBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
IHostBuilder | builder | The host builder. |
Returns
Type | Description |
---|---|
IHostBuilder | The modified host builder. |
Remarks
Should be called immediately after ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>) or ConfigureWebHostDefaults(IHostBuilder, Action<IWebHostBuilder>).
JoinMesh(IHostBuilder, Action<HttpPeerConfiguration, IConfiguration, IHostEnvironment>)
Allows to inject PeerController, IPeerMesh<TPeer> to application services and establishes network communication with overlay.
Declaration
public static IHostBuilder JoinMesh(this IHostBuilder builder, Action<HttpPeerConfiguration, IConfiguration, IHostEnvironment> peerConfig)
Parameters
Type | Name | Description |
---|---|---|
IHostBuilder | builder | The host builder. |
Action<HttpPeerConfiguration, IConfiguration, IHostEnvironment> | peerConfig | The delegate that can be used to provide local peer configuration. |
Returns
Type | Description |
---|---|
IHostBuilder | The modified host builder. |
JoinMesh(IHostBuilder, Func<IConfiguration, IHostEnvironment, IConfiguration>)
Allows to inject PeerController, IPeerMesh<TPeer> to application services and establishes network communication with overlay.
Declaration
public static IHostBuilder JoinMesh(this IHostBuilder builder, Func<IConfiguration, IHostEnvironment, IConfiguration> peerConfig)
Parameters
Type | Name | Description |
---|---|---|
IHostBuilder | builder | The host builder. |
Func<IConfiguration, IHostEnvironment, IConfiguration> | peerConfig | The delegate that can be used to provide local peer configuration. |
Returns
Type | Description |
---|---|
IHostBuilder | The modified host builder. |
Remarks
Should be called immediately after ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>) or ConfigureWebHostDefaults(IHostBuilder, Action<IWebHostBuilder>).
JoinMesh(IHostBuilder, string)
Allows to inject PeerController, IPeerMesh<TPeer> to application services and establishes network communication with overlay.
Declaration
public static IHostBuilder JoinMesh(this IHostBuilder builder, string configSection)
Parameters
Type | Name | Description |
---|---|---|
IHostBuilder | builder | The host builder. |
string | configSection | The name of configuration section containing configuration of the local peer. |
Returns
Type | Description |
---|---|
IHostBuilder | The modified host builder. |
UseHyParViewProtocolHandler(IApplicationBuilder)
Setup HyParView protocol handler as a middleware for the specified application.
Declaration
public static IApplicationBuilder UseHyParViewProtocolHandler(this IApplicationBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
IApplicationBuilder | builder | The application builder. |
Returns
Type | Description |
---|---|
IApplicationBuilder | The modified application builder. |