public LabelProperties(FileMetadataProperties basePropertiesClass)
 {
     foreach (string key in basePropertiesClass.Keys)
     {
         this.Add(key, basePropertiesClass[key]);
     }
 }
        public LabelFromMigrationAction(IMigrationAction labelMigrationAction)
        {
            LabelProperties labelProperties = new LabelProperties(FileMetadataProperties.CreateFromXmlDocument(labelMigrationAction.MigrationActionDescription));

            m_name       = labelProperties[LabelProperties.LabelNameKey];
            m_comment    = labelProperties[LabelProperties.LabelCommentKey];
            m_owner      = labelProperties[LabelProperties.LabelOwnerKey];
            m_scope      = labelProperties[LabelProperties.LabelScopeKey];
            m_labelItems = new List <ILabelItem>();
        }
        public static FileMetadataProperties CreateFromXmlDocument(XmlDocument doc)
        {
            FileMetadataProperties fileProperties = new FileMetadataProperties();
            XmlNode rootNode = doc.ChildNodes[0];

            foreach (XmlElement element in rootNode.ChildNodes)
            {
                if (!fileProperties.ContainsKey(element.Attributes[0].Name))
                {
                    fileProperties.Add(element.Attributes[0].Name, element.Attributes[0].Value);
                }
            }

            return(fileProperties);
        }