internal static EdgeServerConfig Load(XmlReader reader)
        {
            if (reader == null) throw new ArgumentNullException("reader");

            var result = new EdgeServerConfig();

            reader.GoToElement();
            reader.ReadStartElement();
            if (!reader.IsEmptyElement)
            {
                while (reader.GoToSibling())
                {
                    switch (reader.LocalName)
                    {
                        case "EdgeServerRules":
                            if (!reader.IsEmptyElement)
                            {
                                result.EdgeServerRulesCollection.Add(EdgeServerRules.Load(reader));
                            }
                            else
                                reader.Skip();
                            break;

                        default:
                            reader.Skip();
                            break;
                    }
                }
                reader.ReadEndElement();
            }
            else
                reader.Skip();

            return result;
        }
Esempio n. 2
0
        internal static EdgeServerConfig Load(XmlReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            var result = new EdgeServerConfig();

            reader.GoToElement();
            reader.ReadStartElement();
            if (!reader.IsEmptyElement)
            {
                while (reader.GoToSibling())
                {
                    switch (reader.LocalName)
                    {
                    case "EdgeServerRules":
                        if (!reader.IsEmptyElement)
                        {
                            result.EdgeServerRulesCollection.Add(EdgeServerRules.Load(reader));
                        }
                        else
                        {
                            reader.Skip();
                        }
                        break;

                    default:
                        reader.Skip();
                        break;
                    }
                }
                reader.ReadEndElement();
            }
            else
            {
                reader.Skip();
            }

            return(result);
        }
 /// <summary>
 /// Creates a new instance of EdgeServerMonitor.
 /// </summary>
 /// <param name="config">The required configuration object for the monitor</param>
 public EdgeServerMonitor(EdgeServerConfig config)
 {
     EdgeServerRuleCollection = config.EdgeServerRulesCollection;
 }
 /// <summary>
 /// Creates a new instance of EdgeServerMonitor.
 /// </summary>
 /// <param name="config">The required configuration object for the monitor</param>
 public EdgeServerMonitor(EdgeServerConfig config)
 {
     EdgeServerRuleCollection = config.EdgeServerRulesCollection;
 }