/// <summary> /// Validates the frontend. /// </summary> /// <param name="context">The validation context.</param> /// <param name="rule">The parent rule.</param> public void Validate(TrafficValidationContext context, TrafficTcpRule rule) { base.Validate(context, rule); if (PublicPort > 0 && !NetHelper.IsValidPort(PublicPort)) { context.Error($"Load balancer [{nameof(PublicPort)}={PublicPort}] is not a valid network port."); } if (!context.Settings.ProxyPorts.IsValidTcpPort(ProxyPort)) { context.Error($"Rule [{rule.Name}] assigns [{nameof(ProxyPort)}={ProxyPort}] which is outside the range of valid frontend TCP ports for this traffic manager [{context.Settings.ProxyPorts}]."); } }
/// <summary> /// Validates the backend. /// </summary> /// <param name="context">The validation context.</param> /// <param name="rule">The parent rule.</param> public void Validate(TrafficValidationContext context, TrafficTcpRule rule) { base.Validate(context, rule.Name); }