/// <summary>
 /// Initializes a new instance of the <see cref="T:EnumElementFieldValue"/> class.
 /// </summary>
 /// <param name="type">The type.</param>
 public EnumElementFieldValue(EnumElementFieldType type)
     : this(new ResourceValueList(), type)
 {
     foreach (IResourceType fieldType in type.SubTypes.Values)
     {
         this.SubValues.Add(fieldType.Name, fieldType.CreateDefaultValue());
     }
 }
        public void LoadFromXML(System.Xml.XmlNode node)
        {
            System.Diagnostics.Debug.Assert(node.Name.Equals(Typename));
            XMLResourceTypeFactory.LoadFromXML(node, this);

            /// add all the elements of the enum
            foreach (XmlNode elementNode in node.SelectNodes("enum_element"))
            {
                EnumElementFieldType elementType = new EnumElementFieldType();
                elementType.LoadFromXML(elementNode);
                this._elements.Add(elementType.Name, elementType);
            }
        }
        public void LoadFromXML(System.Xml.XmlNode node)
        {
            System.Diagnostics.Debug.Assert(node.Name.Equals(Typename));
            XMLResourceTypeFactory.LoadFromXML(node, this);

            /// add all the elements of the enum
            foreach (XmlNode elementNode in node.SelectNodes ("enum_element"))
            {
                EnumElementFieldType elementType = new EnumElementFieldType();
                elementType.LoadFromXML(elementNode);
                this._elements.Add(elementType.Name, elementType);
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:EnumElementFieldValue"/> class.
 /// </summary>
 /// <param name="fields">The fields.</param>
 /// <param name="type">The type.</param>
 internal EnumElementFieldValue(ResourceValueList fields, EnumElementFieldType type)
 {
     _type = type;
     _fields = fields;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:EnumElementFieldValue"/> class.
 /// </summary>
 /// <param name="type">The type.</param>
 public EnumElementFieldValue(EnumElementFieldType type)
     : this(new ResourceValueList(), type)
 {
     foreach (IResourceType fieldType in type.SubTypes.Values)
     {
         this.SubValues.Add(fieldType.Name, fieldType.CreateDefaultValue());
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:EnumElementFieldValue"/> class.
 /// </summary>
 /// <param name="fields">The fields.</param>
 /// <param name="type">The type.</param>
 internal EnumElementFieldValue(ResourceValueList fields, EnumElementFieldType type)
 {
     _type   = type;
     _fields = fields;
 }