/// <summary> /// Gets all the attributes assigned in the xml file for this parameter or all of the nested switches for /// this parameter group /// </summary> private static SwitchRelations ObtainAttributes(XmlNode node, SwitchRelations switchGroup) { SwitchRelations switchRelations; if (switchGroup != null) { switchRelations = switchGroup.Clone(); } else { switchRelations = new SwitchRelations(); } foreach (XmlAttribute attribute in node.Attributes) { // do case-insensitive comparison switch (attribute.Name.ToUpperInvariant()) { case nameProperty: switchRelations.SwitchValue = attribute.InnerText; break; case status: switchRelations.Status = attribute.InnerText; break; default: //LogError("InvalidAttribute", attribute.Name); break; } } return(switchRelations); }
private SwitchRelations ObtainAttributes(XmlNode node, SwitchRelations switchGroup) { SwitchRelations relations; if (switchGroup != null) { relations = switchGroup.Clone(); } else { relations = new SwitchRelations(); } foreach (XmlAttribute attribute in node.Attributes) { string str = attribute.Name.ToUpperInvariant(); if (str != null) { if (!(str == "NAME")) { if (str == "STATUS") { goto Label_0065; } } else { relations.SwitchValue = attribute.InnerText; } } continue; Label_0065: relations.Status = attribute.InnerText; } return(relations); }
private SwitchRelations ObtainAttributes(XmlNode node, SwitchRelations switchGroup) { SwitchRelations relations; if (switchGroup != null) { relations = switchGroup.Clone(); } else { relations = new SwitchRelations(); } foreach (XmlAttribute attribute in node.Attributes) { string str = attribute.Name.ToUpperInvariant(); if (str != null) { if (!(str == "NAME")) { if (str == "STATUS") { goto Label_0065; } } else { relations.SwitchValue = attribute.InnerText; } } continue; Label_0065: relations.Status = attribute.InnerText; } return relations; }
/// <summary> /// Gets all the attributes assigned in the xml file for this parameter or all of the nested switches for /// this parameter group /// </summary> /// <param name="node"></param> /// <param name="switchGroup"></param> /// <returns></returns> private SwitchRelations ObtainAttributes(XmlNode node, SwitchRelations switchGroup) { SwitchRelations switchRelations; if (switchGroup != null) { switchRelations = switchGroup.Clone(); } else { switchRelations = new SwitchRelations(); } foreach (XmlAttribute attribute in node.Attributes) { // do case-insensitive comparison switch (attribute.Name.ToUpperInvariant()) { case nameProperty: switchRelations.SwitchValue = attribute.InnerText; break; case status: switchRelations.Status = attribute.InnerText; break; default: //LogError("InvalidAttribute", attribute.Name); break; } } return switchRelations; }