LaunchBoxContributors
On this page

IPlayActivitySource14.1

Interface in Unbroken.LaunchBox.Plugins.Components.Activity

C#
public interface IPlayActivitySource : IPluginComponentMetadata
Supplies cumulative activity independently of storefront ownership, import or launch support.

Remarks

Implement on an existing component to share activation and connections, or register as game-activity-source/1. Calls must honor the captured context; never substitute another account. The host owns statistics, matching, timeouts and local session tracking.

Inheritance and interfaces

Properties

  • SourceGets inexpensive local source metadata.

Source

C#
Gets inexpensive local source metadata.

Methods

GetActivityAsync

C#
Task<PlayActivityResult> GetActivityAsync(
    PlayActivityRequest request,
    CancellationToken cancellationToken
)
Gets cumulative observations for exactly the requested context and items.
request
Associated source-local item IDs and captured context.
cancellationToken
Cancels retrieval.

Returns

Observations; omitted items or fields are unknown and never reset saved values.

GetActivityContextAsync

C#
Task<PlayActivityContextResult> GetActivityContextAsync(
    CancellationToken cancellationToken
)
Gets the selected account or local-profile context.
cancellationToken
Cancels retrieval.

Returns

The selected context; a complete null context means unconfigured.

Events

  • ContextsChangedRaised when the selected account/profile changes or disconnects, invalidating outstanding observations.

ContextsChanged

C#
event EventHandler? ContextsChanged
Raised when the selected account/profile changes or disconnects, invalidating outstanding observations.