Class Rule
Represents the named rule for NetGate
Inheritance
System.Object
Rule
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: Azos.dll
Syntax
public class Rule : INamed, IOrdered
Constructors
Rule(IConfigSectionNode)
Declaration
public Rule(IConfigSectionNode node)
Parameters
Rule(String, Int32, GateAction)
Declaration
public Rule(string name, int order, GateAction action)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Int32 |
order |
|
GateAction |
action |
|
Fields
LIST_DELIMITERS
Declaration
public static readonly char[] LIST_DELIMITERS
Field Value
Type |
Description |
System.Char[] |
|
VAR_EXPRESSION_PREFIX
Declaration
public static string VAR_EXPRESSION_PREFIX
Field Value
Type |
Description |
System.String |
|
Properties
Action
Declaration
public GateAction Action { get; }
Property Value
FromAddrs
Declaration
[Config]
public string FromAddrs { get; set; }
Property Value
Type |
Description |
System.String |
|
FromExpression
Declaration
[Config]
public string FromExpression { get; set; }
Property Value
Type |
Description |
System.String |
|
FromGroups
Declaration
[Config]
public string FromGroups { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
Declaration
[Config]
public string Methods { get; set; }
Property Value
Type |
Description |
System.String |
|
Name
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
Order
Declaration
public int Order { get; }
Property Value
Type |
Description |
System.Int32 |
|
Services
Declaration
[Config]
public string Services { get; set; }
Property Value
Type |
Description |
System.String |
|
ToAddrs
Declaration
[Config]
public string ToAddrs { get; set; }
Property Value
Type |
Description |
System.String |
|
ToExpression
Declaration
[Config]
public string ToExpression { get; set; }
Property Value
Type |
Description |
System.String |
|
ToGroups
Declaration
[Config]
public string ToGroups { get; set; }
Property Value
Type |
Description |
System.String |
|
URLFragments
Declaration
[Config]
public string URLFragments { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
Check(NetGate.State, ITraffic, ref Group, ref Group)
Cheks whether the rule is satisfied - all listed conditions are met. May lazily resolve addresses to groups
Declaration
public virtual bool Check(NetGate.State state, ITraffic traffic, ref Group fromGroup, ref Group toGroup)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Check_FromAddrs(String)
Declaration
protected virtual bool Check_FromAddrs(string address)
Parameters
Type |
Name |
Description |
System.String |
address |
|
Returns
Type |
Description |
System.Boolean |
|
Check_FromGroups(String)
Declaration
protected virtual bool Check_FromGroups(string fromGroup)
Parameters
Type |
Name |
Description |
System.String |
fromGroup |
|
Returns
Type |
Description |
System.Boolean |
|
Check_Methods(String)
Declaration
protected virtual bool Check_Methods(string method)
Parameters
Type |
Name |
Description |
System.String |
method |
|
Returns
Type |
Description |
System.Boolean |
|
Check_Services(String)
Declaration
protected virtual bool Check_Services(string service)
Parameters
Type |
Name |
Description |
System.String |
service |
|
Returns
Type |
Description |
System.Boolean |
|
Check_ToAddrs(String)
Declaration
protected virtual bool Check_ToAddrs(string address)
Parameters
Type |
Name |
Description |
System.String |
address |
|
Returns
Type |
Description |
System.Boolean |
|
Check_ToGroups(String)
Declaration
protected virtual bool Check_ToGroups(string toGroup)
Parameters
Type |
Name |
Description |
System.String |
toGroup |
|
Returns
Type |
Description |
System.Boolean |
|
Check_URLFragments(String)
Declaration
protected virtual bool Check_URLFragments(string url)
Parameters
Type |
Name |
Description |
System.String |
url |
|
Returns
Type |
Description |
System.Boolean |
|
Implements
Extension Methods