public ConflictResolutionResult Resolve(IServiceContainer serviceContainer, MigrationConflict conflict, ConflictResolutionRule rule, out List <MigrationAction> actions) { ClearQuestSetFieldValueConflictType conflictType = conflict.ConflictType as ClearQuestSetFieldValueConflictType; if (null == conflictType) { throw new InvalidOperationException(); } actions = null; if (rule.ActionRefNameGuid.Equals(new ManualConflictResolutionAction().ReferenceName)) { return(ManualResolve(conflict, rule, out actions)); } else if (rule.ActionRefNameGuid.Equals(new ClearQuestConflictResolutionUseValueMap())) { return(UseValueMap(conflict, rule, out actions)); } else if (rule.ActionRefNameGuid.Equals(new ClearQuestConflictResolutionDropValueSetting())) { return(DropValueSetting(conflict, rule, out actions)); } else if (rule.ActionRefNameGuid.Equals(new ClearQuestConflictResolutionUseRegexValueReplacement())) { return(UseRegexValueReplacement(conflict, rule, out actions)); } else { return(new ConflictResolutionResult(false, ConflictResolutionType.Other)); } }
public bool CanResolve(MigrationConflict conflict, ConflictResolutionRule rule) { ClearQuestSetFieldValueConflictType conflictType = conflict.ConflictType as ClearQuestSetFieldValueConflictType; if (null == conflictType) { throw new InvalidOperationException(); } if (!ConflictTypeHandled.ScopeInterpreter.IsInScope(conflict.ScopeHint, rule.ApplicabilityScope)) { return(false); } if (rule.ActionRefNameGuid.Equals(new ManualConflictResolutionAction().ReferenceName)) { return(true); } else if (rule.ActionRefNameGuid.Equals(new ClearQuestConflictResolutionUseValueMap())) { return(CanResolveByValueMap(conflict, rule)); } else if (rule.ActionRefNameGuid.Equals(new ClearQuestConflictResolutionDropValueSetting())) { return(CanResolveByDropValueSetting(conflict, rule)); } else if (rule.ActionRefNameGuid.Equals(new ClearQuestConflictResolutionUseRegexValueReplacement())) { return(CanResolveByUseRegexValueReplacement(conflict, rule)); } return(false); }