示例#1
0
 // Instantiate a factory, setting YetiConstants.Title for the progress dialog title text
 // and using a default delay.
 public Factory(JoinableTaskContext taskContext,
                ProgressDialog.Factory waitDialogFactory) : this(
         taskContext, waitDialogFactory, YetiConstants.YetiTitle, defaultDelay,
         defaultReportPeriod)
 {
     taskContext.ThrowIfNotOnMainThread();
 }
示例#2
0
 public Factory(JoinableTaskContext taskContext,
                ProgressDialog.Factory progressDialogFactory, string title,
                TimeSpan delay, TimeSpan reportPeriod)
 {
     this.taskContext           = taskContext;
     this.progressDialogFactory = progressDialogFactory;
     this.title        = title;
     this.delay        = delay;
     this.reportPeriod = reportPeriod;
 }
        public virtual CancelableTask.Factory GetCancelableTaskFactory()
        {
            if (_cancelableTaskFactory == null)
            {
                var taskContext           = _serviceManager.GetJoinableTaskContext();
                var progressDialogFactory = new ProgressDialog.Factory();
                _cancelableTaskFactory =
                    new CancelableTask.Factory(taskContext, progressDialogFactory);
            }

            return(_cancelableTaskFactory);
        }