internal bool ContactEntryUploadFailure(
     ContactEntry contactEntry,
     UploadResult uploadResult) {
   Debug.Assert(uploadResult == UploadResult.InternalError ||
       uploadResult == UploadResult.ServiceUnavailable ||
       uploadResult == UploadResult.Conflict ||
       uploadResult == UploadResult.Unknown);
   try {
     GoogleEmailUploaderTrace.EnteringMethod(
         "GoogleEmailUploaderModel.ContactBatchUploadFailure()");
     if (GoogleEmailUploaderConfig.LogFullXml) {
       GoogleEmailUploaderTrace.WriteLine("Response Xml:");
       GoogleEmailUploaderTrace.WriteXml(contactEntry.ResponseString);
     }
     GoogleEmailUploaderTrace.WriteLine("Contact upload failure ({0}): {1}",
                              uploadResult,
                              contactEntry.ContactName);
     if (uploadResult == UploadResult.InternalError ||
         uploadResult == UploadResult.Conflict ||
         uploadResult == UploadResult.Unknown) {
       if (this.pauseTime == GoogleEmailUploaderConfig.MaximumPauseTime) {
         GoogleEmailUploaderTrace.WriteLine(
             "Contact failed with internal error");
         GoogleEmailUploaderTrace.WriteLine("Xml -");
         GoogleEmailUploaderTrace.WriteXml(contactEntry.GetEntryXML());
         GoogleEmailUploaderTrace.WriteLine("Result -");
         GoogleEmailUploaderTrace.WriteXml(contactEntry.ResponseString);
         this.ProcessUploadContactEntry(contactEntry);
         this.pauseTime = GoogleEmailUploaderConfig.MinimumPauseTime;
         return false;
       }
       this.TimedPauseUpload(PauseReason.ServerInternalError);
       this.RaisePauseTime();
     } else {
       GoogleEmailUploaderTrace.WriteLine(
           "Batch failed with service unavailable");
       this.TimedPauseUpload(PauseReason.ServiceUnavailable);
       this.RaisePauseTime();
     }
     return true;
   } finally {
     GoogleEmailUploaderTrace.ExitingMethod(
         "GoogleEmailUploaderModel.ContactBatchUploadFailure()");
   }
 }
 internal void ContactEntryUploadTryStart(ContactEntry contactEntry) {
   try {
     GoogleEmailUploaderTrace.EnteringMethod(
         "GoogleEmailUploaderModel.ContactBatchUploadTryStart()");
     if (GoogleEmailUploaderConfig.LogFullXml) {
       GoogleEmailUploaderTrace.WriteLine("Request Xml:");
       GoogleEmailUploaderTrace.WriteXml(contactEntry.GetEntryXML());
     }
     if (this.ContactUploadTryStartEvent != null) {
       this.ContactUploadTryStartEvent(contactEntry);
     }
   } finally {
     GoogleEmailUploaderTrace.ExitingMethod(
         "GoogleEmailUploaderModel.ContactBatchUploadTryStart()");
   }
 }