Class FluentBinding
Represents a binding that can be configured with method chaining.
Namespace: AlchemyBow.Core.Extras.FluentBindings
Assembly: AlchemyBow.Core.dll
Syntax
public class FluentBinding
Constructors
FluentBinding(IBindOnlyContainer, object)
Creates a new instance of the FluentBinding class.
Declaration
public FluentBinding(IBindOnlyContainer container, object instance)
Parameters
Type | Name | Description |
---|---|---|
IBindOnlyContainer | container | The container used for binding. |
object | instance | The instance to bind. |
Methods
AddToCoreLoadingCallbacksHandlers()
Adds the instance to the dynamic list of core loading callbacks handlers.
Declaration
public void AddToCoreLoadingCallbacksHandlers()
AddToDynamicCollectionBinding<TCollection, TItem>()
Adds the instance to the dynamic collection binding.
Declaration
public FluentBinding AddToDynamicCollectionBinding<TCollection, TItem>() where TCollection : ICollection<TItem>
Returns
Type | Description |
---|---|
FluentBinding |
Type Parameters
Name | Description |
---|---|
TCollection | |
TItem |
BindInaccessible()
Binds the instance as inaccessible.
Declaration
public FluentBinding BindInaccessible()
Returns
Type | Description |
---|---|
FluentBinding |
BindTo(Type)
Binds the instance to the specified type.
Declaration
public FluentBinding BindTo(Type key)
Parameters
Type | Name | Description |
---|---|---|
Type | key |
Returns
Type | Description |
---|---|
FluentBinding |
BindToSelf()
Binds the instance to its own type.
Declaration
public FluentBinding BindToSelf()
Returns
Type | Description |
---|---|
FluentBinding |
BindTo<TKey>()
Binds the instance to the specified type.
Declaration
public FluentBinding BindTo<TKey>()
Returns
Type | Description |
---|---|
FluentBinding |
Type Parameters
Name | Description |
---|---|
TKey |