More working tests.
[castle.git] / MonoRail / Castle.MonoRail.Framework / Routing / IRoutingRule.cs
blob4abe0eb0bb9644e6ed9e3ad8111de4b3d7d15583
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.Collections;
19 /// <summary>
20 /// Depicts an url routing rule contract.
21 /// </summary>
22 /// <remarks>
23 /// Implementors can use this interface to implement custom rules.
24 /// </remarks>
25 public interface IRoutingRule
27 /// <summary>
28 /// Gets the name of the route.
29 /// </summary>
30 /// <value>The name of the route.</value>
31 string RouteName { get; }
33 /// <summary>
34 /// Pendent
35 /// </summary>
36 /// <param name="hostname">The hostname.</param>
37 /// <param name="virtualPath">The virtual path.</param>
38 /// <param name="parameters">The parameters.</param>
39 /// <returns></returns>
40 string CreateUrl(string hostname, string virtualPath, IDictionary parameters);
42 /// <summary>
43 /// Determines if the specified URL matches the
44 /// routing rule.
45 /// </summary>
46 /// <param name="url">The URL.</param>
47 /// <param name="context">The context</param>
48 /// <param name="match">The match.</param>
49 /// <returns></returns>
50 bool Matches(string url, IRouteContext context, RouteMatch match);