public StructureProperty(StructurePropertyInfo info, DynamicGetter getter, DynamicSetter setter = null)
        {
            _getter = getter;
            _setter = setter;

            Parent       = info.Parent;
            Name         = info.Name;
            DataType     = info.DataType;
            IsRootMember = info.Parent == null;
            IsReadOnly   = _setter == null;
            UniqueMode   = info.UniqueMode;

            var isSimpleOrValueType = DataType.IsSimpleType() || DataType.IsValueType;

            IsEnumerable    = !isSimpleOrValueType && DataType.IsEnumerableType();
            IsElement       = Parent != null && (Parent.IsElement || Parent.IsEnumerable);
            ElementDataType = IsEnumerable ? DataType.GetEnumerableElementType() : null;

            if (IsUnique && !isSimpleOrValueType)
            {
                throw new SisoDbException(ExceptionMessages.StructureProperty_Ctor_UniqueOnNonSimpleType);
            }

            Path = PropertyPathBuilder.BuildPath(this);
        }
        public StructureProperty(StructurePropertyInfo info, DynamicGetter getter, DynamicSetter setter = null)
        {
            _getter = getter;
            _setter = setter;

            Parent = info.Parent;
            Name = info.Name;
            DataType = info.DataType;
            IsRootMember = info.Parent == null;
            IsReadOnly = _setter == null;
            UniqueMode = info.UniqueMode;

            var isSimpleOrValueType = DataType.IsSimpleType() || DataType.IsValueType;
            IsEnumerable = !isSimpleOrValueType && DataType.IsEnumerableType();
            IsElement = Parent != null && (Parent.IsElement || Parent.IsEnumerable);
            ElementDataType = IsEnumerable ? DataType.GetEnumerableElementType() : null;

            if (IsUnique && !isSimpleOrValueType)
                throw new SisoDbException(ExceptionMessages.StructureProperty_Ctor_UniqueOnNonSimpleType);

            Path = PropertyPathBuilder.BuildPath(this);
        }