Method in RandomBestLeastRecentlyViewedSalienceStrategy
Chooses an item from content that is the most appropriate (or salient ) for the user's current context.
Implementations of this method should not modify any state
that is, they should be 'read-only' operations. If a strategy needs to record information about when a piece of content has been selected, it should do it in the ContentWasSelected(ContentSaliencyOption) method.
System.Collections.Generic.IEnumerable<Yarn.Saliency.ContentSaliencyOption>
content
A collection of content items. This collection may be empty.
An item from content
that is the most appropriate for display, or null
if no content should be displayed.
Constructor in RandomBestLeastRecentlyViewedSalienceStrategy
Initializes a new instance of the RandomBestLeastRecentlyViewedSalienceStrategy class.
storage
The variable storage to use when determining which content to show.
Method in RandomBestLeastRecentlyViewedSalienceStrategy
Called by Yarn Spinner to indicate that a piece of salient content has been selected, and this system should update any state related to how it selects content.
If a content saliency strategy does not need to keep track of any state, then this method can be empty.
content
The content that has been selected.
Class in
Inherits from System.Object
A content saliency strategy that returns a random choice of the best, least-recently seen choices from the provided options.
This strategy stores information about the number of times each piece of content has been seen in the provided Yarn.Saliency.RandomBestLeastRecentlyViewedSalienceStrategy.VariableStorage
.
Initializes a new instance of the class.
Called by Yarn Spinner to indicate that a piece of salient content has been selected, and this system should update any state related to how it selects content.
Chooses an item from content that is the most appropriate (or salient ) for the user's current context.