public void Update(IConflictHandler ch) { if (_flightHandler == null) { throw new Exception("FlightHandler hasn't been attached. Use SetFlightHandler() to attach it."); } List <Flight> flights = _flightHandler.GetFlights(); List <Conflict> conflicts = ch.GetConflicts(); Console.Clear(); Console.WriteLine($"Flights ({flights.Count}):"); foreach (var flight in flights) { Console.WriteLine(flight); } Console.WriteLine(); Console.WriteLine($"Conflicts ({conflicts.Count}):"); foreach (var conflict in conflicts) { Console.WriteLine(conflict); } }
private void Initializer(IConflictHandler conflictHandler) { if (null == conflictHandler) { throw new ArgumentNullException("conflictHandler"); } m_conflictHandler = conflictHandler; m_supportedResolutionActions = new Dictionary <Guid, ResolutionAction>(); }
/// <summary> /// Constructor. Constructed conflict type will use the default path (unix path syntax) /// as the scope to be used in rules and conflict's scope hint /// </summary> /// <param name="conflictHandler"></param> public ConflictType(IConflictHandler conflictHandler) { Initializer(conflictHandler); conflictHandler.ConflictTypeHandled = this; RegisterDefaultSupportedResolutionActions(); }
public VCContentConflictType(IConflictHandler conflictHandler) : base(conflictHandler) { }