PlatformServices
Declaration
public static class Strawberry.Platform.PlatformServices
Methods
RegisterService static
Registers a platform service implementation
void RegisterService<T>(T service)
Parameters:
| Name | Type | Description |
|---|---|---|
service |
T |
The platform-specific implementation of the service |
Type Parameters:
T— The service interface type to register
GetService static
Gets a platform service of type T. Returns default if the service is not registered on this platform.
T GetService<T>()
Returns: The platform-specific service, or default if not available
Type Parameters:
T— The service interface type to retrieve
Reset static
Clears the service registry
void Reset()