Modifier

Partager via


IMixedRealityServiceRegistrar.RegisterService Method

Definition

Overloads

RegisterService<T>(T)

Registers a service of the specified type.

RegisterService<T>(Type, SupportedPlatforms, Object[])

Registers a service of the specified type.

RegisterService<T>(T)

Registers a service of the specified type.

public:
generic <typename T>
 where T : Microsoft::MixedReality::Toolkit::IMixedRealityService bool RegisterService(T serviceInstance);
public bool RegisterService<T> (T serviceInstance) where T : Microsoft.MixedReality.Toolkit.IMixedRealityService;
abstract member RegisterService : 'T -> bool (requires 'T :> Microsoft.MixedReality.Toolkit.IMixedRealityService)
Public Function RegisterService(Of T As IMixedRealityService) (serviceInstance As T) As Boolean

Type Parameters

T

The interface type of the service to be registered (ex: IMixedRealityBoundarySystem).

Parameters

serviceInstance
T

An instance of the service to be registered.

Returns

Applies to

RegisterService<T>(Type, SupportedPlatforms, Object[])

Registers a service of the specified type.

public bool RegisterService<T> (Type concreteType, Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms supportedPlatforms = Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Android | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.IOS | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxStandalone | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Lumin | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacStandalone | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Web | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsStandalone | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsUniversal, params object[] args) where T : Microsoft.MixedReality.Toolkit.IMixedRealityService;
abstract member RegisterService : Type * Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms * obj[] -> bool (requires 'T :> Microsoft.MixedReality.Toolkit.IMixedRealityService)
Public Function RegisterService(Of T As IMixedRealityService) (concreteType As Type, Optional supportedPlatforms As SupportedPlatforms = Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Android | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.IOS | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.LinuxStandalone | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Lumin | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.MacStandalone | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.Web | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsEditor | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsStandalone | Microsoft.MixedReality.Toolkit.Utilities.SupportedPlatforms.WindowsUniversal, ParamArray args As Object()) As Boolean

Type Parameters

T

The interface type of the service to be registered (ex: IMixedRealityBoundarySystem).

Parameters

concreteType
Type

The concrete type to instantiate.

supportedPlatforms
SupportedPlatforms

The platform(s) on which the service is supported.

args
Object[]

Optional arguments used when instantiating the concrete type.

Returns

True if the service was successfully registered, false otherwise.

Applies to