Fixing an issue with output parameters that are of type IntPtr
[castle.git] / MonoRail / Castle.MonoRail.Framework / Routing / RouteMatch.cs
blob205572d411bc682b5caa8a359bc23ea43ee58b29
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
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
17 using System;
18 using System.Collections.Generic;
20 /// <summary>
21 /// Pendent
22 /// </summary>
23 [Serializable]
24 public class RouteMatch
26 /// <summary>
27 /// Key used to store the route match on the HttpContext.Items
28 /// </summary>
29 public static readonly string RouteMatchKey = "route.match";
30 private readonly Dictionary<string, string> parameters = new Dictionary<string, string>();
32 /// <summary>
33 /// Initializes a new instance of the <see cref="RouteMatch"/> class.
34 /// </summary>
35 public RouteMatch()
39 /// <summary>
40 /// Gets the parameters.
41 /// </summary>
42 /// <value>The parameters.</value>
43 public Dictionary<string, string> Parameters
45 get { return parameters; }
48 /// <summary>
49 /// Adds the named.
50 /// </summary>
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;
58 /// <summary>
59 /// Gets a value indicating whether this instance is empty.
60 /// </summary>
61 /// <value><c>true</c> if this instance is empty; otherwise, <c>false</c>.</value>
62 public bool IsEmpty
64 get { return parameters.Count == 0; }