internal void FromCacheField(CacheField cf)
        {
            SetAllNull();

            if (cf.Name != null)
            {
                Name = cf.Name.Value;
            }
            if (cf.Caption != null)
            {
                Caption = cf.Caption.Value;
            }
            if (cf.PropertyName != null)
            {
                PropertyName = cf.PropertyName.Value;
            }
            if (cf.ServerField != null)
            {
                ServerField = cf.ServerField.Value;
            }
            if (cf.UniqueList != null)
            {
                UniqueList = cf.UniqueList.Value;
            }
            if (cf.NumberFormatId != null)
            {
                NumberFormatId = cf.NumberFormatId.Value;
            }
            if (cf.Formula != null)
            {
                Formula = cf.Formula.Value;
            }
            if (cf.SqlType != null)
            {
                SqlType = cf.SqlType.Value;
            }
            if (cf.Hierarchy != null)
            {
                Hierarchy = cf.Hierarchy.Value;
            }
            if (cf.Level != null)
            {
                Level = cf.Level.Value;
            }
            if (cf.DatabaseField != null)
            {
                DatabaseField = cf.DatabaseField.Value;
            }
            if (cf.MappingCount != null)
            {
                MappingCount = cf.MappingCount.Value;
            }
            if (cf.MemberPropertyField != null)
            {
                MemberPropertyField = cf.MemberPropertyField.Value;
            }

            if (cf.SharedItems != null)
            {
                SharedItems.FromSharedItems(cf.SharedItems);
                HasSharedItems = true;
            }

            if (cf.FieldGroup != null)
            {
                FieldGroup.FromFieldGroup(cf.FieldGroup);
                HasFieldGroup = true;
            }

            MemberPropertiesMap mpm;

            using (var oxr = OpenXmlReader.Create(cf))
            {
                while (oxr.Read())
                {
                    if (oxr.ElementType == typeof(MemberPropertiesMap))
                    {
                        mpm = (MemberPropertiesMap)oxr.LoadCurrentElement();
                        if (mpm.Val != null)
                        {
                            MemberPropertiesMaps.Add(mpm.Val.Value);
                        }
                        else
                        {
                            MemberPropertiesMaps.Add(0);
                        }
                    }
                }
            }
        }