Skip to main content

RestPath

Assembly: ServiceStack.dll
View Source
Declaration
public class RestPath : IRestPath

Properties

IsWildCardPath

View Source
Declaration
public bool IsWildCardPath { get; }

VariableArgsCount

View Source
Declaration
public int VariableArgsCount { get; set; }

PathComponentsCount

The number of segments separated by '/' determinable by path.Split('/').Length e.g. /path/to/here.ext == 3

View Source
Declaration
public int PathComponentsCount { get; set; }

TotalComponentsCount

The total number of segments after subparts have been exploded ('.') e.g. /path/to/here.ext == 4

View Source
Declaration
public int TotalComponentsCount { get; set; }

Verbs

View Source
Declaration
public string[] Verbs { get; }

RequestType

View Source
Declaration
public Type RequestType { get; }

Path

View Source
Declaration
public string Path { get; }

Summary

View Source
Declaration
public string Summary { get; set; }

Notes

View Source
Declaration
public string Notes { get; set; }

MatchRule

View Source
Declaration
public string MatchRule { get; }

AllowsAllVerbs

View Source
Declaration
public bool AllowsAllVerbs { get; }

AllowedVerbs

View Source
Declaration
public string AllowedVerbs { get; }

Priority

View Source
Declaration
public int Priority { get; set; }

IsValid

View Source
Declaration
public bool IsValid { get; set; }

FirstMatchHashKey

Provide for quick lookups based on hashes that can be determined from a request url

View Source
Declaration
public string FirstMatchHashKey { get; }

UniqueMatchHashKey

View Source
Declaration
public string UniqueMatchHashKey { get; }

CalculateMatchScore

View Source
Declaration
public static Func<RestPath, string, string[], int> CalculateMatchScore { get; set; }

Methods

GetPathPartsForMatching(String)

View Source
Declaration
public static string[] GetPathPartsForMatching(string pathInfo)
Returns

System.String[]

Parameters
TypeName
System.StringpathInfo

GetFirstMatchHashKeys(String[])

View Source
Declaration
public static IEnumerable<string> GetFirstMatchHashKeys(string[] pathPartsForMatching)
Returns

System.Collections.Generic.IEnumerable<System.String>

Parameters
TypeName
System.String[]pathPartsForMatching

GetFirstMatchWildCardHashKeys(String[])

View Source
Declaration
public static IEnumerable<string> GetFirstMatchWildCardHashKeys(string[] pathPartsForMatching)
Returns

System.Collections.Generic.IEnumerable<System.String>

Parameters
TypeName
System.String[]pathPartsForMatching

ToRestRoute()

View Source
Declaration
public RestRoute ToRestRoute()
Returns

ServiceStack.RestRoute

MatchScore(String, String[])

View Source
Declaration
public int MatchScore(string httpMethod, string[] withPathInfoParts)
Returns

System.Int32

Parameters
TypeName
System.StringhttpMethod
System.String[]withPathInfoParts

IsMatch(IHttpRequest)

For performance withPathInfoParts should already be a lower case string to minimize redundant matching operations.

View Source
Declaration
public bool IsMatch(IHttpRequest httpReq)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Web.IHttpRequesthttpReq

AfterInit()

View Source
Declaration
public void AfterInit()

GetRequestRule()

View Source
Declaration
public Func<IHttpRequest, bool> GetRequestRule()
Returns

System.Func<ServiceStack.Web.IHttpRequest,System.Boolean>

IsMatch(String, String[], out Int32)

For performance withPathInfoParts should already be a lower case string to minimize redundant matching operations.

View Source
Declaration
public bool IsMatch(string httpMethod, string[] withPathInfoParts, out int wildcardMatchCount)
Returns

System.Boolean

Parameters
TypeName
System.StringhttpMethod
System.String[]withPathInfoParts
System.Int32wildcardMatchCount

CreateRequest(String)

View Source
Declaration
public object CreateRequest(string pathInfo)
Returns

System.Object

Parameters
TypeName
System.StringpathInfo

CreateRequest(String, Dictionary<String, String>, Object)

View Source
Declaration
public object CreateRequest(string pathInfo, Dictionary<string, string> queryStringAndFormData, object fromInstance)
Returns

System.Object

Parameters
TypeName
System.StringpathInfo
System.Collections.Generic.Dictionary<System.String,System.String>queryStringAndFormData
System.ObjectfromInstance

IsVariable(String)

View Source
Declaration
public bool IsVariable(string name)
Returns

System.Boolean

Parameters
TypeName
System.Stringname

GetHashCode()

View Source
Declaration
public override int GetHashCode()
Returns

System.Int32

Implements