private static string CreateScopeHint(CQTextParser.RecordValidationResult rslt, IMigrationAction action) { string recordType = UtilityMethods.ExtractRecordType(action); Debug.Assert(!string.IsNullOrEmpty(rslt.InvalidFieldName), "invalid field name is empty"); return(string.Format("/{0}/{1}", recordType, rslt.InvalidFieldName)); }
internal static Microsoft.TeamFoundation.Migration.Toolkit.MigrationConflict CreateConflict( CQTextParser.RecordValidationResult rslt, IMigrationAction action) { var newConflict = new MigrationConflict( new ClearQuestInvalidFieldValueConflictType(), MigrationConflict.Status.Unresolved, CreateConflictDetails(rslt, action), CreateScopeHint(rslt, action)); newConflict.ConflictedChangeAction = action; return(newConflict); }
private static string CreateConflictDetails(CQTextParser.RecordValidationResult rslt, IMigrationAction action) { ConflictDetailsProperties detailsProperties = new ConflictDetailsProperties(); string recordType = UtilityMethods.ExtractRecordType(action); detailsProperties.Properties.Add(ConflictDetailsKey_RecordType, recordType); detailsProperties.Properties.Add(ConflictDetailsKey_FieldName, rslt.InvalidFieldName ?? string.Empty); detailsProperties.Properties.Add(ConflictDetailsKey_FieldValue, rslt.InvalidFieldValue ?? string.Empty); detailsProperties.Properties.Add(ConflictDetailsKey_Reason, rslt.ResultDescription.ToString()); return(detailsProperties.ToString()); }