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

◆ Set< TService >()

static void Sisus.Init.Service.Set< TService > ( [DisallowNull] TService newInstance)
static

Sets the TService service instance shared across clients to the given value.

If the provided instance is not equal to the old ScopedService<TService>.Instance then the ServiceChanged<TService>.listeners event will be raised.

Template Parameters
TServiceThe defining type of the service.
Parameters
newInstanceThe new instance of the service.