Retrieve a service from the context.
| C# | Visual Basic | Visual C++ |
public static TService Resolve<TService>( IComponentContext context )
Public Shared Function Resolve(Of TService) ( _ context As IComponentContext _ ) As TService
public: generic<typename TService> static TService Resolve( IComponentContext^ context )
- TService
- The service to retrieve.
- context (IComponentContext)
- The context from which to resolve the service.
The component instance that provides the service.
| Exception | Condition |
|---|---|
| ComponentNotRegisteredException | |
| DependencyResolutionException |