Table of Contents

Class ResolverMixins

Namespace
Splat
Assembly
Splat.Core.dll

Resolver Mixins.

public static class ResolverMixins
Inheritance
ResolverMixins

Methods

RegisterAnd<TService>(IMutableDependencyResolver)

Registers a factory for the given TService.

public static IMutableDependencyResolver RegisterAnd<TService>(this IMutableDependencyResolver resolver) where TService : new()

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterAnd<TService>(IMutableDependencyResolver, Func<TService>)

Registers a factory for the given TService.

public static IMutableDependencyResolver RegisterAnd<TService>(this IMutableDependencyResolver resolver, Func<TService> factory)

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

factory Func<TService>

A factory method for generating a object of the specified type.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterAnd<TService>(IMutableDependencyResolver, Func<TService>, string)

Registers a factory for the given TService.

public static IMutableDependencyResolver RegisterAnd<TService>(this IMutableDependencyResolver resolver, Func<TService> factory, string contract)

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

factory Func<TService>

A factory method for generating a object of the specified type.

contract string

A contract value which will indicates to only generate the value if this contract is specified.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterAnd<TService>(IMutableDependencyResolver, string)

Registers a factory for the given TService.

public static IMutableDependencyResolver RegisterAnd<TService>(this IMutableDependencyResolver resolver, string contract) where TService : new()

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

contract string

A contract value which will indicates to only generate the value if this contract is specified.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterAnd<TService, TImplementation>(IMutableDependencyResolver)

Registers a factory for the given TImplementation that will be resolved as TService.

public static IMutableDependencyResolver RegisterAnd<TService, TImplementation>(this IMutableDependencyResolver resolver) where TImplementation : TService, new()

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register as (interface or base class).

TImplementation

The concrete implementation type that will be instantiated.

RegisterAnd<TService, TImplementation>(IMutableDependencyResolver, Func<TImplementation>)

Registers a factory for the given TImplementation that will be resolved as TService.

public static IMutableDependencyResolver RegisterAnd<TService, TImplementation>(this IMutableDependencyResolver resolver, Func<TImplementation> factory) where TImplementation : TService

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

factory Func<TImplementation>

A factory method for generating a object of the specified type.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register as (interface or base class).

TImplementation

The concrete implementation type returned by the factory.

RegisterAnd<TService, TImplementation>(IMutableDependencyResolver, Func<TImplementation>, string)

Registers a factory for the given TImplementation that will be resolved as TService.

public static IMutableDependencyResolver RegisterAnd<TService, TImplementation>(this IMutableDependencyResolver resolver, Func<TImplementation> factory, string contract) where TImplementation : TService

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

factory Func<TImplementation>

A factory method for generating a object of the specified type.

contract string

A contract value which will indicates to only generate the value if this contract is specified.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register as (interface or base class).

TImplementation

The concrete implementation type returned by the factory.

RegisterAnd<TService, TImplementation>(IMutableDependencyResolver, string)

Registers a factory for the given TImplementation that will be resolved as TService.

public static IMutableDependencyResolver RegisterAnd<TService, TImplementation>(this IMutableDependencyResolver resolver, string contract) where TImplementation : TService, new()

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

contract string

A contract value which will indicates to only generate the value if this contract is specified.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register as (interface or base class).

TImplementation

The concrete implementation type that will be instantiated.

RegisterConstantAnd(IMutableDependencyResolver, object, Type)

Registers a constant value which will always return the specified object instance.

public static IMutableDependencyResolver RegisterConstantAnd(this IMutableDependencyResolver resolver, object value, Type serviceType)

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

value object

The specified instance to always return.

serviceType Type

The type of service to register.

Returns

IMutableDependencyResolver

The resolver.

RegisterConstantAnd(IMutableDependencyResolver, object, Type, string)

Registers a constant value which will always return the specified object instance.

public static IMutableDependencyResolver RegisterConstantAnd(this IMutableDependencyResolver resolver, object value, Type serviceType, string contract)

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

value object

The specified instance to always return.

serviceType Type

The type of service to register.

contract string

A contract value which will indicates to only return the value if this contract is specified.

Returns

IMutableDependencyResolver

The resolver.

RegisterConstantAnd<TService>(IMutableDependencyResolver)

Registers a constant value which will always return the specified object instance.

public static IMutableDependencyResolver RegisterConstantAnd<TService>(this IMutableDependencyResolver resolver) where TService : new()

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterConstantAnd<TService>(IMutableDependencyResolver, string)

Registers a constant value which will always return the specified object instance.

public static IMutableDependencyResolver RegisterConstantAnd<TService>(this IMutableDependencyResolver resolver, string contract) where TService : new()

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

contract string

A contract value which will indicates to only return the value if this contract is specified.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterConstantAnd<TService>(IMutableDependencyResolver, TService)

Registers a constant value which will always return the specified object instance.

public static IMutableDependencyResolver RegisterConstantAnd<TService>(this IMutableDependencyResolver resolver, TService value)

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

value TService

The specified instance to always return.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterConstantAnd<TService>(IMutableDependencyResolver, TService, string)

Registers a constant value which will always return the specified object instance.

public static IMutableDependencyResolver RegisterConstantAnd<TService>(this IMutableDependencyResolver resolver, TService value, string contract)

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

value TService

The specified instance to always return.

contract string

A contract value which will indicates to only return the value if this contract is specified.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterLazySingletonAnd(IMutableDependencyResolver, Func<object>, Type)

Registers a lazy singleton value which will always return the specified object instance once created. The value is only generated once someone requests the service from the resolver.

public static IMutableDependencyResolver RegisterLazySingletonAnd(this IMutableDependencyResolver resolver, Func<object> valueFactory, Type serviceType)

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

valueFactory Func<object>

A factory method for generating a object of the specified type.

serviceType Type

The type of service to register.

Returns

IMutableDependencyResolver

The resolver.

RegisterLazySingletonAnd(IMutableDependencyResolver, Func<object>, Type, string)

Registers a lazy singleton value which will always return the specified object instance once created. The value is only generated once someone requests the service from the resolver.

public static IMutableDependencyResolver RegisterLazySingletonAnd(this IMutableDependencyResolver resolver, Func<object> valueFactory, Type serviceType, string contract)

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

valueFactory Func<object>

A factory method for generating a object of the specified type.

serviceType Type

The type of service to register.

contract string

A contract value which will indicates to only return the value if this contract is specified.

Returns

IMutableDependencyResolver

The resolver.

RegisterLazySingletonAnd<TService>(IMutableDependencyResolver)

Registers a lazy singleton value which will always return the specified object instance once created. The value is only generated once someone requests the service from the resolver.

public static IMutableDependencyResolver RegisterLazySingletonAnd<TService>(this IMutableDependencyResolver resolver) where TService : new()

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterLazySingletonAnd<TService>(IMutableDependencyResolver, Func<TService>)

Registers a lazy singleton value which will always return the specified object instance once created. The value is only generated once someone requests the service from the resolver.

public static IMutableDependencyResolver RegisterLazySingletonAnd<TService>(this IMutableDependencyResolver resolver, Func<TService> valueFactory)

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

valueFactory Func<TService>

A factory method for generating a object of the specified type.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterLazySingletonAnd<TService>(IMutableDependencyResolver, Func<TService>, string)

Registers a lazy singleton value which will always return the specified object instance once created. The value is only generated once someone requests the service from the resolver.

public static IMutableDependencyResolver RegisterLazySingletonAnd<TService>(this IMutableDependencyResolver resolver, Func<TService> valueFactory, string contract)

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

valueFactory Func<TService>

A factory method for generating a object of the specified type.

contract string

A contract value which will indicates to only return the value if this contract is specified.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.

RegisterLazySingletonAnd<TService>(IMutableDependencyResolver, string)

Registers a lazy singleton value which will always return the specified object instance once created. The value is only generated once someone requests the service from the resolver.

public static IMutableDependencyResolver RegisterLazySingletonAnd<TService>(this IMutableDependencyResolver resolver, string contract) where TService : new()

Parameters

resolver IMutableDependencyResolver

The resolver to register the service type with.

contract string

A contract value which will indicates to only generate the value if this contract is specified.

Returns

IMutableDependencyResolver

The resolver.

Type Parameters

TService

The service type to register for.