Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        private void Initializer(IConflictHandler conflictHandler)
        {
            if (null == conflictHandler)
            {
                throw new ArgumentNullException("conflictHandler");
            }

            m_conflictHandler = conflictHandler;

            m_supportedResolutionActions = new Dictionary <Guid, ResolutionAction>();
        }
Exemplo n.º 3
0
 /// <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();
 }
Exemplo n.º 4
0
 public VCContentConflictType(IConflictHandler conflictHandler)
     : base(conflictHandler)
 {
 }