Microsoft.Protocols.TestSuites.MS_WSSREST.TestSuiteBase.IsExistEntityType C# (CSharp) Method

IsExistEntityType() protected method

Check whether the special entity type exist in the metadata.
protected IsExistEntityType ( XmlNodeList xnl, string entityTypeName ) : bool
xnl System.Xml.XmlNodeList The metadata from server.
entityTypeName string The entity type name.
return bool
        protected bool IsExistEntityType(XmlNodeList xnl, string entityTypeName)
        {
            bool result = false;

            foreach (XmlNode node in xnl)
            {
                string listName = node.Attributes["Name"].Value;
                if (listName.Equals(entityTypeName, StringComparison.OrdinalIgnoreCase))
                {
                    result = true;
                    break;
                }
            }

            return result;
        }