Init(args)
Scripting Reference
Loading...
Searching...
No Matches
Sisus.Init.ServiceProvider Class Referencesealed

Description

A global service that clients can use to acquire other global and local services by their defining types.

Implements the Sisus.Init.IServiceProvider and System.IServiceProvider interfaces.

This is just a simple proxy for the Service.TryGet<TService> and Service.TryGetFor<TService>(Component, out TService) methods.

Inheritance diagram for Sisus.Init.ServiceProvider:
Sisus.Init.IServiceProvider Sisus.Init.IValueByTypeProvider Sisus.Init.INullGuardByType

Public Member Functions

bool TryGet< TService > (out TService service)
 Tries to get a service of type TService that is accessible to clients Clients.Everywhere .
Template Parameters
TServiceType of the requested service.

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

 
bool TryGetFor< TService > (Component client, 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.

 
bool CanProvideValue< TService > ([AllowNull] Component client)
 
- Public Member Functions inherited from Sisus.Init.INullGuardByType
NullGuardResult EvaluateNullGuard< TValue > ([AllowNull] Component client)
 Gets a value indicating whether null guard passes for this object or not, and if not, what was the cause of the failure.
 
- Public Member Functions inherited from Sisus.Init.IValueByTypeProvider
bool TryGetFor< TValue > ([AllowNull] Component client, [NotNullWhen(true), MaybeNullWhen(false)] out TValue value)
 Gets the value of type TValue for the client .
 
bool TryGetFor ([AllowNull] Component client, [DisallowNull] Type valueType, out object value)
 Gets the value of the given type for the client .
 
bool HasValueFor< TValue > (Component client)
 Gets a value indicating whether this value provider can provide a value of type TValue for the client at this time.
 
bool CanProvideValue< TValue > ([AllowNull] Component client)
 Gets a value indicating whether this value provider can potentially provide a value of the given type to the client at runtime.