public RoutingRule Copy() { Server.Application.RoutingRule serverRoutingRule = (Server.Application.RoutingRule)ToServerObject(); RoutingRule copiedRoutingRule = new RoutingRule(application, serverRoutingRule); return(copiedRoutingRule); }
public override Object ToServerObject() { Server.Application.RoutingRule serverRoutingRule = new Server.Application.RoutingRule(); MapToServerObject(serverRoutingRule); return(serverRoutingRule); }
public RoutingRule(Application applicationReference, Server.Application.RoutingRule serverRoutingRule) { base.BaseConstructor(applicationReference, serverRoutingRule); defaultWorkQueueId = serverRoutingRule.DefaultWorkQueueId; rules = new SortedList <Int32, RoutingRuleDefinition> (); foreach (Int32 currentRuleSequence in serverRoutingRule.Rules.Keys) { rules.Add(currentRuleSequence, new RoutingRuleDefinition(applicationReference, serverRoutingRule.Rules[currentRuleSequence])); } return; }
public virtual void MapToServerObject(Server.Application.RoutingRule serverRoutingRule) { base.MapToServerObject((Server.Application.CoreConfigurationObject)serverRoutingRule); serverRoutingRule.DefaultWorkQueueId = defaultWorkQueueId; // COPY, DON'T REFERENCE serverRoutingRule.Rules = new Dictionary <Int32, Server.Application.RoutingRuleDefinition> (); foreach (Int32 currentRuleSequence in rules.Keys) { serverRoutingRule.Rules.Add(currentRuleSequence, (Server.Application.RoutingRuleDefinition)rules[currentRuleSequence].ToServerObject()); } return; }