Ejemplo n.º 1
0
 public void AddPath <TMessage>(MessagePath <TMessage> path)
 {
     if (path == null)
     {
         throw new ArgumentNullException(nameof(path));
     }
     PathSetSet.GetMessagePathSet <TMessage>().AddMessagePath(path);
     PathAdded?.Invoke(path);
 }
Ejemplo n.º 2
0
        public Map()
        {
            routes    = new List <Route>();
            buildings = new List <Building>();

            VehiclePaths.PathAdded += (VehiclePath road) => PathAdded?.Invoke(road);
            VehiclePaths.NodeAdded += (VehicleNode node) => PathNodeAdded?.Invoke(node);

            _pathBuilder = new VehiclePathBuilder(this);
        }
Ejemplo n.º 3
0
        public IMessagePathId AddPath <TMessage>(Type location, string description, LogEnum logType, Action <TMessage> action, PathId pathId, int viaTimesLimit = -1)
        {
            if (action == null)
            {
                throw new ArgumentNullException(nameof(action));
            }
            MessagePath <TMessage> path = new MessagePath <TMessage>(location, description, logType, action, pathId, viaTimesLimit);

            PathSetSet.GetMessagePathSet <TMessage>().AddMessagePath(path);
            PathAdded?.Invoke(path);
            return(path);
        }