/// <summary> /// Create a new instance of <seealso cref="ErrorReportingViewModel"/> class. /// </summary> public ErrorReportingViewModel() { _dataSource = new Lazy <StackdriverErrorReportingDataSource>(CreateDataSource); _groupStatsCollection = new ObservableCollection <ErrorGroupItem>(); GroupStatsView = new ListCollectionView(_groupStatsCollection); SelectedTimeRangeItem = TimeRangeItemList.Last(); OnGotoDetailCommand = new ProtectedCommand <ErrorGroupItem>(NavigateToDetailWindow); OnAutoReloadCommand = new ProtectedCommand(Reload); CredentialsStore.Default.CurrentProjectIdChanged += (sender, e) => OnProjectIdChanged(); CredentialsStore.Default.Reset += (sender, e) => OnProjectIdChanged(); }
/// <summary> /// Create a new instance of <seealso cref="ErrorReportingViewModel"/> class. /// </summary> public ErrorReportingViewModel() { IsVisibleUnbound = true; _package = GoogleCloudExtensionPackage.Instance; _dataSourceLazy = new Lazy <IStackdriverErrorReportingDataSource>(CreateDataSource); _groupStatsCollection = new ObservableCollection <ErrorGroupItem>(); GroupStatsView = new ListCollectionView(_groupStatsCollection); SelectedTimeRangeItem = TimeRangeItemList.Last(); OnGotoDetailCommand = new ProtectedAsyncCommand <ErrorGroupItem>(NavigateToDetailWindowAsync); OnAutoReloadCommand = new ProtectedCommand(Reload); CredentialsStore.Default.CurrentProjectIdChanged += (sender, e) => OnProjectIdChanged(); }