protected override void ProcessRequest() { using (OperationTracker.Create(this.logger, "Applying processor {0} to mailbox {1}.", new object[] { this.Processor.GetType().FullName, this.Mailbox.Identity })) { using (RunspaceReservation runspaceReservation = this.cmdletPool.AcquireRunspace()) { this.Processor.ProcessMailbox(this.Mailbox, runspaceReservation.Runspace); } } }
protected override void ProcessRequest() { using (RunspaceReservation runspaceReservation = this.cmdletPool.AcquireRunspace()) { this.logger.Log(MigrationEventType.Verbose, "About to execute powershell command {0}", new object[] { this.CommandString }); this.Result = runspaceReservation.Runspace.RunPSCommandSingleOrDefault <TCmdletResult>(this.Command, out this.error); if (this.error != null && this.error.Exception != null) { this.error.Exception.PreserveExceptionStack(); } this.logger.Log(MigrationEventType.Verbose, "Finished executing powershell request. Error: {0}", new object[] { this.error }); } }