public object Create(object parent, object configContext, XmlNode section) { var opts = new SettingsOptions(); string receiveFrom = section.SelectSingleNode("ReceiveFrom").InnerText; opts.ReceiveFrom = receiveFrom.Trim(); XmlNode transports = section.SelectSingleNode("Transports"); foreach (XmlNode transport in transports.ChildNodes) { opts.Transports.Add(transport.InnerText.Trim()); } var sub = section.SelectSingleNode("SubscriptionService"); if (sub != null) { var s = sub.InnerText.Trim(); opts.Subscriptions = s; } var health = section.SelectSingleNode("HealthService"); if (health != null) { var h = health.InnerText.Trim(); opts.HealthServiceInterval = h; } return(opts); }
public object Create(object parent, object configContext, XmlNode section) { var opts = new SettingsOptions(); string receiveFrom = section.SelectSingleNode("ReceiveFrom").InnerText; opts.ReceiveFrom = receiveFrom.Trim(); XmlNode transports = section.SelectSingleNode("Transports"); foreach (XmlNode transport in transports.ChildNodes) { opts.Transports.Add(transport.InnerText.Trim()); } var sub = section.SelectSingleNode("SubscriptionService"); if (sub != null) { var s = sub.InnerText.Trim(); opts.Subscriptions = s; } var health = section.SelectSingleNode("HealthService"); if (health != null) { var h = health.InnerText.Trim(); opts.HealthServiceInterval = h; } return opts; }