private void PerformMonitoringServiceBasicCmdletTest(ref MonitoringServiceBasicCmdletOutcome result) { SmtpAddress?multiTenantAutomatedTaskUser = TestConnectivityCredentialsManager.GetMultiTenantAutomatedTaskUser(this, null, null, DatacenterUserType.EDU); if (multiTenantAutomatedTaskUser == null) { throw new MailboxNotFoundException(new MailboxIdParameter(), null); } result.Update(MonitoringServiceBasicCmdletResultEnum.Success, null); if (this.MonitoringContext) { this.monitoringData.Events.Add(new MonitoringEvent(TestMonitoringServiceBasicCmdletTask.CmdletMonitoringEventSource, 1000, EventTypeEnumeration.Success, string.Format("TestMonitoringServiceBasicCmdlet succeeded. Test user returned: [{0}]", multiTenantAutomatedTaskUser.ToString()))); } }
protected override void InternalProcessRecord() { base.InternalBeginProcessing(); TaskLogger.LogEnter(); try { MonitoringServiceBasicCmdletOutcome sendToPipeline = new MonitoringServiceBasicCmdletOutcome(this.Server.ToString()); this.PerformMonitoringServiceBasicCmdletTest(ref sendToPipeline); base.WriteObject(sendToPipeline); } catch (LocalizedException e) { this.HandleException(e); } finally { if (this.MonitoringContext) { base.WriteObject(this.monitoringData); } TaskLogger.LogExit(); } }