Interface IBindingInSyntax<T>
Used to define the scope in which instances activated via a binding should be re-used.
Inherited Members
Namespace: Telerik.JustMock.AutoMock.Ninject.Syntax
Assembly: Telerik.JustMock.dll
Syntax
public interface IBindingInSyntax<T> : IBindingSyntax, IHaveBindingConfiguration, IHaveKernel, IFluentSyntax
Type Parameters
T
The service being bound. |
Methods
InScope(Func<IContext, Object>)
Indicates that instances activated via the binding should be re-used as long as the object returned by the provided callback remains alive (that is, has not been garbage collected).
Declaration
IBindingNamedWithOrOnSyntax<T> InScope(Func<IContext, object> scope)
Parameters
System.Func<IContext, System.Object>
scope
The callback that returns the scope. |
Returns
IBindingNamedWithOrOnSyntax<T>
The fluent syntax. |
InSingletonScope()
Indicates that only a single instance of the binding should be created, and then should be re-used for all subsequent requests.
Declaration
IBindingNamedWithOrOnSyntax<T> InSingletonScope()
Returns
IBindingNamedWithOrOnSyntax<T>
The fluent syntax. |
InThreadScope()
Indicates that instances activated via the binding should be re-used within the same thread.
Declaration
IBindingNamedWithOrOnSyntax<T> InThreadScope()
Returns
IBindingNamedWithOrOnSyntax<T>
The fluent syntax. |
InTransientScope()
Indicates that instances activated via the binding should not be re-used, nor have their lifecycle managed by Ninject.
Declaration
IBindingNamedWithOrOnSyntax<T> InTransientScope()
Returns
IBindingNamedWithOrOnSyntax<T>
The fluent syntax. |