System.ConfigNode.AddAttribute C# (CSharp) Méthode

AddAttribute() private méthode

private AddAttribute ( String key, String value ) : int
key String
value String
Résultat int
        internal int AddAttribute(String key, String value)
        {
            m_attributes.Add(new DictionaryEntry(key, value));
            return m_attributes.Count-1;
        }

Usage Example

Exemple #1
0
 public void CreateAttribute(int size,
                             ConfigNodeSubType subType,
                             ConfigNodeType nType,
                             int terminal,
                             [MarshalAs(UnmanagedType.LPWStr)] String text,
                             int textLength,
                             int prefixLength)
 {
     //Trace("CreateAttribute",size,subType,nType,terminal,text,textLength,prefixLength,0);
     if (parsing)
     {
         // if the value of the attribute is null, the parser doesn't come back, so need to store the attribute when the
         // attribute name is encountered
         if (nType == ConfigNodeType.Attribute)
         {
             attributeEntry = currentNode.AddAttribute(text, "");
             key            = text;
         }
         else if (nType == ConfigNodeType.PCData)
         {
             currentNode.ReplaceAttribute(attributeEntry, key, text);
         }
         else
         {
             throw new ApplicationException(String.Format(Environment.GetResourceString("XML_Syntax_InvalidSyntaxInFile"), fileName, lastProcessed));
         }
     }
 }
All Usage Examples Of System.ConfigNode::AddAttribute