Class BaseService
Namespace: RealityCollective.ServiceFramework.Services
Base IService Implementation.
public class BaseService : IService
Inheritance
object ← BaseService
Derived
Implements
Constructors
BaseService()
Constructor.
protected BaseService()
Properties
IsEnabled
public virtual bool IsEnabled { get; protected set; }
Property Value
bool
IsServiceRegistered
Is this service currently registered with the Service Manager?
public virtual bool IsServiceRegistered { get; }
Property Value
bool
Name
The service display name.
public virtual string Name { get; protected set; }
Property Value
string
Priority
Optional Priority to reorder registered managers based on their respective priority, reduces the risk of race conditions by prioritizing the order in which services are evaluated.
public virtual uint Priority { get; protected set; }
Property Value
uint
RegisterServiceModules
Should services modules be automatically registered for this Service and be maintained by the Service Framework, or are they managed internally by the Service itself.
public virtual bool RegisterServiceModules { get; }
Property Value
bool
ServiceGuid
Cached Guid Reference for the Service / Module
public Guid ServiceGuid { get; }
Property Value
Guid
ServiceModules
List of Service Modules to be managed by a Service Implementation. Not to be used for Service Modules themselves.
public virtual IReadOnlyCollection<IServiceModule> ServiceModules { get; }
Property Value
IReadOnlyCollection<IServiceModule>
Methods
Destroy()
Optional Destroy function to perform cleanup of the service before the Service Manager is destroyed.
public virtual void Destroy()
DestroyAllserviceModules()
public void DestroyAllserviceModules()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~BaseService()
protected ~BaseService()
FixedUpdate()
Optional FixedUpdate function to perform updates that are fixed to the Physics timestep.
public virtual void FixedUpdate()
Initialize()
The initialize function is used to setup the service once created. This method is called once all services have been registered in the ServiceManager.
public virtual void Initialize()
LateUpdate()
Optional LateUpdate function to perform updates after the end of the last Update cycle.
public virtual void LateUpdate()
OnApplicationFocus(bool)
Optional function that is called when the application gains or looses focus.
public virtual void OnApplicationFocus(bool isFocused)
Parameters
isFocused bool
OnApplicationPause(bool)
Optional function that is called when the application is paused or un-paused.
public virtual void OnApplicationPause(bool isPaused)
Parameters
isPaused bool
OnDispose(bool)
protected virtual void OnDispose(bool finalizing)
Parameters
finalizing bool
RegisterServiceModule(IServiceModule)
Register a Service Module with its parent service
public virtual void RegisterServiceModule(IServiceModule serviceModule)
Parameters
serviceModule IServiceModule
Reset()
Optional Reset function to perform that will Reset the service, for example, whenever there is a profile change.
public virtual void Reset()
Start()
The start function is used to for running on the first frame. This method is called once all services have been registered in the ServiceManager and the application is in play mode.
public virtual void Start()
UnRegisterServiceModule(IServiceModule)
UnRegister a Service Module with its parent service
public virtual void UnRegisterServiceModule(IServiceModule serviceModule)
Parameters
serviceModule IServiceModule
Update()
Optional Update function to perform per-frame updates of the service.
public virtual void Update()