Esempio n. 1
0
        private static bool EndElement(Stack<IPropertyListItem> items, string elementName, string expectedName, PropertyListItemTypes type)
        {
            if (elementName == expectedName)
            {
                if (items != null && items.Count > 0 && items.Peek().Type == type)
                {
                    items.Pop();
                    return true;
                }

                throw new FormatException("Expected '" + expectedName + "' element closing tag");
            }

            return false;
        }
 /// <summary>
 /// Hidden constructor.
 /// </summary>
 protected PropertyListItem(string key, PropertyListItemTypes type)
 {
     _key = key;
     _type = type;
 }
Esempio n. 3
0
        private static bool EndElement(Stack <IPropertyListItem> items, string elementName, string expectedName, PropertyListItemTypes type)
        {
            if (elementName == expectedName)
            {
                if (items != null && items.Count > 0 && items.Peek().Type == type)
                {
                    items.Pop();
                    return(true);
                }

                throw new FormatException("Expected '" + expectedName + "' element closing tag");
            }

            return(false);
        }
Esempio n. 4
0
 /// <summary>
 /// Hidden constructor.
 /// </summary>
 protected PropertyListItem(string key, PropertyListItemTypes type)
 {
     _key  = key;
     _type = type;
 }