1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.MonoRail
.Framework
.Routing
18 using System
.Collections
.Generic
;
24 public class RouteMatch
27 /// Key used to store the route match on the HttpContext.Items
29 public static readonly string RouteMatchKey
= "route.match";
30 private readonly Dictionary
<string, string> parameters
= new Dictionary
<string, string>();
33 /// Initializes a new instance of the <see cref="RouteMatch"/> class.
40 /// Gets the parameters.
42 /// <value>The parameters.</value>
43 public Dictionary
<string, string> Parameters
45 get { return parameters; }
51 /// <param name="name">The name.</param>
52 /// <param name="value">The value.</param>
53 public void AddNamed(string name
, string value)
55 parameters
[name
] = value;
59 /// Gets a value indicating whether this instance is empty.
61 /// <value><c>true</c> if this instance is empty; otherwise, <c>false</c>.</value>
64 get { return parameters.Count == 0; }