Exemplo n.º 1
0
            public ChoObjectDataReaderProperty(string memberName, Type memberType)
            {
                ChoGuard.ArgumentNotNullOrEmpty(memberName, "MemberName");
                //ChoGuard.ArgumentNotNullOrEmpty(memberType, "MemberType");

                MemberName  = memberName;
                ProperyType = memberType == null ? typeof(string) : memberType.GetUnderlyingType();
                ChoDataTableColumnTypeAttribute dtColumnType = ChoType.GetAttribute <ChoDataTableColumnTypeAttribute>(ProperyType);

                if (dtColumnType != null && dtColumnType.Type != null)
                {
                    ProperyType = dtColumnType.Type;
                }
            }
Exemplo n.º 2
0
            public ChoObjectDataReaderProperty(string memberName, Type memberType, bool isSimpleType = false)
            {
                ChoGuard.ArgumentNotNullOrEmpty(memberName, "MemberName");
                //ChoGuard.ArgumentNotNullOrEmpty(memberType, "MemberType");
                _isSimpleType = isSimpleType;
                MemberName    = memberName;
                ProperyType   = memberType == null ? typeof(string) : memberType.GetUnderlyingType();
                IsNullable    = true; // memberType == null ? true : memberType.IsNullableType() || memberType == typeof(string) || !memberType.IsValueType;
                ChoDataTableColumnTypeAttribute dtColumnType = ChoType.GetAttribute <ChoDataTableColumnTypeAttribute>(ProperyType);

                if (dtColumnType != null && dtColumnType.Type != null)
                {
                    ProperyType = dtColumnType.Type;
                }
            }