Class RecommendationSetViewModel
View model for sets of recommendations.
Inheritance
Implements
Namespace: Phoenix.Polaris
Assembly: Phoenix.Plugin.Polaris.dll
Syntax
public class RecommendationSetViewModel : BindableBase, IDisposable
Properties
View SourceCompass
Gets the compass to be used for this Recommendation Set
Declaration
public CompassViewModel Compass { get; }
Property Value
Type | Description |
---|---|
CompassViewModel |
Connected
Gets or sets a value indicating whether the recommendation set is connected to the title
Declaration
public bool Connected { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ConnectionStatus
Gets or sets the connection status message
Declaration
public string ConnectionStatus { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Device
Gets the device.
Declaration
public IDevice Device { get; }
Property Value
Type | Description |
---|---|
IDevice |
Feed
Gets the feed for this recommendation set.
Declaration
public FeedVisualizationViewModel Feed { get; }
Property Value
Type | Description |
---|---|
FeedVisualizationViewModel |
PauseAllRecommendations
Gets or sets a value indicating whether to pause all recommendation subscriptions.
Declaration
public bool PauseAllRecommendations { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
RecommendationPanelList
Gets the list of recommendations to display in the recommendation panel.
Declaration
public List<RecommendationViewModel> RecommendationPanelList { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<RecommendationViewModel> |
Recommendations
Gets the list of recommendations.
Declaration
public ObservableCollection<RecommendationViewModel> Recommendations { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<RecommendationViewModel> |
ResetRecommendationsCommand
Gets the reset recommendations command.
Declaration
public DelegateCommand ResetRecommendationsCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
ShowMoveRecommendationButtons
Gets a value indicating whether the move recommendation buttons should be shown.
Declaration
public bool ShowMoveRecommendationButtons { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
TitleName
Gets the name of the title.
Declaration
public string TitleName { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
View SourceCreate(IRecommendationClientFactory, IDevice, IPhoenixLogger, RecommendationSetSettings, ICompassGameStateClient)
Creates a RecommendationSetViewModel.
Declaration
public static async Task<RecommendationSetViewModel> Create(IRecommendationClientFactory factory, IDevice device, IPhoenixLogger logger, RecommendationSetSettings settings, ICompassGameStateClient compassClient = null)
Parameters
Type | Name | Description |
---|---|---|
IRecommendationClientFactory | factory | The recommendation client factory. |
IDevice | device | The device. |
IPhoenixLogger | logger | The logger. |
RecommendationSetSettings | settings | The settings for this recommendation set. |
ICompassGameStateClient | compassClient | The compass game state client if one exists. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<RecommendationSetViewModel> | The RecommendationSetViewModel. |
Dispose()
Declaration
public void Dispose()
ProcessFilterEnabledEvent(CompassObjectEnabledChangedEventArgs)
Declaration
public void ProcessFilterEnabledEvent(CompassObjectEnabledChangedEventArgs compassArgs)
Parameters
Type | Name | Description |
---|---|---|
CompassObjectEnabledChangedEventArgs | compassArgs |
ProcessPolarisRequests(List<PhoenixRequestBase>)
Processes the new Polaris recommendation requests.
Declaration
public void ProcessPolarisRequests(List<PhoenixRequestBase> requests)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<PhoenixRequestBase> | requests | The requests. |
ResetRecommendation()
Resets the recommendation when connection is lost.
Declaration
public async Task ResetRecommendation()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task. |
Update()
Starts the update loop for recommendations.
Declaration
public async Task<bool> Update()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
|
UpdateErrorOccured(Exception)
Parses exception when an update error occurs in order to update the connection status string.
Declaration
public void UpdateErrorOccured(Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | ex | The exception when the error occurred. |
UpdateSettings()
Save the settings for this recommendation set.
Declaration
public void UpdateSettings()