ServiceManager.GetRequiredService<TServiceType> Method ()

.NET Framework (current version)
 

Retrieves the requested service.

Namespace:   System.Activities.Presentation
Assembly:  System.Activities.Presentation (in System.Activities.Presentation.dll)

public TServiceType GetRequiredService<TServiceType>()

Return Value

Type: TServiceType

Returns a generic type, which is an instance of the service.

Type Parameters

TServiceType

The type of service to retrieve.

Exception Condition
NotSupportedException

There is no service of the given type.

Unlike GetService, this method throws a NotSupportedException if the service is not available.

.NET Framework
Available since 4.0
Return to top
Show: