internal static Utilities.RoutingRule ToRoutingRule(this Management.WebSites.Models.RoutingRule rule) { Utilities.RoutingRule result = null; if (rule is Management.WebSites.Models.RampUpRule) { Management.WebSites.Models.RampUpRule rampupRule = rule as Management.WebSites.Models.RampUpRule; result = new Utilities.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 Utilities.RoutingRule ToRoutingRule(this Management.WebSites.Models.RoutingRule rule) { Utilities.RoutingRule result = null; if (rule is Management.WebSites.Models.RampUpRule) { Management.WebSites.Models.RampUpRule rampupRule = rule as Management.WebSites.Models.RampUpRule; result = new Utilities.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; }