public override Difference Resolve( ConflictContext context, OperationTypeConflictResolver operationTypeConflictResolver, ValueConflictResolver valueConflictResolver) { return(operationTypeConflictResolver(context.CreateSubcontext(this), r_differenceInSourceBranch, r_differenceInDestinationBranch)); }
public MergeSolutionsForm( NodeDifference differenceInSourceBranch, NodeDifference differenceInDestinationBranch, Conflict conflict, OperationTypeConflictResolver operationTypeConflictResolver, ValueConflictResolver valueConflictResolver) { InitializeComponent(); FormPosition.LoadFromRegistry(this); m_differencesInSourceBranchControl.Data = differenceInSourceBranch; m_differencesInDestinationBranchControl.Data = differenceInDestinationBranch; m_conflict = conflict as NodeConflict; m_operationTypeConflictResolver = operationTypeConflictResolver; m_valueConflictResolver = valueConflictResolver; if (m_conflict.Subconflicts.Count == 0) { m_result = (NodeDifference)m_conflict.Resolve(m_operationTypeConflictResolver, m_valueConflictResolver); } else { m_result = null; } UpdateUI(); }
public override Difference Resolve( ConflictContext context, OperationTypeConflictResolver operationTypeConflictResolver, ValueConflictResolver valueConflictResolver) { foreach (var subconflict in new List<Conflict>(r_subconflicts)) // Iterate on a copy of the list to be able to modify the original list in the loop { var resolvedDifference = subconflict.Resolve(context.CreateSubcontext(this), operationTypeConflictResolver, valueConflictResolver); if (resolvedDifference != null) { r_subconflicts.Remove(subconflict); r_acceptedSubdifferences.Add(resolvedDifference); } } if (r_subconflicts.Count == 0) { return new NodeDifference( this.Identifier, r_operationOnParent, r_acceptedSubdifferences); } else { return null; } }
public override Difference Resolve( ConflictContext context, OperationTypeConflictResolver operationTypeConflictResolver, ValueConflictResolver valueConflictResolver) { foreach (var subconflict in new List <Conflict>(r_subconflicts)) // Iterate on a copy of the list to be able to modify the original list in the loop { var resolvedDifference = subconflict.Resolve(context.CreateSubcontext(this), operationTypeConflictResolver, valueConflictResolver); if (resolvedDifference != null) { r_subconflicts.Remove(subconflict); r_acceptedSubdifferences.Add(resolvedDifference); } } if (r_subconflicts.Count == 0) { return(new NodeDifference( this.Identifier, r_operationOnParent, r_acceptedSubdifferences)); } else { return(null); } }
public override Difference Resolve( ConflictContext context, OperationTypeConflictResolver operationTypeConflictResolver, ValueConflictResolver valueConflictResolver) { return operationTypeConflictResolver(context.CreateSubcontext(this), r_differenceInSourceBranch, r_differenceInDestinationBranch); }
public override Difference Resolve( ConflictContext context, OperationTypeConflictResolver operationTypeConflictResolver, ValueConflictResolver valueConflictResolver) { var resolvedValue = valueConflictResolver(context.CreateSubcontext(this), r_newValueInSourceBranch, r_newValueInDestinationBranch); return resolvedValue == null ? null : new ValueDifference(this.Identifier, this.OperationOnParent, r_oldValue, resolvedValue); }
public override Difference Resolve( ConflictContext context, OperationTypeConflictResolver operationTypeConflictResolver, ValueConflictResolver valueConflictResolver) { var resolvedValue = valueConflictResolver(context.CreateSubcontext(this), r_newValueInSourceBranch, r_newValueInDestinationBranch); return(resolvedValue == null ? null : new ValueDifference(this.Identifier, this.OperationOnParent, r_oldValue, resolvedValue)); }
public abstract Difference Resolve( ConflictContext context, OperationTypeConflictResolver operationTypeConflictResolver, ValueConflictResolver valueConflictResolver);
public Difference Resolve( OperationTypeConflictResolver operationTypeConflictResolver, ValueConflictResolver valueConflictResolver) { return(Resolve(new ConflictContext(), operationTypeConflictResolver, valueConflictResolver)); }
public Difference Resolve( OperationTypeConflictResolver operationTypeConflictResolver, ValueConflictResolver valueConflictResolver) { return Resolve(new ConflictContext(), operationTypeConflictResolver, valueConflictResolver); }