Service Registry

The service registry holds implementation instances for various services used by the entity framework and applications. To allow you to use the exception message service, you must register the exception message service implementation represented by the SUPExceptionMessageService protocol with the service registry.

You can register objects that implement the SUPExceptionMessageProvider protocol using the ServiceRegister interface's registerService and unregisterService methods.

- (id)registerService:(Protocol *)protocol withImplementation:(id)service;

- (id)unregisterService:(Protocol *) protocol;

For example:

// register our default message service
id <SUPExceptionMessageService> service = [SUPExceptionMessageServiceImpl exceptionMessageServiceImpl];

SUPServiceRegistry* sr = [SUPServiceRegistry sharedInstance];
[sr registerService:@protocol(SUPExceptionMessageService) withImplementation:service];