Example #1
0
 private static void AppendSlashOrDot(StringBuilder text, UrlPartSubRule partSubRule)
 {
     if (text.Length == 0 || text[text.Length - 1] != '/')
     {
         if (partSubRule.afterDot)
         {
             text.Append('.');
         }
         else
         {
             text.Append('/');
         }
     }
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultConfigurer"/> class.
 /// </summary>
 /// <param name="patternRoute">The pattern route.</param>
 /// <param name="namedPatternPart">The named pattern part.</param>
 public DefaultConfigurer(PatternRoute patternRoute, string namedPatternPart)
 {
     route = patternRoute;
     this.namedPatternPart = namedPatternPart;
     targetPartSubRule     = route.GetNamedNode(namedPatternPart, false);
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RestrictionConfigurer"/> class.
 /// </summary>
 /// <param name="route">The route.</param>
 /// <param name="namedPatternPart">The named pattern part.</param>
 public RestrictionConfigurer(PatternRoute route, string namedPatternPart)
 {
     this.route        = route;
     targetPartSubRule = route.GetNamedNode(namedPatternPart, true);
 }