Get service of type T

Namespace: Composite.Core
Assembly: Composite (in Composite.dll) Version: 6.1.6325.31818

Syntax

C#
public static T GetRequiredService<T>()
Visual Basic
Public Shared Function GetRequiredService(Of T) As T
Visual C++
public:
generic<typename T>
static T GetRequiredService()

Type Parameters

T
The type of service object to get

Return Value

A service object of type T or null if there is no such service

Exceptions

ExceptionCondition
System..::..InvalidOperationExceptionThere is no service of type T

See Also