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); } } }
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; } } }