コード例 #1
0
 internal static void ValidateRequestJob(RequestJobBase requestJob)
 {
     if (requestJob.IsFake || requestJob.WorkItemQueueMdb == null)
     {
         requestJob.ValidationResult  = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.DataMissing);
         requestJob.ValidationMessage = MrsStrings.ValidationMoveRequestNotDeserialized;
         return;
     }
     if (requestJob.OriginatingMDBGuid != Guid.Empty && requestJob.OriginatingMDBGuid != requestJob.WorkItemQueueMdb.ObjectGuid)
     {
         requestJob.ValidationResult  = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Orphaned);
         requestJob.ValidationMessage = MrsStrings.ValidationMoveRequestInWrongMDB(requestJob.OriginatingMDBGuid, requestJob.WorkItemQueueMdb.ObjectGuid);
         return;
     }
     if (requestJob.CancelRequest)
     {
         requestJob.ValidationResult  = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Valid);
         requestJob.ValidationMessage = LocalizedString.Empty;
         return;
     }
     if (!requestJob.SourceIsLocal && !requestJob.ValidateOutlookAnywhereParams())
     {
         return;
     }
     if (!requestJob.TargetIsLocal && !requestJob.ValidateOutlookAnywhereParams())
     {
         return;
     }
     if (!requestJob.ValidateRequestIndexEntries())
     {
         return;
     }
     requestJob.ValidationResult  = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Valid);
     requestJob.ValidationMessage = LocalizedString.Empty;
 }
コード例 #2
0
 internal static void ValidateRequestJob(RequestJobBase requestJob)
 {
     if (requestJob.IsFake || requestJob.WorkItemQueueMdb == null)
     {
         requestJob.ValidationResult  = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.DataMissing);
         requestJob.ValidationMessage = MrsStrings.ValidationMoveRequestNotDeserialized;
         return;
     }
     if (requestJob.OriginatingMDBGuid != Guid.Empty && requestJob.OriginatingMDBGuid != requestJob.WorkItemQueueMdb.ObjectGuid)
     {
         requestJob.ValidationResult  = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Orphaned);
         requestJob.ValidationMessage = MrsStrings.ValidationMoveRequestInWrongMDB(requestJob.OriginatingMDBGuid, requestJob.WorkItemQueueMdb.ObjectGuid);
         return;
     }
     if (requestJob.CancelRequest)
     {
         requestJob.ValidationResult  = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Valid);
         requestJob.ValidationMessage = LocalizedString.Empty;
         return;
     }
     if (requestJob.Status == RequestStatus.Completed || requestJob.Status == RequestStatus.CompletedWithWarning)
     {
         SyncRequestStatistics.LoadAdditionalPropertiesFromUser(requestJob);
         requestJob.ValidationResult  = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Valid);
         requestJob.ValidationMessage = LocalizedString.Empty;
         return;
     }
     SyncRequestStatistics.LoadAdditionalPropertiesFromUser(requestJob);
     if (!requestJob.ValidateRequestIndexEntries())
     {
         return;
     }
     requestJob.ValidationResult  = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Valid);
     requestJob.ValidationMessage = LocalizedString.Empty;
 }
コード例 #3
0
		internal static void ValidateRequestJob(RequestJobBase requestJob)
		{
			if (requestJob.IsFake || requestJob.WorkItemQueueMdb == null)
			{
				requestJob.ValidationResult = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.DataMissing);
				requestJob.ValidationMessage = MrsStrings.ValidationMoveRequestNotDeserialized;
				return;
			}
			if (requestJob.OriginatingMDBGuid != Guid.Empty && requestJob.OriginatingMDBGuid != requestJob.WorkItemQueueMdb.ObjectGuid)
			{
				requestJob.ValidationResult = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Orphaned);
				requestJob.ValidationMessage = MrsStrings.ValidationMoveRequestInWrongMDB(requestJob.OriginatingMDBGuid, requestJob.WorkItemQueueMdb.ObjectGuid);
				return;
			}
			if (requestJob.CancelRequest)
			{
				requestJob.ValidationResult = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Valid);
				requestJob.ValidationMessage = LocalizedString.Empty;
				return;
			}
			if (requestJob.Status == RequestStatus.Completed || requestJob.Status == RequestStatus.CompletedWithWarning)
			{
				MergeRequestStatistics.LoadAdditionalPropertiesFromUsers(requestJob);
				requestJob.ValidationResult = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Valid);
				requestJob.ValidationMessage = LocalizedString.Empty;
				return;
			}
			if (requestJob.SourceIsLocal)
			{
				if (!requestJob.ValidateUser(requestJob.SourceUser, requestJob.SourceUserId))
				{
					return;
				}
				if (!requestJob.ValidateMailbox(requestJob.SourceUser, requestJob.SourceIsArchive))
				{
					return;
				}
			}
			else if (!requestJob.ValidateOutlookAnywhereParams())
			{
				return;
			}
			if (requestJob.TargetIsLocal)
			{
				if (!requestJob.ValidateUser(requestJob.TargetUser, requestJob.TargetUserId))
				{
					return;
				}
				if (!requestJob.ValidateMailbox(requestJob.TargetUser, requestJob.TargetIsArchive))
				{
					return;
				}
			}
			else if (!requestJob.ValidateOutlookAnywhereParams())
			{
				return;
			}
			MergeRequestStatistics.LoadAdditionalPropertiesFromUsers(requestJob);
			if (!requestJob.ValidateRequestIndexEntries())
			{
				return;
			}
			requestJob.ValidationResult = new RequestJobBase.ValidationResultEnum?(RequestJobBase.ValidationResultEnum.Valid);
			requestJob.ValidationMessage = LocalizedString.Empty;
		}