Class SilverbackBuilderAddBrokerBehaviorExtensions
Adds the AddBrokerBehavior methods to the ISilverbackBuilder.
Inherited Members
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Silverback.Integration.dll
Syntax
public static class SilverbackBuilderAddBrokerBehaviorExtensions
Methods
| Improve this doc View sourceAddSingletonBrokerBehavior(ISilverbackBuilder, IBrokerBehavior)
Adds a singleton behavior with an instance specified in implementationInstance
to the IServiceCollection.
Declaration
public static ISilverbackBuilder AddSingletonBrokerBehavior(this ISilverbackBuilder silverbackBuilder, IBrokerBehavior implementationInstance)
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackBuilder | silverbackBuilder | The ISilverbackBuilder that references the IServiceCollection to add the services to. |
| IBrokerBehavior | implementationInstance | The instance of the service. |
Returns
| Type | Description |
|---|---|
| ISilverbackBuilder | The ISilverbackBuilder so that additional calls can be chained. |
AddSingletonBrokerBehavior(ISilverbackBuilder, Func<IServiceProvider, IBrokerBehavior>)
Adds a singleton behavior with a factory specified in implementationFactory to
the IServiceCollection.
Declaration
public static ISilverbackBuilder AddSingletonBrokerBehavior(this ISilverbackBuilder silverbackBuilder, Func<IServiceProvider, IBrokerBehavior> implementationFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackBuilder | silverbackBuilder | The ISilverbackBuilder that references the IServiceCollection to add the services to. |
| Func<IServiceProvider, IBrokerBehavior> | implementationFactory | The factory that creates the service. |
Returns
| Type | Description |
|---|---|
| ISilverbackBuilder | The ISilverbackBuilder so that additional calls can be chained. |
AddSingletonBrokerBehavior(ISilverbackBuilder, Type)
Adds a singleton behavior of the type specified in behaviorType to the
IServiceCollection.
Declaration
public static ISilverbackBuilder AddSingletonBrokerBehavior(this ISilverbackBuilder silverbackBuilder, Type behaviorType)
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackBuilder | silverbackBuilder | The ISilverbackBuilder that references the IServiceCollection to add the services to. |
| Type | behaviorType | The type of the behavior to register and the implementation to use. |
Returns
| Type | Description |
|---|---|
| ISilverbackBuilder | The ISilverbackBuilder so that additional calls can be chained. |
AddSingletonBrokerBehavior<TBehavior>(ISilverbackBuilder)
Adds a singleton behavior of the type specified in TBehavior to the
IServiceCollection.
Declaration
public static ISilverbackBuilder AddSingletonBrokerBehavior<TBehavior>(this ISilverbackBuilder silverbackBuilder) where TBehavior : class, IBrokerBehavior
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackBuilder | silverbackBuilder | The ISilverbackBuilder that references the IServiceCollection to add the services to. |
Returns
| Type | Description |
|---|---|
| ISilverbackBuilder | The ISilverbackBuilder so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| TBehavior | The type of the behavior to add. |
AddTransientBrokerBehavior(ISilverbackBuilder, Func<IServiceProvider, IBrokerBehavior>)
Adds a transient behavior with a factory specified in implementationFactory to
the IServiceCollection.
Declaration
public static ISilverbackBuilder AddTransientBrokerBehavior(this ISilverbackBuilder silverbackBuilder, Func<IServiceProvider, IBrokerBehavior> implementationFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackBuilder | silverbackBuilder | The ISilverbackBuilder that references the IServiceCollection to add the services to. |
| Func<IServiceProvider, IBrokerBehavior> | implementationFactory | The factory that creates the service. |
Returns
| Type | Description |
|---|---|
| ISilverbackBuilder | The ISilverbackBuilder so that additional calls can be chained. |
AddTransientBrokerBehavior(ISilverbackBuilder, Type)
Adds a transient behavior of the type specified in behaviorType to the
IServiceCollection.
Declaration
public static ISilverbackBuilder AddTransientBrokerBehavior(this ISilverbackBuilder silverbackBuilder, Type behaviorType)
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackBuilder | silverbackBuilder | The ISilverbackBuilder that references the IServiceCollection to add the services to. |
| Type | behaviorType | The type of the behavior to register and the implementation to use. |
Returns
| Type | Description |
|---|---|
| ISilverbackBuilder | The ISilverbackBuilder so that additional calls can be chained. |
AddTransientBrokerBehavior<TBehavior>(ISilverbackBuilder)
Adds a transient behavior of the type specified in TBehavior to the
IServiceCollection.
Declaration
public static ISilverbackBuilder AddTransientBrokerBehavior<TBehavior>(this ISilverbackBuilder silverbackBuilder) where TBehavior : class, IBrokerBehavior
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackBuilder | silverbackBuilder | The ISilverbackBuilder that references the IServiceCollection to add the services to. |
Returns
| Type | Description |
|---|---|
| ISilverbackBuilder | The ISilverbackBuilder so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| TBehavior | The type of the behavior to add. |