Retrieve a service from the context.
| C# | Visual Basic | Visual C++ |
public static TService Resolve<TService>( IComponentContext context, params Parameter[] parameters )
Public Shared Function Resolve(Of TService) ( _ context As IComponentContext, _ ParamArray parameters As Parameter() _ ) As TService
public: generic<typename TService> static TService Resolve( IComponentContext^ context, ... array<Parameter^>^ parameters )
- TService
- The type to which the result will be cast.
- context (IComponentContext)
- The context from which to resolve the service.
- parameters (array< Parameter >[]()[])
- Parameters for the service.
The component instance that provides the service.
| Exception | Condition |
|---|---|
| ComponentNotRegisteredException | |
| DependencyResolutionException |