public JabbotStatisticsViewModel(JabbotViewModel jabbot, StatisticsViewModel statistics)
 {
     Jabbot = jabbot ?? JabbotViewModel.Default;
     Statistics = statistics ?? StatisticsViewModel.Default;
 }
Beispiel #2
0
 public JabbotStatisticsViewModel(JabbotViewModel jabbot, StatisticsViewModel statistics)
 {
     Jabbot     = jabbot ?? JabbotViewModel.Default;
     Statistics = statistics ?? StatisticsViewModel.Default;
 }
        private JabbotStatisticsViewModel GetJabbotStatisticsViewModel()
        {
            var jabbotStatisticsViewModel = JabbotStatisticsViewModel.Default;

            try
            {
                var version = Assembly.GetAssembly(typeof(ISprocket)).GetName().Version.ToString();
                var jabbot = new JabbotViewModel(version);
                var jabbotStatistics = GetStatisticsViewModel();

                jabbotStatisticsViewModel = new JabbotStatisticsViewModel(jabbot, jabbotStatistics);
            }
            catch (Exception ex)
            {
                Logger.ErrorException("An error occured while populating the JabbotStatisticsViewModel.", ex);
            }

            return jabbotStatisticsViewModel;
        }