public SelectionRule(int profileId, SelectionRuleParts selectionRulePart, SelectionRuleCompareTypes selectionRuleCompareType, string value) { ProfileId = profileId; SelectionRulePart = selectionRulePart; SelectionRuleCompareType = selectionRuleCompareType; Value = value; }
public UpdateProfileSelectionRuleCommand(int profileId, int selectionRuleId, SelectionRuleParts selectionRulePart, SelectionRuleCompareTypes selectionRuleCompareType, string value) { ProfileId = profileId; SelectionRuleId = selectionRuleId; SelectionRulePart = selectionRulePart; SelectionRuleCompareType = selectionRuleCompareType; Value = value; }
public static string GetPartFromUrl(SelectionRuleParts selectionRulePart, string url) { switch (selectionRulePart) { case SelectionRuleParts.Url: return(url); case SelectionRuleParts.Hostname: return(GetDomainInfo(url)?.Hostname); case SelectionRuleParts.Domain: return(GetDomainInfo(url)?.RegistrableDomain); case SelectionRuleParts.Subdomain: return(GetDomainInfo(url)?.SubDomain); } return(null); }