public VCUserPromptConflict(ConflictType conflictType, string message, string scopeHint) : base(conflictType, Status.Unresolved, message, scopeHint) { }
public static bool IsResolutionRuleScopeValid( ConflictType conflictType, string ruleScopeToValidate, out string hint) { return(conflictType.ScopeInterpreter.IsResolutionRuleScopeValid(ruleScopeToValidate, out hint)); }
/// <summary> /// Select the active conflicts that can be resolved by a rule with certain scope. /// </summary> /// <param name="conflicts"></param> /// <param name="conflictType"></param> /// <param name="ruleScope"></param> /// <returns></returns> public static MigrationConflict[] GetResolvableConflictListByScope( MigrationConflict[] conflicts, ConflictType conflictType, string ruleScope) { List <MigrationConflict> resolvableConflicts = new List <MigrationConflict>(conflicts.Length); string hint; if (IsResolutionRuleScopeValid(conflictType, ruleScope, out hint)) { foreach (MigrationConflict conflict in conflicts) { // filter out incompatible conflicts (those of other types) if (!conflict.ConflictType.ReferenceName.Equals(conflictType.ReferenceName)) { continue; } // select those whose ScopeHint is in 'ruleScope' if (conflictType.ScopeInterpreter.IsInScope(conflict.ScopeHint, ruleScope)) { resolvableConflicts.Add(conflict); } } } return(resolvableConflicts.ToArray()); }
public VCChangeGroupInProgressConflict(ConflictType conflictType, string message, string scopeHint) : base(conflictType, Status.Unresolved, message, scopeHint) { }
/// <summary> /// Initializes a new instance of the <see cref="MigrationConflict"/> class. /// </summary> /// <param name="conflictType">Specifies the type of conflict being created.</param> /// <param name="conflictStatus">Specifies the conflict status.</param> /// <param name="conflictDetails">Specifies the conflict details.</param> /// <param name="scopeHint">Specifies the scope hint used during conflict resolution.</param> public MigrationConflict( ConflictType conflictType, Status conflictStatus, string conflictDetails, string scopeHint) { Initializer(conflictType, conflictStatus, conflictDetails, scopeHint, conflictType.TranslateConflictDetailsToReadableDescription); }
private void Initializer( ConflictType conflictType, Status conflictStatus, string conflictDetails, string scopeHint, TranslateConflictDetailsToReadableDescription translator) { if (null == conflictType) { throw new ArgumentNullException("conflictType"); } if (null == translator) { throw new ArgumentNullException("translator"); } m_conflictType = conflictType; m_conflictStatus = conflictStatus; m_conflictDetails = conflictDetails; m_scopeHint = scopeHint; m_translator = translator; }