Init(args)
Scripting Reference
Loading...
Searching...
No Matches

◆ TryGetFor< TService >()

bool Sisus.Init.IServiceProvider.TryGetFor< TService > ( [DisallowNull] Component client,
[NotNullWhen(true), MaybeNullWhen(false)] out TService service )

Tries to get a service of type TService for the given client .

Template Parameters
TServiceType of the service that the client needs.

This can be an interface that the returned implements, a base type that it derives from, or its exact concrete type.

Parameters
clientThe client that needs the service.
serviceWhen this method returns, contains the service of type TService , if available for the client; otherwise, null. This parameter is passed uninitialized.
Returns
true if service was found; otherwise, false.

Implemented in Sisus.Init.ServiceProvider.