internal static Models.RoutingRule ToRoutingRule(this Utilities.RoutingRule rule) { Models.RoutingRule result = null; if (rule is Utilities.RampUpRule) { var rampupRule = rule as Utilities.RampUpRule; result = new Models.RampUpRule() { ReroutePercentage = rampupRule.ReroutePercentage, ActionHostName = rampupRule.ActionHostName, MinReroutePercentage = rampupRule.MinReroutePercentage, MaxReroutePercentage = rampupRule.MaxReroutePercentage, ChangeDecisionCallbackUrl = rampupRule.ChangeDecisionCallbackUrl, ChangeIntervalInMinutes = rampupRule.ChangeIntervalInMinutes, ChangeStep = rampupRule.ChangeStep, }; } if (result != null) { // base class properties result.Name = rule.Name; } return(result); }
internal static Models.RoutingRule ToRoutingRule(this Utilities.RoutingRule rule) { Models.RoutingRule result = null; if (rule is Utilities.RampUpRule) { var rampupRule = rule as Utilities.RampUpRule; result = new Models.RampUpRule() { ReroutePercentage = rampupRule.ReroutePercentage, ActionHostName = rampupRule.ActionHostName, MinReroutePercentage = rampupRule.MinReroutePercentage, MaxReroutePercentage = rampupRule.MaxReroutePercentage, ChangeDecisionCallbackUrl = rampupRule.ChangeDecisionCallbackUrl, ChangeIntervalInMinutes = rampupRule.ChangeIntervalInMinutes, ChangeStep = rampupRule.ChangeStep, }; } if (result != null) { // base class properties result.Name = rule.Name; } return result; }