protected override void InternalProcessRecord()
 {
     TaskLogger.LogEnter();
     CmdletProxy.ThrowExceptionIfProxyIsNeeded(base.CurrentTaskContext, this.DataObject, false, this.ConfirmationMessage, null);
     try
     {
         using (MailboxSession mailboxSession = ContactLinkingBaseCmdLet.OpenMailboxSessionAsAdmin(this.DataObject, this.UserAgent))
         {
             this.PerformanceTracker = new ContactLinkingPerformanceTracker(mailboxSession);
             if (this.OwnsPerformanceTrackerLifeCycle)
             {
                 this.PerformanceTracker.Start();
             }
             this.ContactLinkingOperation(mailboxSession);
         }
     }
     catch (Exception ex)
     {
         TaskLogger.LogError(ex);
         this.WriteError(ex, ErrorCategory.NotSpecified, this.Identity, true);
     }
     finally
     {
         if (this.OwnsPerformanceTrackerLifeCycle && this.PerformanceTracker != null)
         {
             this.PerformanceTracker.Stop();
         }
         this.WritePerformanceData();
         TaskLogger.LogExit();
     }
 }
 private void WritePerformanceData()
 {
     if (this.PerformanceTracker != null)
     {
         ILogEvent logEvent = this.PerformanceTracker.GetLogEvent();
         base.WriteObject(ContactLinkingBaseCmdLet.CreateResultObject(this.Identity, logEvent));
     }
 }