Class BaseService
The base service implements IMixedRealityService and provides default properties for all services.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit
Assembly: cs.temp.dll.dll
Syntax
public abstract class BaseService : IMixedRealityService, IDisposable, IMixedRealityServiceState
Fields
DefaultPriority
Declaration
public const uint DefaultPriority = 10U
Field Value
Type | Description |
---|---|
UInt32 |
disposed
Value indicating if the object has completed disposal.
Declaration
protected bool disposed
Field Value
Type | Description |
---|---|
Boolean |
Remarks
Set by derived classes to indicate that disposal has been completed.
Properties
ConfigurationProfile
The configuration profile for the service.
Declaration
public virtual BaseMixedRealityProfile ConfigurationProfile { get; protected set; }
Property Value
Type | Description |
---|---|
BaseMixedRealityProfile |
Remarks
Many services may wish to provide a typed version (ex: MixedRealityInputSystemProfile) that casts this value for ease of use in calling code.
IsEnabled
Indicates whether or not the service is currently enabled.
Declaration
public virtual bool IsEnabled { get; protected set; }
Property Value
Type | Description |
---|---|
Boolean |
IsInitialized
Indicates whether or not the service has been initialized.
Declaration
public virtual bool IsInitialized { get; protected set; }
Property Value
Type | Description |
---|---|
Boolean |
IsMarkedDestroyed
Indicates whether or not the Destroy method been called on this service.
Declaration
public virtual bool IsMarkedDestroyed { get; protected set; }
Property Value
Type | Description |
---|---|
Boolean |
Name
Optional Priority attribute if multiple services of the same type are required, enables targeting a service for action.
Declaration
public virtual string Name { get; protected set; }
Property Value
Type | Description |
---|---|
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 managers are evaluated.
Declaration
public virtual uint Priority { get; protected set; }
Property Value
Type | Description |
---|---|
UInt32 |
Methods
Destroy()
Optional Destroy function to perform cleanup of the service before the Mixed Reality Toolkit is destroyed.
Declaration
public virtual void Destroy()
Disable()
Optional Disable function to pause the service.
Declaration
public virtual void Disable()
Dispose()
Cleanup resources used by this object.
Declaration
public void Dispose()
Dispose(Boolean)
Cleanup resources used by the object
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | Are we fully disposing the object? True will release all managed resources, unmanaged resources are always released. |
Enable()
Optional Enable function to enable / re-enable the service.
Declaration
public virtual void Enable()
Finalize()
Finalizer
Declaration
protected void Finalize()
Initialize()
The initialize function is used to setup the service once created. This method is called once all services have been registered in the Mixed Reality Toolkit.
Declaration
public virtual void Initialize()
LateUpdate()
Optional LateUpdate function to that is called after Update has been called on all services.
Declaration
public virtual void LateUpdate()
Reset()
Optional Reset function to perform that will Reset the service, for example, whenever there is a profile change.
Declaration
public virtual void Reset()
Update()
Optional Update function to perform per-frame updates of the service.
Declaration
public virtual void Update()