private IResourceActionProperty GetProperty(IResourceActionProperties properties, string propertyName)
 {
     foreach (IResourceActionProperty property in properties)
     {
         if (property.Name == propertyName)
         {
             return property;
         }
     }
     return null;
 }
Example #2
0
 /// <summary>
 /// Add all the resource properties into the XML as DataElement nodes under
 /// a DataElements node
 /// </summary>
 /// <param name="actionClassNode">The parent ActionClass node that the DataElements node is appended to</param>
 /// <param name="properties">The properties being written</param>
 public static void AddProperties(XmlNode actionClassNode, IResourceActionProperties properties)
 {
     XmlDocument xmlDocument = actionClassNode.OwnerDocument;
     XmlNode dataElementsNode = xmlDocument.CreateElement("DataElements");
     foreach (IResourceActionProperty property in properties)
     {
         AddProperty(dataElementsNode, property);
     }
     actionClassNode.AppendChild(dataElementsNode);
 }