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

◆ Get() [2/2]

static object Sisus.Init.ServiceUtility.Get ( object client,
[DisallowNull] Type definingType,
Context context = Context::MainThread )
static

Gets the shared service instance of the given definingType .

The returned object's class will match the provided definingType , derive from it or implement an interface of the type.

If no such service has been registered then null is returned.

Exceptions
NullReferenceExceptionThrown if no service of type TService is found that is accessible to the client .
Parameters
clientThe client that needs the service.
definingTypeThe defining type of the service.
contextThe context from which the request is being made.
Returns
Shared instance of the service of the given type.