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
17 using System
.Collections
;
20 /// Depicts an url routing rule contract.
23 /// Implementors can use this interface to implement custom rules.
25 public interface IRoutingRule
28 /// Gets the name of the route.
30 /// <value>The name of the route.</value>
31 string RouteName { get; }
36 /// <param name="hostname">The hostname.</param>
37 /// <param name="virtualPath">The virtual path.</param>
38 /// <param name="parameters">The parameters.</param>
39 /// <param name="points">The points.</param>
40 /// <returns></returns>
41 string CreateUrl(string hostname
, string virtualPath
, IDictionary parameters
, out int points
);
44 /// Determines if the specified URL matches the
47 /// <param name="url">The URL.</param>
48 /// <param name="context">The context</param>
49 /// <param name="match">The match.</param>
50 /// <returns></returns>
51 int Matches(string url
, IRouteContext context
, RouteMatch match
);