Ejemplo n.º 1
0
        public IActionResult Index()
        {
            CounterService.Increment();
            var count = CounterService.GetCount();
            var msg   = ImportantBusiness.GetGreetingMessage();

            return(View(new GreetingViewModel(msg.Message, count)));
        }
Ejemplo n.º 2
0
 public WelcomePageViewModel(ICounterService counterService, IEventAggregator eventAggregator)
 {
     WelcomeText          = "Welcome Guy";
     AddCountCommand      = new DelegateCommand(Increment, CanExecuteAddCommand).ObservesProperty(() => Amount);
     this.counterService  = counterService;
     this.eventAggregator = eventAggregator;
     this.Count           = counterService.GetCount();
 }
Ejemplo n.º 3
0
 public StatusPageViewModel(ICounterService counterService, IEventAggregator eventAggregator, INavigationService navigationService)
 {
     Counter = counterService.GetCount();
     this.eventAggregator   = eventAggregator;
     this.navigationService = navigationService;
 }
 public int GetCount()
 {
     return(_counterService.GetCount());
 }