Retrieve a service from the context, or null if the service is not
registered.
| C# | Visual Basic | Visual C++ |
public static Object ResolveOptional( IComponentContext context, Type serviceType, params Parameter[] parameters )
Public Shared Function ResolveOptional ( _ context As IComponentContext, _ serviceType As Type, _ ParamArray parameters As Parameter() _ ) As Object
public: static Object^ ResolveOptional( IComponentContext^ context, Type^ serviceType, ... array<Parameter^>^ parameters )
- context (IComponentContext)
- The context from which to resolve the service.
- serviceType (Type)
- The type of the service.
- parameters (array< Parameter >[]()[])
- Parameters for the service.
The component instance that provides the service, or null.
| Exception | Condition |
|---|---|
| DependencyResolutionException |