/// <summary> /// Attempts to resolve the configuration. Null if an error occurred. /// </summary> /// <param name="monitor">Monitor to use. Must not be null.</param> /// <returns>Null or a set of resolved route configuration.</returns> public RouteConfigurationResult Resolve(IActivityMonitor monitor) { if (monitor == null) { throw new ArgumentNullException("monitor"); } RouteConfigurationResult result; bool hasError = false; using (monitor.OnError(() => hasError = true)) { var r = new RouteResolver(monitor, this); result = new RouteConfigurationResult(r.Root, r.NamedSubRoutes); } return(hasError ? null : result); }
/// <summary> /// Attempts to resolve the configuration. Null if an error occurred. /// </summary> /// <param name="monitor">Monitor to use. Must not be null.</param> /// <returns>Null or a set of resolved route configuration.</returns> public RouteConfigurationResult Resolve( IActivityMonitor monitor ) { if( monitor == null ) throw new ArgumentNullException( "monitor" ); RouteConfigurationResult result; bool hasError = false; using( monitor.OnError( () => hasError = true ) ) { var r = new RouteResolver( monitor, this ); result = new RouteConfigurationResult( r.Root, r.NamedSubRoutes ); } return hasError ? null : result; }