/// <summary> /// Initializes a new instance of the IpFilterRule class. /// </summary> /// <param name="filterName">The name of the IP filter rule.</param> /// <param name="action">The desired action for requests captured by /// this rule. Possible values include: 'Accept', 'Reject'</param> /// <param name="ipMask">A string that contains the IP address range in /// CIDR notation for the rule.</param> public IpFilterRule(string filterName, IpFilterActionType action, string ipMask) { FilterName = filterName; Action = action; IpMask = ipMask; CustomInit(); }
/// <summary> /// Initializes a new instance of the IpFilterRule class. /// </summary> /// <param name="filterName">The name of the IP filter rule.</param> /// <param name="action">The desired action for requests captured by /// this rule. Possible values include: 'Accept', 'Reject'</param> /// <param name="ipMask">A string that contains the IP address range in /// CIDR notation for the rule.</param> /// <param name="target">Target for requests captured by this rule. /// Possible values include: 'all', 'serviceApi', 'deviceApi'</param> public IpFilterRule(string filterName, IpFilterActionType action, string ipMask, IpFilterTargetType?target = default(IpFilterTargetType?)) { FilterName = filterName; Action = action; IpMask = ipMask; Target = target; CustomInit(); }
internal static string ToSerializedValue(this IpFilterActionType value) { switch (value) { case IpFilterActionType.Accept: return("Accept"); case IpFilterActionType.Reject: return("Reject"); } return(null); }