Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IThemeService.cs
1using System.Threading;
3
5{
10 [DefaultImplementation(typeof(ThemeService))]
11 public interface IThemeService
12 {
17
24 Task<ThemeApplyOutcome> ApplyProviderThemeAsync(ThemeFetchPolicy Policy, CancellationToken CancellationToken = default);
25
29 Task<AppTheme> GetTheme();
30
35 void SetTheme(AppTheme Theme);
36
41 void SetLocalTheme(AppTheme Theme);
42
46 IReadOnlyDictionary<string, Uri> ImageUris { get; }
47
51 TaskCompletionSource ThemeLoaded { get; }
52
57
62 string GetImageUri(string Id);
63 }
64}
Manages application theming. Applies bundled (local) light/dark themes and, when a provider domain is...
Definition: ThemeService.cs:24
Service for loading, applying, and retrieving themes and branding in the application....
TaskCompletionSource ThemeLoaded
If the theme has been loaded.
string GetImageUri(string Id)
Returns the image URI for the given identifier, or empty string if not found.
Task< ThemeApplyOutcome > ApplyProviderThemeAsync(ThemeFetchPolicy Policy, CancellationToken CancellationToken=default)
Loads and applies the provider-supplied theme according to the specified policy.
Task< int > ClearBrandingCacheForCurrentDomain()
Clears locally cached branding descriptors for the current provider domain.
Task ApplyProviderThemeAsync()
Loads and applies the provider-supplied theme, if available, using the background refresh policy.
IReadOnlyDictionary< string, Uri > ImageUris
Gets the mapping of image identifiers to their URIs.
void SetLocalTheme(AppTheme Theme)
Sets the active theme.
void SetTheme(AppTheme Theme)
Sets the application theme.
Task< AppTheme > GetTheme()
Retrieves the current application theme.
ThemeFetchPolicy
Defines how provider branding should be fetched and applied.