ExtensionsGetServiceTService Method TIBCO Spotfire 7.6 API Reference
Convenience generic extension method that calls GetService(Type) and casts the result.

Namespace: Spotfire.Dxp.Framework.Services
Assembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 25.11.10401.3615 (25.11.10401.3615)
Syntax

C#
public static TService GetService<TService>(
	this IServiceProvider provider
)
where TService : class

Parameters

provider
Type: SystemIServiceProvider
The service provider instance.

Type Parameters

TService
The type of service object to get.

Return Value

Type: TService
A service object of type TService -or- null if there is no service object of type TService.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IServiceProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Version Information

Supported in: 7.6, 7.5, 7.0, 6.5, 6.0, 5.5, 5.0
See Also

Reference