Metalama//API Documentation/Advanced API/Metalama.​Framework.​Engine.​Services/Service­Provider<TBase>/Get­Service
Open sandboxFocus

Method GetService

GetService(Type)

Gets the implementation of a given service type.

Declaration
public object GetService(Type serviceType)
Parameters
Type Name Description
Type serviceType
Returns
Type Description
Object

GetService<T>()

Declaration
public T GetService<T>()
where T : class, TBase
Returns
Type Description
T
Type Parameters
Name Description
T
Implements
IServiceProvider<TBase>.GetService<T>()