System.Xml.Linq.Extensions.IsProperty C# (CSharp) Method

IsProperty() public static method

public static IsProperty ( this xElement ) : bool
xElement this
return bool
        public static bool IsProperty(this XElement xElement)
        {
            bool ret = false;

            ret = ((xElement.Name == "string" || xElement.Name == "bool" || xElement.Name == "int")) &&
                (xElement.Attributes().Where(a => a.Name == "key").FirstOrDefault() != null);

            return ret;
        }