Esempio n. 1
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);
     }
 }