IPlayerProfileManager14.1
Interface in Unbroken.LaunchBox.Plugins.Services.Profiles
public interface IPlayerProfileManagerProvides the configured player's profile from any installed profile provider, independently of achievement support.
Remarks
Request this service by declaring a public constructor with an IPlayerProfileManager parameter and call asynchronously after activation. Reads never sign in, change accounts, or expose credentials or provider instances. Caller cancellation throws OperationCanceledException; retrieval problems are reported in results. Recent player activity is separate from the profile.Methods
GetAsyncReads the configured player's profile, reusing a recent host observation after confirming the selected account.GetSourcesAsyncLists registered profile sources without querying accounts or making network requests.RefreshAsyncRefreshes the configured player's profile, bypassing the host's recent observation cache.
GetAsync
Task<PluginServiceResult<PlayerProfile>> GetAsync(
string sourceId,
CancellationToken cancellationToken
)Reads the configured player's profile, reusing a recent host observation after confirming the selected account.
sourceId- The profile source identity.
cancellationToken- Cancels retrieval.
Returns
The existing PlayerProfile payload and explicit retrieval state. Account resolution and an expired cache can require provider requests. Saved data can be returned when the provider is unavailable or retrieval fails for the same confirmed account.GetSourcesAsync
Task<IReadOnlyList<PluginSourceInfo>> GetSourcesAsync(
CancellationToken cancellationToken
)Lists registered profile sources without querying accounts or making network requests.
cancellationToken- Cancels the operation.
Returns
One entry per source, including disabled or conflicting sources marked unavailable. Removed sources are omitted; saved profiles can still be read by a known source ID.RefreshAsync
Task<PluginServiceResult<PlayerProfile>> RefreshAsync(
string sourceId,
CancellationToken cancellationToken
)Refreshes the configured player's profile, bypassing the host's recent observation cache.
sourceId- The profile source identity.
cancellationToken- Cancels retrieval.