/*
         * Sets a range where a property is expected to be populated with a specific object.
         * The start and invalid versions can be null.
         */
        public void SetExpectedPopulated(string name, object populatedObject, string versionStart, string firstInvalidVersion)
        {
            var range = new XMLAttribute()
            {
                Name = name, FirstVersion = versionStart, RemovedVersion = firstInvalidVersion
            };

            expectedPopulated.Add(range, true);
            expectedPopulatedObjects.Add(range, populatedObject);
        }
Exemple #2
0
    /// <summary>
    /// This returns all the attriutes of a node as a hashtable
    /// </summary>
    /// <returns>The attributes.</returns>
    /// <param name="node">Node.</param>
    public static Hashtable GetAttributes(IXMLNode node)
    {
        Hashtable attributesHash = new Hashtable(); //Key: attribute name, Value: attribute value

        for (int i = 0; i < node.Attributes.Count; i++)
        {
            XMLAttribute attr      = node.Attributes[i];
            string       attrKey   = attr.name;
            string       attrValue = attr.value;
            attributesHash[attrKey] = attrValue;
        }
        return(attributesHash);
    }
Exemple #3
0
 public virtual void AddAttribute(int line, XMLAttribute a)
 {
     if (a != null)
     {
         XMLElement ele = a.GetElement();
         if (flag_source.ToUpper() == a.GetName().ToUpper())
         {
             _read._source = a.GetValue();
         }
         else if (flag_type.ToUpper() == a.GetName().ToUpper())
         {
             _read._classType = a.GetValue();
         }
         else if (ele != null)
         {
             _read._classType = ele.GetName();
         }
     }
 }