Exemple #1
0
        /// <summary>
        /// Removes the specified route from the host's routing table.
        /// </summary>
        /// <param name="route">The route to remove.</param>
        /// <exception cref="ArgumentNullException">The route parameter is null.</exception>
		public bool RemoveRoute(Route route) {
            route.ThrowIfNull(nameof(route));
			return routingTable.Remove(route);
		}
Exemple #2
0
        /// <summary>
        /// Adds a route to the host's routing table.
        /// </summary>
        /// <param name="route">The route to add to the host's routing table.</param>
        /// <param name="index">The row number to insert the route add or null to add the route
        /// to the end of the routing table.</param>
        /// <exception cref="ArgumentNullException">The route parameter is null.</exception>
		public void AddRoute(Route route, int? index = null) {
            route.ThrowIfNull(nameof(route));
			if (!index.HasValue)
				routingTable.Add(route);
			else
				routingTable.Insert(index.Value, route);
		}