} // func GetAttributeValue internal string GetAttributeValueCore(IDEConfigurationAttribute attr) { var value = attr.IsElement ? element?.Element(attr.Name)?.Value : element?.Attribute(attr.Name)?.Value; return(value); } // func GetAttributeValueCore
public XConfigNodes(XElement parentElement, IDEConfigurationElement configurationElement) { if (parentElement == null) { throw new ArgumentNullException(nameof(parentElement)); } this.configurationElement = configurationElement ?? throw new ArgumentNullException(nameof(configurationElement)); elements = parentElement.Elements(configurationElement.Name).Select(x => new XConfigNode(configurationElement, x)).ToArray(); primaryKey = configurationElement.GetAttributes().FirstOrDefault(a => a.IsPrimaryKey); } // ctor