WordCounter.StatsWindowViewModel.StatsWindowViewModel C# (CSharp) Méthode

StatsWindowViewModel() public méthode

Initializes a new instance of the StatsWindowViewModel class.
public StatsWindowViewModel ( ) : System
Résultat System
        public StatsWindowViewModel()
        {
            Items = new ReactiveList<StatViewModel>();

            // this is how we can update the viewmodel
            // from the actor.
            AddItem = new Subject<PublishMetrics>();
            AddItem.ObserveOnDispatcher().Subscribe( item => HandleNewItemOnList( item ) );

            m_vmActor = AkkaSystem.System.ActorOf( StatObserver.GetProps( this ), "stat-window" );
            Publisher = AkkaSystem.System.ActorSelection( "/user/" + AkkaSystemMonitorActor.Name );

            // TODO: what to do if publisher not found.
            Publisher.Tell( new SubscribeMonitorMessage( m_vmActor ) );
        }