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

◆ RemoveFrom< TService >() [3/3]

static void Sisus.Init.Service.RemoveFrom< TService > ( Clients clients,
[DisallowNull] TService service )
static

Unregisters a service with the defining type TService that has been available to a limited set of clients.

If the provided instance is available to clients Clients.Everywhere then the ServiceChanged<TService>.listeners event will be raised.

Template Parameters
TServiceThe defining type of the service; the class or interface type that uniquely defines the service and can be used to retrieve an instance of it.

This must be an interface that the service implement, a base type that the service derives from, or the exact type of the service.

This must also be a component type. If you want to unregister a service that is not a component, or want to unregister a component service using an interface that it implements, you can use the overload that lets you provide a Component type reference separately.

Parameters
clientsThe availability of the service being removed.
serviceThe service component to remove.
Type Constraints
TService :Component