Class WorkMatch
Decides whether the specifies WorkContext matches the requirements specified in the instance.
The match may consider Request and Items properties of work context for match determination.
Work matches do not belong to particular handler or filter, so they ARE STATELESS and their instances
can be used by multiple different processors (i.e. handlers and filters).
Inheritance
System.Object
WorkMatch
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()
Assembly: NFX.Wave.dll
Syntax
public class WorkMatch : INamed, IOrdered
Constructors
WorkMatch(IConfigSectionNode)
Declaration
public WorkMatch(IConfigSectionNode confNode)
Parameters
WorkMatch(String, Int32)
Declaration
public WorkMatch(string name, int order)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Int32 |
order |
|
Fields
CONFIG_MATCH_SECTION
Declaration
public const string CONFIG_MATCH_SECTION = "match"
Field Value
Type |
Description |
System.String |
|
CONFIG_NOT_PATH_ATTR
Declaration
public const string CONFIG_NOT_PATH_ATTR = "not-path"
Field Value
Type |
Description |
System.String |
|
CONFIG_PATH_ATTR
Declaration
public const string CONFIG_PATH_ATTR = "path"
Field Value
Type |
Description |
System.String |
|
CONFIG_VAR_SECTION
Declaration
public const string CONFIG_VAR_SECTION = "var"
Field Value
Type |
Description |
System.String |
|
LIST_DELIMITERS
Declaration
public static readonly char[] LIST_DELIMITERS
Field Value
Type |
Description |
System.Char[] |
|
Properties
AbsentCookies
Declaration
[Config]
public string AbsentCookies { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
[Config]
public string AbsentHeaders { get; set; }
Property Value
Type |
Description |
System.String |
|
AcceptJson
Shortcut to AcceptTypes contaioning application/json
Declaration
[Config]
public bool AcceptJson { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
AcceptTypes
Declaration
[Config]
public string AcceptTypes { get; set; }
Property Value
Type |
Description |
System.String |
|
ApiMaxVer
Declaration
[Config]
public int ? ApiMaxVer { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
ApiMinVer
Declaration
[Config]
public int ? ApiMinVer { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
CompositeCapture
Used by the CompositeMatch: if true, merges the result of Make() into composite capture context
Declaration
[Config]
public bool CompositeCapture { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ContentTypes
Declaration
[Config]
public string ContentTypes { get; set; }
Property Value
Type |
Description |
System.String |
|
Cookies
Declaration
[Config]
public string Cookies { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
[Config]
public string Headers { get; set; }
Property Value
Type |
Description |
System.String |
|
Hosts
Declaration
[Config]
public string Hosts { get; set; }
Property Value
Type |
Description |
System.String |
|
IsLocal
Declaration
[Config]
public bool ? IsLocal { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
IsSearchCrawler
Declaration
[Config]
public bool ? IsSearchCrawler { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
IsSocialNetBot
Declaration
[Config]
public bool ? IsSocialNetBot { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
Methods
Declaration
[Config]
public string Methods { get; set; }
Property Value
Type |
Description |
System.String |
|
Name
Returns the match instance name
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
NotPathPattern
Returns the URIPattern matcher for reverse URI path segment matching
Declaration
public URIPattern NotPathPattern { get; set; }
Property Value
Order
Returns the match order in handler registry. Order is used for URI pattern matching.
Although Order property can change the match needs to be Unregistered/Registered again with the handler
to change pattern matching order
Declaration
public int Order { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
PathPattern
Returns the URIPattern matcher for URI path segment matching
Declaration
public URIPattern PathPattern { get; set; }
Property Value
Permissions
Declaration
public IEnumerable<Permission> Permissions { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<Permission> |
|
Ports
Declaration
[Config]
public string Ports { get; set; }
Property Value
Type |
Description |
System.String |
|
Schemes
Declaration
[Config]
public string Schemes { get; set; }
Property Value
Type |
Description |
System.String |
|
TypeNsPrefix
Namespace prefix used for type lookups. The prefix uses '/' or '' path separation char not '.'
Declaration
[Config]
public string TypeNsPrefix { get; set; }
Property Value
Type |
Description |
System.String |
|
UserAgents
Declaration
[Config]
public string UserAgents { get; set; }
Property Value
Type |
Description |
System.String |
|
UserHosts
Declaration
[Config]
public string UserHosts { get; set; }
Property Value
Type |
Description |
System.String |
|
Variables
Returns registry of variables. May register/unregister variables at runtime
Declaration
public Registry<WorkMatch.Variable> Variables { get; }
Property Value
Methods
Check_AbsentCookies(WorkContext)
Declaration
protected virtual bool Check_AbsentCookies(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Declaration
protected virtual bool Check_AbsentHeaders(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_AcceptTypes(WorkContext)
Declaration
protected virtual bool Check_AcceptTypes(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_ApiVersions(WorkContext)
Declaration
protected virtual bool Check_ApiVersions(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_ContentTypes(WorkContext)
Declaration
protected virtual bool Check_ContentTypes(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_Cookies(WorkContext)
Declaration
protected virtual bool Check_Cookies(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Declaration
protected virtual bool Check_Headers(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_Hosts(WorkContext)
Declaration
protected virtual bool Check_Hosts(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_IsLocal(WorkContext)
Declaration
protected virtual bool Check_IsLocal(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_IsSearchCrawler(WorkContext)
Declaration
protected virtual bool Check_IsSearchCrawler(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_IsSocialNetBot(WorkContext)
Declaration
protected virtual bool Check_IsSocialNetBot(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_Methods(WorkContext)
Declaration
protected virtual bool Check_Methods(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_Permissions(WorkContext)
Declaration
protected virtual bool Check_Permissions(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_Ports(WorkContext)
Declaration
protected virtual bool Check_Ports(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_Schemes(WorkContext)
Declaration
protected virtual bool Check_Schemes(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_UserAgents(WorkContext)
Declaration
protected virtual bool Check_UserAgents(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_UserHosts(WorkContext)
Declaration
protected virtual bool Check_UserHosts(WorkContext work)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_VariablesAndGetValues(WorkContext, ref JSONDataMap)
Declaration
protected virtual bool Check_VariablesAndGetValues(WorkContext work, ref JSONDataMap result)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Make(WorkContext, Object)
Decides whether the specified WorkContext makes the match per this instance and if it does, returns the match variables.
Returns null if match was not made
Declaration
public virtual JSONDataMap Make(WorkContext work, object context = null)
Parameters
Type |
Name |
Description |
WorkContext |
work |
|
System.Object |
context |
|
Returns
Implements
Extension Methods