C# Class Catel.IoC.CatelDependencyResolver

Implementation of the IDependencyResolver interface for Catel by wrapping the ServiceLocator.
Inheritance: IDependencyResolver
Show file Open project: Catel/Catel Class Usage Examples

Public Methods

Method Description
CanResolve ( Type type, object tag = null ) : bool

Determines whether the specified type with the specified tag can be resolved.

CanResolveAll ( Type types ) : bool

Determines whether all types specified can be resolved. Though ResolveAll will return null at the array index when a type cannot be resolved, this method will actually check whether all the specified types are registered. It is still possible to call ResolveAll, even when this method returns false.

CatelDependencyResolver ( IServiceLocator serviceLocator ) : System

Initializes a new instance of the CatelDependencyResolver class.

Resolve ( Type type, object tag = null ) : object

Resolves the specified type with the specified tag.

ResolveAll ( Type types, object tag = null ) : object[]

Resolves the specified types with the specified tag.

Method Details

CanResolve() public method

Determines whether the specified type with the specified tag can be resolved.
public CanResolve ( Type type, object tag = null ) : bool
type System.Type The type.
tag object The tag.
return bool

CanResolveAll() public method

Determines whether all types specified can be resolved. Though ResolveAll will return null at the array index when a type cannot be resolved, this method will actually check whether all the specified types are registered. It is still possible to call ResolveAll, even when this method returns false.
public CanResolveAll ( Type types ) : bool
types System.Type The types.
return bool

CatelDependencyResolver() public method

Initializes a new instance of the CatelDependencyResolver class.
The is null.
public CatelDependencyResolver ( IServiceLocator serviceLocator ) : System
serviceLocator IServiceLocator The service locator.
return System

Resolve() public method

Resolves the specified type with the specified tag.
The is null. The type is not found in any container.
public Resolve ( Type type, object tag = null ) : object
type System.Type The type.
tag object The tag.
return object

ResolveAll() public method

Resolves the specified types with the specified tag.
public ResolveAll ( Type types, object tag = null ) : object[]
types System.Type The types.
tag object The tag.
return object[]