Class UnityEditorOsMonitorCache
Operating system monitor cache for Unity Editor tools and utilities.
Provides thread-safe caching of OS monitor information with configurable refresh throttling and factory injection.
Features minimum fetch interval protection, cache invalidation, and fallback provider support.
Designed for Editor-time system monitor discovery and display configuration tooling.
Inherited Members
Namespace: Serenity.SystemConfiguration.Infrastructure.Utils.Editor
Assembly: Serenity.UnitySystemConfiguration.Infrastructure.Editor.dll
Syntax
public static class UnityEditorOsMonitorCache
Methods
ConfigureFactory(ISystemMonitorsProviderFactory)
Configures the factory for creating system monitor providers.
Invalidates the current cache to ensure fresh data with the new provider.
Declaration
public static void ConfigureFactory(ISystemMonitorsProviderFactory factory)
Parameters
| Type | Name | Description |
|---|---|---|
| ISystemMonitorsProviderFactory | factory | The monitor provider factory to use for subsequent operations. |
GetMonitors(bool)
Retrieves the list of operating system monitors with caching and minimum refresh throttling.
Provides thread-safe access to monitor information with configurable force refresh capability.
Declaration
public static IReadOnlyList<OsMonitorInfo> GetMonitors(bool forceRefresh = false)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | forceRefresh | If true, bypasses cache and minimum fetch interval to get fresh data. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<OsMonitorInfo> | Read-only list of OS monitor information, or empty list if detection fails. |
Invalidate()
Clears the monitor cache to force a refresh on the next read operation.
Resets the fetch timer and cached monitor list to ensure fresh data collection.
Declaration
public static void Invalidate()