Interface IBehaviorContainerBuilder<TContext>
A builder for behavior containers.
Namespace: SpiceSharp.Behaviors
Assembly: SpiceSharp.dll
Syntax
public interface IBehaviorContainerBuilder<TContext> where TContext : IBindingContext
Type Parameters
Name | Description |
---|---|
TContext | The type of binding context. |
Methods
AddIfNo<TBehavior>(Func<TContext, IBehavior>)
Adds a behavior if the specified behavior does not yet exist in the container.
Declaration
IBehaviorContainerBuilder<TContext> AddIfNo<TBehavior>(Func<TContext, IBehavior> factory) where TBehavior : IBehavior
Parameters
Type | Name | Description |
---|---|---|
Func<TContext, IBehavior> | factory | The factory. |
Returns
Type | Description |
---|---|
IBehaviorContainerBuilder<TContext> | The original container builder. This can be used for chaining. |
Type Parameters
Name | Description |
---|---|
TBehavior | The target type of the behavior. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |