protected BaseProcess(string processName, string processUrl, string puppetMasterUrl, string siteName) { ProcessName = processName; Url = processUrl; SiteName = siteName; // connects to this site's puppetMaster ConnectToPuppetMaster(puppetMasterUrl); this.LoggingLevel = PuppetMaster.GetLoggingLevel(); this.OrderingGuarantee = PuppetMaster.GetOrderingGuarantee(); this.RoutingPolicy = PuppetMaster.GetRoutingPolicy(); }
void IProcess.DeliverSetting(string settingType, string settingValue) { switch (settingType) { case "RoutingPolicy": if (settingValue.Equals("Flood")) this.RoutingPolicy = RoutingPolicy.Flood; else if (settingValue.Equals("Filter")) this.RoutingPolicy = RoutingPolicy.Filter; else { Console.Out.WriteLine("Unknown setting for Routing Policy"); return; } break; case "LoggingLevel": if (settingValue.Equals("Full")) this.LoggingLevel = LoggingLevel.Full; else if (settingValue.Equals("Light")) this.LoggingLevel = LoggingLevel.Light; else { Console.Out.WriteLine("Unknown setting for Logging Level"); return; } break; case "OrderingGuarantee": if (settingValue.Equals("No")) this.OrderingGuarantee = OrderingGuarantee.No; else if (settingValue.Equals("Fifo")) this.OrderingGuarantee = OrderingGuarantee.Fifo; else if (settingValue.Equals("Total")) this.OrderingGuarantee = OrderingGuarantee.Total; else { Console.Out.WriteLine("Unknown setting for Ordering Guarantee"); return; } break; } Console.Out.WriteLine(settingType + " set to " + settingValue); }