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, Service service )
Public Shared Function ResolveOptional ( _ context As IComponentContext, _ service As Service _ ) As Object
public: static Object^ ResolveOptional( IComponentContext^ context, Service^ service )
- context (IComponentContext)
- The context from which to resolve the service.
- service (Service)
- The service.
The component instance that provides the service, or null.
| Exception | Condition |
|---|---|
| DependencyResolutionException |