Class URIPattern
Represents a URI pattern that can get matched against URI requests. The pattern is formed using regular URL grammar and captures segments denoted by "{}". Example: '/profiles/{controller}/{action="dflt value"}/{*params}' The class uses CSharp lexer, so it allows to use string escapes and unicode chars like CSharp
Inheritance
System.Object
URIPattern
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Wave
Assembly: NFX.Wave.dll
Syntax
public sealed class URIPattern
Constructors
URIPattern(String)
Declaration
public URIPattern(string pattern)
Parameters
Type | Name | Description |
---|---|---|
System.String | pattern |
Properties
Pattern
Returns the original pattern
Declaration
public string Pattern { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
MakeURI(IDictionary<String, Object>, Uri)
Creates URI from the supplied values for this pattern
Declaration
public Uri MakeURI(IDictionary<string, object> values, Uri prefix = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | values | |
System.Uri | prefix |
Returns
Type | Description |
---|---|
System.Uri |
MatchURIPath(Uri, Boolean)
Tries to match the pattern against the URI path section and returns a JSONDataMap match object filled with pattern match or NULL if pattern could not be matched. JSONDataMap may be easily converted to dynamic by calling new JSONDynamicObject(map)
Declaration
public JSONDataMap MatchURIPath(Uri uri, bool senseCase = false)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | |
System.Boolean | senseCase |
Returns
Type | Description |
---|---|
JSONDataMap |