bool IProtoRouteConfigurationContext.AddRoute(SubRouteConfiguration route)
{
if (route == null)
{
throw new ArgumentNullException();
}
var newSub = new Route(_resolver, this, route);
if (!_resolver.RegisterSubRoute(newSub))
{
Monitor.SendLine(LogLevel.Error, string.Format("Route named '{0}' is already declared.", newSub._fullName), null);
return(false);
}
using (Monitor.OpenGroup(LogLevel.Info, string.Format("Preprocessing route '{0}'.", newSub._fullName), null))
{
newSub.ExecuteMetaConfigurations();
_subRoutes.Add(newSub);
}
return(true);
}