Interface IBindingToSyntax<T1>
Used to define the target of a binding.
Inherited Members
Namespace: Telerik.JustMock.AutoMock.Ninject.Syntax
Assembly: Telerik.JustMock.dll
Syntax
public interface IBindingToSyntax<T1> : IBindingSyntax, IHaveBindingConfiguration, IHaveKernel, IFluentSyntax
Type Parameters
T1
The service being bound. |
Methods
To(Type)
Indicates that the service should be bound to the specified implementation type.
Declaration
IBindingWhenInNamedWithOrOnSyntax<T1> To(Type implementation)
Parameters
System.Type
implementation
The implementation type. |
Returns
IBindingWhenInNamedWithOrOnSyntax<T1>
The fluent syntax. |
To<TImplementation>()
Indicates that the service should be bound to the specified implementation type.
Declaration
IBindingWhenInNamedWithOrOnSyntax<TImplementation> To<TImplementation>()
where TImplementation : T1
Returns
IBindingWhenInNamedWithOrOnSyntax<TImplementation>
The fluent syntax. |
Type Parameters
TImplementation
The implementation type. |
ToConstant<TImplementation>(TImplementation)
Indicates that the service should be bound to the specified constant value.
Declaration
IBindingWhenInNamedWithOrOnSyntax<TImplementation> ToConstant<TImplementation>(TImplementation value)
where TImplementation : T1
Parameters
TImplementation
value
The constant value. |
Returns
IBindingWhenInNamedWithOrOnSyntax<TImplementation>
The fluent syntax. |
Type Parameters
TImplementation
The type of the implementation. |
ToConstructor<TImplementation>(Expression<Func<IConstructorArgumentSyntax, TImplementation>>)
Indicates that the service should be bound to the specified constructor.
Declaration
IBindingWhenInNamedWithOrOnSyntax<TImplementation> ToConstructor<TImplementation>(Expression<Func<IConstructorArgumentSyntax, TImplementation>> newExpression)
where TImplementation : T1
Parameters
System.Linq.Expressions.Expression<System.Func<IConstructorArgumentSyntax, TImplementation>>
newExpression
The expression that specifies the constructor. |
Returns
IBindingWhenInNamedWithOrOnSyntax<TImplementation>
The fluent syntax. |
Type Parameters
TImplementation
The type of the implementation. |
ToMethod(Func<IContext, T1>)
Indicates that the service should be bound to the specified callback method.
Declaration
IBindingWhenInNamedWithOrOnSyntax<T1> ToMethod(Func<IContext, T1> method)
Parameters
System.Func<IContext, T1>
method
The method. |
Returns
IBindingWhenInNamedWithOrOnSyntax<T1>
The fluent syntax. |
ToMethod<TImplementation>(Func<IContext, TImplementation>)
Indicates that the service should be bound to the specified callback method.
Declaration
IBindingWhenInNamedWithOrOnSyntax<TImplementation> ToMethod<TImplementation>(Func<IContext, TImplementation> method)
where TImplementation : T1
Parameters
System.Func<IContext, TImplementation>
method
The method. |
Returns
IBindingWhenInNamedWithOrOnSyntax<TImplementation>
The fluent syntax. |
Type Parameters
TImplementation
The type of the implementation. |
ToProvider(Type)
Indicates that the service should be bound to an instance of the specified provider type. The instance will be activated via the kernel when an instance of the service is activated.
Declaration
IBindingWhenInNamedWithOrOnSyntax<T1> ToProvider(Type providerType)
Parameters
System.Type
providerType
The type of provider to activate. |
Returns
IBindingWhenInNamedWithOrOnSyntax<T1>
The fluent syntax. |
ToProvider<TProvider>()
Indicates that the service should be bound to an instance of the specified provider type. The instance will be activated via the kernel when an instance of the service is activated.
Declaration
IBindingWhenInNamedWithOrOnSyntax<T1> ToProvider<TProvider>()
where TProvider : IProvider
Returns
IBindingWhenInNamedWithOrOnSyntax<T1>
The fluent syntax. |
Type Parameters
TProvider
The type of provider to activate. |
ToProvider<TImplementation>(IProvider<TImplementation>)
Indicates that the service should be bound to the specified provider.
Declaration
IBindingWhenInNamedWithOrOnSyntax<TImplementation> ToProvider<TImplementation>(IProvider<TImplementation> provider)
where TImplementation : T1
Parameters
IProvider<TImplementation>
provider
The provider. |
Returns
IBindingWhenInNamedWithOrOnSyntax<TImplementation>
The fluent syntax. |
Type Parameters
TImplementation
The type of the implementation. |
ToSelf()
Indicates that the service should be self-bound.
Declaration
IBindingWhenInNamedWithOrOnSyntax<T1> ToSelf()
Returns
IBindingWhenInNamedWithOrOnSyntax<T1>
The fluent syntax. |