Class PolarisViewModel
View model for displaying Polaris recommendations.
Inherited Members
Namespace: Phoenix.Polaris
Assembly: Phoenix.Plugin.Polaris.dll
Syntax
public class PolarisViewModel : TabItemViewModel<PolarisView>, IViewInitialize, IPolarisViewProvider, IViewProvider, IClosingNotification
Constructors
View SourcePolarisViewModel(PolarisView, IWindowingControl, IEventAggregator, IPhoenixLogger, IEnumerable<IRecommendationClientFactory>, IEnumerable<ICompassGameStateClient>, EventSubscriber, IServiceProvider)
Initializes a new instance of the PolarisViewModel class.
Declaration
public PolarisViewModel(PolarisView view, IWindowingControl windowing, IEventAggregator eventAggregator, IPhoenixLogger logger, IEnumerable<IRecommendationClientFactory> recommendationClientFactories, IEnumerable<ICompassGameStateClient> compassGameStateClients, EventSubscriber eventSubscriber, IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
PolarisView | view | The view this view model is driving. |
IWindowingControl | windowing | |
IEventAggregator | eventAggregator | The event aggregator for the application. |
IPhoenixLogger | logger | The logger for the application. |
System.Collections.Generic.IEnumerable<IRecommendationClientFactory> | recommendationClientFactories | |
System.Collections.Generic.IEnumerable<ICompassGameStateClient> | compassGameStateClients | |
EventSubscriber | eventSubscriber | |
System.IServiceProvider | services |
Fields
View SourceName
The tab header name.
Declaration
public const string Name = "Polaris"
Field Value
Type | Description |
---|---|
System.String |
Properties
View SourceCompassGameStates
Gets the compass game states.
Declaration
public Collection<ICompassGameStateClient> CompassGameStates { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<ICompassGameStateClient> |
CurrentDevice
Gets the currently selected device.
Declaration
public IDevice CurrentDevice { get; }
Property Value
Type | Description |
---|---|
IDevice |
Factories
Gets the factories for getting recommendations.
Declaration
public Collection<IRecommendationClientFactory> Factories { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<IRecommendationClientFactory> |
GetRecommendationsCommand
Gets the command for receiving recommendations.
Declaration
public DelegateCommand GetRecommendationsCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
Instance
Gets the singleton instance for easier access
Declaration
public static PolarisViewModel Instance { get; }
Property Value
Type | Description |
---|---|
PolarisViewModel |
RecommendationSets
Gets or sets the recommendation sets.
Declaration
public IReadOnlyList<RecommendationSetViewModel> RecommendationSets { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<RecommendationSetViewModel> |
RecommendationSettings
Gets the recommendation settings.
Declaration
public PolarisRecommendationSetSettings RecommendationSettings { get; }
Property Value
Type | Description |
---|---|
PolarisRecommendationSetSettings |
SelectedFactory
Gets or sets the selected recommendation client factory.
Declaration
public IRecommendationClientFactory SelectedFactory { get; set; }
Property Value
Type | Description |
---|---|
IRecommendationClientFactory |
SelectedRecommendationSet
Gets or sets the selected recommendation set.
Declaration
public RecommendationSetViewModel SelectedRecommendationSet { get; set; }
Property Value
Type | Description |
---|---|
RecommendationSetViewModel |
SelectedRecommendationSetConnectionStatus
Gets the selected recommendation set's connection status
Declaration
public string SelectedRecommendationSetConnectionStatus { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
View SourceInitialize()
Initializes phoenix managed resources all modules are loaded.
Declaration
protected override void Initialize()
Overrides
OnViewChanged(Object, DependencyPropertyChangedEventArgs)
Updates the logger with the active tabs.
Declaration
protected override void OnViewChanged(object sender, DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The tab being updated. |
System.Windows.DependencyPropertyChangedEventArgs | e | The tab's status (whether or not it is visible). |
Overrides
PauseSelectedRecommendationSet(Boolean)
Sets the pause state of the current recommendation set.
Declaration
public void PauseSelectedRecommendationSet(bool pause)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | pause | The paused state. |
SendPolarisRequests(String, String, List<PhoenixRequestBase>)
Sends the polaris requests to the correct recommendation set.
Declaration
public void SendPolarisRequests(string titleName, string ipAddress, List<PhoenixRequestBase> requests)
Parameters
Type | Name | Description |
---|---|---|
System.String | titleName | Name of the title. |
System.String | ipAddress | The ip for the game's device. |
System.Collections.Generic.List<PhoenixRequestBase> | requests | The requests. |
Uninitialize()
Uninitializes phoenix managed resources when closed.
Declaration
protected override void Uninitialize()