public NextEventsSummaryViewModel(IViewModelDependencies appCtx, IZetboxContext dataCtx, ViewModel parent) : base(appCtx, dataCtx, parent) { _fetchCache = new FetchCache(ViewModelFactory, DataContext, this); _syncContext = SynchronizationContext.Current; _timer = new System.Timers.Timer(); _timer.Interval = 60 * 1000; _timer.Elapsed += new System.Timers.ElapsedEventHandler(_timer_Elapsed); _timer.Start(); }
public CalendarWorkspaceViewModel(IViewModelDependencies appCtx, IZetboxContext dataCtx, ViewModel parent, Func<ReportingHost> rptFactory) : base(appCtx, dataCtx, parent) { if (dataCtx.IsolationLevel != ContextIsolationLevel.MergeQueryData) throw new ArgumentOutOfRangeException("dataCtx", string.Format("CalendarWorkspaceViewModel requires a MergeQueryData context. The specified dataCtx ({0}) has {1}", dataCtx, dataCtx.IsolationLevel)); _rptFactory = rptFactory; _fetchCache = new FetchCache(ViewModelFactory, DataContext, this); }