Class
ServiceLocator

Represents a class that can return and register services.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public class ServiceLocator : IServiceLocator, IGraphServiceLocator

Inheritance: objectServiceLocator

Implements: IGraphServiceLocatorIServiceLocator

Constructors

ServiceLocator(IGraphInternal, IControllerService)

Initializes a new instance of the ServiceLocator class.

Declaration

cs-api-definition
public ServiceLocator(IGraphInternal graph, IControllerService controller)

Parameters

graph

IGraphInternal

controller

IControllerService

Methods

GetService<T>()

Gets a service.

Declaration

cs-api-definition
public T GetService<T>()

Returns

T

Implements IServiceLocator.GetService<T>()

Register<T>(T)

Registers new service.

Declaration

cs-api-definition
public void Register<T>(T service)

Parameters

service

T

The service.

Implements IServiceLocator.Register<T>(T)

RegisterDefaultServices()

Registers the default services.

Declaration

cs-api-definition
public void RegisterDefaultServices()

Implements IServiceLocator.RegisterDefaultServices()

Events

ServiceRegistered

Occurs when a service is registered.

Declaration

cs-api-definition
public event EventHandler<ServiceRegisterEventArgs> ServiceRegistered

Event Value

EventHandler<ServiceRegisterEventArgs>

Implements IServiceLocator.ServiceRegistered