Beispiel #1
0
        public static PInt32 Parse(string s, PValueType type)
        {
            var sp = string.IsNullOrEmpty(s)
                ? new PInt32(type)
                : SqlInt32.Parse(s);

            return(sp);
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="s"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static PDecimal Parse(string s, PValueType type)
        {
            PDecimal sp;

            sp = string.IsNullOrEmpty(s) ? new PDecimal(type) : SqlDecimal.Parse(s);

            return(sp);
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="value"></param>
        public PXml(SqlXml value)
        {
            _sqlXml = value;

            if (value != null)
            {
                _type = PValueType.Value;
            }
            else
            {
                _type = PValueType.Null;
            }
        }
Beispiel #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="s"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static PString Parse(string s, PValueType type)
        {
            PString sp;

            if (string.IsNullOrEmpty(s))
            {
                sp = new PString(type);
            }
            else
            {
                sp = new PString(s);
            }

            return(sp);
        }
Beispiel #5
0
        /// <summary>
        /// Converts the specified <see cref="System.String"/> representation of a logical value
        /// to its <see cref="PBoolean"/> equivalent.
        /// </summary>
        /// <param name="s">
        /// The <see cref="System.String"/> to be converted.
        /// </param>
        /// <param name="type"></param>
        /// <returns>
        /// An <see cref="PBoolean"/> structure containing the parsed value.
        /// </returns>
        public static PBoolean Parse(string s, PValueType type)
        {
            PBoolean sp;

            if (string.IsNullOrEmpty(s))
            {
                sp = new PBoolean(type);
            }
            else
            {
                sp = SqlBoolean.Parse(s);
            }

            return(sp);
        }
Beispiel #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="s"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static PDecimal Parse(string s, PValueType type)
        {
            PDecimal sp;

            if (string.IsNullOrEmpty(s))
            {
                sp = new PDecimal(type);
            }
            else
            {
                sp = SqlDecimal.Parse(s);
            }

            return(sp);
        }
Beispiel #7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="s"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static PSingle Parse(string s, PValueType type)
        {
            PSingle sp;

            if (string.IsNullOrEmpty(s))
            {
                sp = new PSingle(type);
            }
            else
            {
                sp = SqlSingle.Parse(s);
            }

            return(sp);
        }
Beispiel #8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="s"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static PDateTime Parse(string s, PValueType type)
        {
            PDateTime sp;

            if (string.IsNullOrEmpty(s))
            {
                sp = new PDateTime(type);
            }
            else
            {
                sp = SqlDateTime.Parse(s);
            }

            return(sp);
        }
Beispiel #9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="s"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static PMoney Parse(string s, PValueType type)
        {
            PMoney sp;

            if (string.IsNullOrEmpty(s))
            {
                sp = new PMoney(type);
            }
            else
            {
                sp = SqlMoney.Parse(s);
            }

            return(sp);
        }
Beispiel #10
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="s"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static PInt16 Parse(string s, PValueType type)
        {
            PInt16 sp;

            if (string.IsNullOrEmpty(s))
            {
                sp = new PInt16(type);
            }
            else
            {
                sp = SqlInt16.Parse(s);
            }

            return(sp);
        }
Beispiel #11
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="s"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static PGuid Parse(string s, PValueType type)
        {
            PGuid sp;

            if (string.IsNullOrEmpty(s))
            {
                sp = new PGuid(type);
            }
            else
            {
                sp = SqlGuid.Parse(s);
            }

            return(sp);
        }
Beispiel #12
0
 private PMoney(PValueType type)
 {
     ValueType = type;
     _sql      = SqlMoney.Null;
 }
Beispiel #13
0
        public static PSingle Parse(string s, PValueType type)
        {
            var sp = string.IsNullOrEmpty(s) ? new PSingle(type) : SqlSingle.Parse(s);

            return(sp);
        }
Beispiel #14
0
 private PSingle(PValueType type)
 {
     ValueType = type;
     _sql      = SqlSingle.Null;
 }
Beispiel #15
0
 private PString(PValueType type)
 {
     ValueType = type;
     _sql      = SqlString.Null;
 }
Beispiel #16
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="type"></param>
 private PXml(PValueType type)
 {
     _type   = type;
     _sqlXml = null;
 }
Beispiel #17
0
 private PByte(PValueType type)
 {
     ValueType = type;
     _sql      = SqlByte.Null;
 }
Beispiel #18
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="value"></param>
        public PXml(SqlXml value)
        {
            _sqlXml = value;

            _type = value != null ? PValueType.Value : PValueType.Null;
        }
Beispiel #19
0
 private PInt16(PValueType type)
 {
     ValueType = type;
     _sql      = SqlInt16.Null;
 }
Beispiel #20
0
 private PInt32(PValueType type)
 {
     ValueType = type;
     _sql      = SqlInt32.Null;
 }
Beispiel #21
0
 private PDateTime(PValueType type)
 {
     ValueType = type;
     _sql      = SqlDateTime.Null;
 }
Beispiel #22
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="s"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static PMoney Parse(string s, PValueType type)
        {
            var sp = string.IsNullOrEmpty(s) ? new PMoney(type) : SqlMoney.Parse(s);

            return(sp);
        }
Beispiel #23
0
        public static PGuid Parse(string s, PValueType type)
        {
            var sp = string.IsNullOrEmpty(s) ? new PGuid(type) : SqlGuid.Parse(s);

            return(sp);
        }
Beispiel #24
0
 private PGuid(PValueType type)
 {
     ValueType = type;
     _sql      = SqlGuid.Null;
 }
Beispiel #25
0
 private PDecimal(PValueType type)
 {
     ValueType = type;
     _sql      = SqlDecimal.Null;
 }
Beispiel #26
0
 private PBoolean(PValueType type)
 {
     ValueType = type;
     _sql      = SqlBoolean.Null;
 }
Beispiel #27
0
 private PBinary(PValueType type)
 {
     ValueType = type;
     _sql      = SqlBinary.Null;
 }
Beispiel #28
0
 public static PBoolean Parse(string s, PValueType type) => string.IsNullOrEmpty(s) ? new PBoolean(type) : SqlBoolean.Parse(s);
Beispiel #29
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="type"></param>
 private PVariant(PValueType type)
 {
     ValueType = type;
     _sql      = null;
 }
Beispiel #30
0
 private PDouble(PValueType type)
 {
     ValueType = type;
     _sql      = SqlDouble.Null;
 }