Exemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="value">The selected field from the variant</param>
 /// <param name="identifier">The variant tag which identifies an enum</param>
 /// <param name="tagEnum">The enum value which selected the field</param>
 public CtfVariantValue(CtfFieldValue value, string identifier, CtfEnumValue tagEnum)
     : base(CtfTypes.Variant)
 {
     this.Value      = value;
     this.Identifier = identifier;
     this.TagEnum    = tagEnum;
 }
        internal bool AddValue(CtfFieldValue value)
        {
            this.fields.Add(value);

            if (this.fieldsByName.ContainsKey(value.FieldName))
            {
                return(false);
            }

            this.fieldsByName.Add(value.FieldName, value);

            return(true);
        }