Property | Type | Description | |
---|---|---|---|
CompleteTypeRequestPathIfRequired | void | ||
CreateServiceInstance | object | ||
IServiceProvider | object | ||
RegisterInstance | void | ||
RegisterType | void | ||
ResolveTypeFromKnownContainer | object | ||
ThrowTypeNotRegisteredException | void |
Method | Description | |
---|---|---|
AreAllTypesRegistered ( ) : bool |
Determines whether all the specified types are registered with the service locator. Note that this method is written for optimalization by the TypeFactory. This means that the TypeFactory does not need to call the ServiceLocator several times to construct a single type using dependency injection. |
|
Dispose ( ) : void |
Disposes this instance and all registered instances.
|
|
GetRegistrationInfo ( |
Gets the registration info about the specified type.
|
|
IsTypeRegistered ( |
Determines whether the specified service type is registered. Note that the actual implementation lays in the hands of the IoC technique being used. |
|
IsTypeRegisteredAsSingleton ( |
Determines whether the specified service type is registered as singleton.
|
|
RegisterInstance ( |
Registers a specific instance of a service.
|
|
RegisterType ( |
Registers an implementation of a service using a create type callback, but only if the type is not yet registered. Note that the actual implementation lays in the hands of the IoC technique being used. |
|
RegisterType ( |
Registers an implementation of a service, but only if the type is not yet registered. Note that the actual implementation lays in the hands of the IoC technique being used. |
|
RemoveAllTypes ( |
Removes all registered types of a certain service type.
|
|
RemoveType ( |
Removes the registered type with the specific tag.
|
|
ResolveAllTypes ( ) : object[] |
Resolves all the specified types. Note that this method is written for optimalization by the TypeFactory. This means that the TypeFactory does not need to call the ServiceLocator several times to construct a single type using dependency injection. |
|
ResolveType ( |
Resolves an instance of the type registered on the service. Note that the actual implementation lays in the hands of the IoC technique being used. |
|
ResolveTypes ( |
Resolves all instances of the type registered on the service. Note that the actual implementation lays in the hands of the IoC technique being used. |
|
ServiceLocator ( ) : System |
Initializes a new instance of the ServiceLocator class.
|
Method | Description | |
---|---|---|
CompleteTypeRequestPathIfRequired ( Catel.IoC.TypeRequestInfo typeRequestInfoForTypeJustConstructed ) : void |
Completes the type request path by checking if the currently created type is the same as the first type meaning that the type is successfully created and the current type request path can be set to
|
|
CreateServiceInstance ( Catel.IoC.ServiceLocatorRegistration registration ) : object |
Creates the service instance.
|
|
IServiceProvider ( |
Gets the service object of the specified type.
|
|
RegisterInstance ( |
Registers a specific instance of an service.
|
|
RegisterType ( |
Registers the specific implementing type for the service type.
|
|
ResolveTypeFromKnownContainer ( |
Resolves the type from a known container.
|
|
ThrowTypeNotRegisteredException ( |
Throws the TypeNotRegisteredException but will also reset the current type request path.
|
public GetRegistrationInfo ( |
||
serviceType | Type of the service. | |
tag | object | The tag the service is registered with. The default value is |
return | Catel.IoC.RegistrationInfo |
public IsTypeRegistered ( |
||
serviceType | The type of the service. | |
tag | object | The tag to register the service with. The default value is |
return | bool |
public IsTypeRegisteredAsSingleton ( |
||
serviceType | The service type. | |
tag | object | The tag to register the service with. The default value is |
return | bool |
public RegisterInstance ( |
||
serviceType | Type of the service. | |
instance | object | The instance. |
tag | object | The tag to register the service with. The default value is |
return | void |
public RegisterType ( |
||
serviceType | The type of the service. | |
createServiceFunc | object>.Func | The create service function. |
tag | object | The tag to register the service with. The default value is |
registrationType | RegistrationType | The registration type. The default value is |
registerIfAlreadyRegistered | bool | If set to |
return | void |
public RegisterType ( |
||
serviceType | The type of the service. | |
serviceImplementationType | The type of the implementation. | |
tag | object | The tag to register the service with. The default value is |
registrationType | RegistrationType | The registration type. The default value is |
registerIfAlreadyRegistered | bool | If set to |
return | void |
public RemoveAllTypes ( |
||
serviceType | The type of the service. | |
return | void |
public RemoveType ( |
||
serviceType | The type of the service. | |
tag | object | The tag of the registered the service. The default value is |
return | void |
public ResolveType ( |
||
serviceType | The type of the service. | |
tag | object | The tag to register the service with. The default value is |
return | object |
public ResolveTypes ( |
||
serviceType | The type of the service. | |
return | IEnumerable |