Пример #1
0
        public ModelVariable(Model model, Object instance, MemberInfo info, String name, ModelVariableAttribute attr)
            : base(model, attr)
        {
            _info     = info;
            _instance = instance;
            _name     = name;

            if (attr != null)
            {
                //Infer values from the type, if not specified
                if (_values.Count == 0 || attr.Type != null)
                {
                    this.AddValuesFromType(attr, this.Type);
                }
            }

            //BitMask
            //TODO: Better place to expand this, (incase values added later).
            if (this.BitMask)
            {
                this.AddBitCombinations();
            }
        }
Пример #2
0
 //Constructor
 public ModelVariable(Model model, MemberInfo info, ModelVariableAttribute attr)
     : this(model, model, info, info.Name, attr)
 {
 }