Try to retrieve a service from the context.
| C# | Visual Basic | Visual C++ |
public static bool TryResolve( IComponentContext context, Service service, IEnumerable<Parameter> parameters, out Object instance )
Public Shared Function TryResolve ( _ context As IComponentContext, _ service As Service, _ parameters As IEnumerable(Of Parameter), _ <OutAttribute> ByRef instance As Object _ ) As Boolean
public: static bool TryResolve( IComponentContext^ context, Service^ service, IEnumerable<Parameter^>^ parameters, [OutAttribute] Object^% instance )
- context (IComponentContext)
- The context from which to resolve the service.
- service (Service)
- The service to resolve.
- parameters (IEnumerable<(Of <(Parameter>)>))
- The parameters.
- instance ( Object %)
- The resulting component instance providing the service, or null.
True if a component providing the service is available.
| Exception | Condition |
|---|---|
| DependencyResolutionException |