Пример #1
0
        private void _InitSubElements()
        {
            BxCompoundCore          core       = Core;
            IEnumerable <FieldInfo> fieldsInfo = core.GetAllFieldsInfo();

            foreach (FieldInfo one in fieldsInfo)
            {
                object field = one.GetValue(this);
                if (field is IBxElementInit)
                {
                    (field as IBxElementInit).BindToParent(this, _carrier);
                }
            }
        }
Пример #2
0
        private void _InitCore()
        {
            Type type = this.GetType();

            while (type != typeof(BxCompoundValueBase))
            {
                object[] attribs = type.GetCustomAttributes(typeof(BxCompoundAttribute), false);
                if (attribs.Length > 0)
                {
                    _core = ((BxCompoundAttribute)attribs[0]).Core;
                    return;
                }
            }
        }