protected override void OnDoRefreshWork(RefreshRequestEventArgs e) { MonadCommand monadCommand = e.Argument as MonadCommand; if (monadCommand == null || monadCommand.Parameters.Contains("Identity") || (monadCommand.Parameters.Contains("server") && !string.IsNullOrEmpty((string)monadCommand.Parameters["server"].Value))) { base.OnDoRefreshWork(e); return; } DataTable result = base.Table.Clone(); e.Result = result; e.ReportProgress(100, 100, "", null); }
protected override void OnDoRefreshWork(RefreshRequestEventArgs e) { this.progress = new RefreshRequestEventArgsToIProgressAdapter(e); try { this.ResetStatus(); PSConnectionInfoSingleton.GetInstance().ReportProgress = this.progress; PSConnectionInfoSingleton.GetInstance().GetMonadConnectionInfo(); this.progress.ReportProgress(50, 100, Strings.ProgressReportInitializeHelpService, Strings.ProgressReportInitializeHelpServiceErrorText); ExchangeHelpService.Initialize(); this.erc = CmdletBasedRunspaceConfiguration.Create(PSConnectionInfoSingleton.GetInstance().GetMonadConnectionInfo(), PSConnectionInfoSingleton.GetInstance().UserAccount, this.progress); this.TenantDomain = ((this.erc.LogonUserLiveID == SmtpAddress.Empty) ? null : this.erc.LogonUserLiveID.Domain); } finally { this.progress.ReportProgress(100, 100, Strings.ProgressReportEnd, string.Empty); PSConnectionInfoSingleton.GetInstance().ReportProgress = null; } base.OnDoRefreshWork(e); }
public RefreshRequestEventArgsToIProgressAdapter(RefreshRequestEventArgs eventArgs) { this.eventArgs = eventArgs; }
public abstract void DoPostRefreshAction(DataTableLoader loader, RefreshRequestEventArgs refreshRequest);