using System; using System.Collections.Generic; using System.Text; namespace System.Net.ApiService.VHost_Server { public class VHostRedirectCondition { public enum eCondition : byte { Ignore = 0, Must = 1, MustNot = 2 } public enum eVaraible : byte { Method, Path, Query, Referer, Host, UserAgent } public VHostRedirectCondition() { } public VHostRedirectCondition(eVaraible HeaderVariable, string pattern) { this.HeaderVariable = HeaderVariable; this.HeaderValue = pattern; this.ConditionType = eCondition.Must; this.Active = true; } public VHostRedirectCondition(eVaraible HeaderVariable, string pattern, eCondition ConditionType) { this.HeaderVariable = HeaderVariable; this.HeaderValue = pattern; this.ConditionType = ConditionType; this.Active = true; } public VHostRedirectCondition(eVaraible HeaderVariable, string pattern, eCondition ConditionType, bool IsActive) { this.HeaderVariable = HeaderVariable; this.HeaderValue = pattern; this.ConditionType = ConditionType; this.Active = IsActive; } /*public string Host { get; set; } public eCondition Host_Condition { get; set; } public string Referer { get; set; } public eCondition Referer_Condition { get; set; } public HttpMethod Method { get; set; } public eCondition Method_Condition { get; set; } public string Path { get; set; } public eCondition Path_Condition { get; set; } public RequestHeader.eEncoder Encoding { get; set; } public eCondition Encoding_Condition { get; set; } public string UserAgent { get; set; } public eCondition UserAgent_Condition { get; set; } public string QueryString { get; set; } public eCondition QueryString_Condition { get; set; }*/ public eVaraible HeaderVariable { get; set; } public string HeaderValue { get; set; } public eCondition ConditionType { get; set; } public bool Active { get; set; } } }