Click or drag to resize

ServiceLocator Class

This class provides methods to register and locate services which can support the processing of AML documents. There can always exist only one service of the same type at one time. The available service types are recognized to be assignable to the IAMLService interface.
Inheritance Hierarchy
SystemObject
  Aml.Engine.ServicesServiceLocator

Namespace: Aml.Engine.Services
Assembly: Aml.Engine (in Aml.Engine.dll) Version: 3.2
Syntax
public static class ServiceLocator

The ServiceLocator type exposes the following members.

Properties
 NameDescription
Public propertyStatic memberAutoUpdateService Gets the automatic update service.
Public propertyStatic memberExternalReferenceResolverService Gets the external reference resolver service.
Public propertyStatic memberQueryService Gets the registered Query-Service. If no Query-Service is registered, a default Query-Service - which is based on LinqToXml - is returned. As an alternative, a Query-Service based on Dictionaries for keyed access is available. The dictionary based service has to be registered to be used. If no such service has been registered, the default query service is returned. The actual registered Query-Service is located by the engine and used for all queries.
Public propertyStatic memberUndoRedoService Gets the registered UndoRedo-Service. The actual registered UndoRedo-Service is located by the engine and used to push executed commands on the undo stack. If no UndoRedo-Service is registered executed commands are not pushed and cannot be undone.
Public propertyStatic memberUniqueNameService Gets the registered UniqueName-Service.The actual registered UniqueName-Service is located by the engine to automatically assign unique names to CAEXObjects if they are inserted into a sequence. If no UniqueName-Service is registered no names are generated.
Top
Methods
 NameDescription
Public methodStatic memberBeginServiceT Starts the usage of a service of the provided type T. If an already registered service of this type exists, the registered service is used. If the service is not registered it is registered using the provided method.
Public methodStatic memberEndService Ends the usage of the provided service. If the service was newly registered when it was started in BeginServiceT(FuncT, T) it will be unregistered calling the provided unregistration method.
Public methodStatic memberGetServiceT Gets a service for the provided service interface
Public methodStatic memberRegisterT Registers a service which will be locatable
Public methodStatic memberUnRegisterT Removes a service of this type from the registration which will afterwards no more locatable
Top
See Also