System.Data.Common.DbDataReader.GetDecimal(int)

Here are the examples of the csharp api class System.Data.Common.DbDataReader.GetDecimal(int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

26 Examples 7

1. Example

Project: EDDiscovery
Source File: SQLiteCommandED.cs
View license
public override decimal GetDecimal(int ordinal) { return InnerReader.GetDecimal(ordinal); }

2. Example

Project: Glimpse
Source File: GlimpseDbDataReader.cs
View license
public override decimal GetDecimal(int ordinal)
        {
            return InnerDataReader.GetDecimal(ordinal);
        }

3. Example

View license
public override decimal GetDecimal(int i)
            {
                return reader.GetDecimal(i);
            }

4. Example

Project: ALinq
Source File: DataReader.cs
View license
public override decimal GetDecimal(int ordinal)
        {
            return source.GetDecimal(ordinal);
        }

5. Example

Project: nhibernate-core
Source File: ResultSetWrapper.cs
View license
public override decimal GetDecimal(int i)
		{
			return rs.GetDecimal(i);
		}

6. Example

View license
public override decimal GetDecimal(int i)
		{
			return reader.GetDecimal(i);
		}

7. Example

View license
public override decimal GetDecimal(int i)
		{
			return _reader.GetDecimal(i);
		}

8. Example

Project: NServiceKit
Source File: ProfiledDbDataReader.cs
View license
public override decimal GetDecimal(int ordinal)
        {
            return _reader.GetDecimal(ordinal);
        }

9. Example

View license
public override decimal GetDecimal(int ordinal)
        {
            return wrappedReader.GetDecimal(ordinal);
        }

10. Example

Project: EasyLOB
Source File: DbDataReaderExtensions.cs
View license
public static decimal ToDecimal(this DbDataReader reader, int index)
        {
            return reader.IsDBNull(index) ? LibraryDefaults.Default_Decimal : reader.GetDecimal(index);
        }

11. Example

Project: EasyLOB
Source File: DbDataReaderExtensions.cs
View license
public static decimal? ToDecimalNullable(this DbDataReader reader, int index)
        {
            return reader.IsDBNull(index) ? (decimal?)null : reader.GetDecimal(index);
        }

12. Example

Project: ALinq
Source File: DataReader.cs
View license
public override bool GetBoolean(int ordinal)
        {
            //OracleNumber number = source.GetOracleNumber(ordinal);
            //return Convert.ToBoolean(number.Value);
            var result = source.GetDecimal(ordinal);
            return Convert.ToBoolean(result);
        }

13. Example

Project: ALinq
Source File: DataReader.cs
View license
public override int GetInt32(int ordinal)
        {
            var result = source.GetDecimal(ordinal);
            return Convert.ToInt32(result);
        }

14. Example

View license
public override decimal GetDecimal(int ordinal)
        {
            if (this.IsDBNull(ordinal))
                throw new SqlNullValueException(string.Format("Column contains {0} DBNull", ordinal));

            return _resultsReader.GetDecimal(ordinal);
        }

15. Example

View license
public object NullSafeGet(DbDataReader resultSet, string[] names, ISessionImplementor session, object owner)
		{
			int index0 = resultSet.GetOrdinal(names[0]);
			int index1 = resultSet.GetOrdinal(names[1]);
			if (resultSet.IsDBNull(index0))
			{
				return null;
			}
			decimal value = resultSet.GetDecimal(index0);
			string cur = resultSet.GetString(index1);
			return new MonetaryAmount(value, cur);
		}

16. Example

Project: framework
Source File: FieldReader.cs
View license
public Byte GetByte(int ordinal)
        {
            LastOrdinal = ordinal;
            switch (typeCodes[ordinal])
            {
                case TypeCode.Byte:
                    return reader.GetByte(ordinal);
                case TypeCode.Int16:
                    return (Byte)reader.GetInt16(ordinal);
                case TypeCode.Int32:
                    return (Byte)reader.GetInt32(ordinal);
                case TypeCode.Int64:
                    return (Byte)reader.GetInt64(ordinal);
                case TypeCode.Double:
                    return (Byte)reader.GetDouble(ordinal);
                case TypeCode.Single:
                    return (Byte)reader.GetFloat(ordinal);
                case TypeCode.Decimal:
                    return (Byte)reader.GetDecimal(ordinal);
                default:
                    return ReflectionTools.ChangeType<Byte>(reader.GetValue(ordinal));
            }
        }

17. Example

Project: framework
Source File: FieldReader.cs
View license
public Char GetChar(int ordinal)
        {
            LastOrdinal = ordinal;
            switch (typeCodes[ordinal])
            {
                case TypeCode.Byte:
                    return (Char)reader.GetByte(ordinal);
                case TypeCode.Int16:
                    return (Char)reader.GetInt16(ordinal);
                case TypeCode.Int32:
                    return (Char)reader.GetInt32(ordinal);
                case TypeCode.Int64:
                    return (Char)reader.GetInt64(ordinal);
                case TypeCode.Double:
                    return (Char)reader.GetDouble(ordinal);
                case TypeCode.Single:
                    return (Char)reader.GetFloat(ordinal);
                case TypeCode.Decimal:
                    return (Char)reader.GetDecimal(ordinal);
                default:
                    return ReflectionTools.ChangeType<Char>(reader.GetValue(ordinal));
            }
        }

18. Example

Project: framework
Source File: FieldReader.cs
View license
public Single GetFloat(int ordinal)
        {
            LastOrdinal = ordinal;
            switch (typeCodes[ordinal])
            {
                case TypeCode.Byte:
                    return (Single)reader.GetByte(ordinal);
                case TypeCode.Int16:
                    return (Single)reader.GetInt16(ordinal);
                case TypeCode.Int32:
                    return (Single)reader.GetInt32(ordinal);
                case TypeCode.Int64:
                    return (Single)reader.GetInt64(ordinal);
                case TypeCode.Double:
                    return (Single)reader.GetDouble(ordinal);
                case TypeCode.Single:
                    return reader.GetFloat(ordinal);
                case TypeCode.Decimal:
                    return (Single)reader.GetDecimal(ordinal);
                default:
                    return ReflectionTools.ChangeType<Single>(reader.GetValue(ordinal));
            }
        }

19. Example

Project: framework
Source File: FieldReader.cs
View license
public Double GetDouble(int ordinal)
        {
            LastOrdinal = ordinal;
            switch (typeCodes[ordinal])
            {
                case TypeCode.Byte:
                    return (Double)reader.GetByte(ordinal);
                case TypeCode.Int16:
                    return (Double)reader.GetInt16(ordinal);
                case TypeCode.Int32:
                    return (Double)reader.GetInt32(ordinal);
                case TypeCode.Int64:
                    return (Double)reader.GetInt64(ordinal);
                case TypeCode.Double:
                    return reader.GetDouble(ordinal);
                case TypeCode.Single:
                    return (Double)reader.GetFloat(ordinal);
                case TypeCode.Decimal:
                    return (Double)reader.GetDecimal(ordinal);
                default:
                    return ReflectionTools.ChangeType<Double>(reader.GetValue(ordinal));
            }
        }

20. Example

Project: framework
Source File: FieldReader.cs
View license
public Decimal GetDecimal(int ordinal)
        {
            LastOrdinal = ordinal;
            switch (typeCodes[ordinal])
            {
                case TypeCode.Byte:
                    return (Decimal)reader.GetByte(ordinal);
                case TypeCode.Int16:
                    return (Decimal)reader.GetInt16(ordinal);
                case TypeCode.Int32:
                    return (Decimal)reader.GetInt32(ordinal);
                case TypeCode.Int64:
                    return (Decimal)reader.GetInt64(ordinal);
                case TypeCode.Double:
                    return (Decimal)reader.GetDouble(ordinal);
                case TypeCode.Single:
                    return (Decimal)reader.GetFloat(ordinal);
                case TypeCode.Decimal:
                    return reader.GetDecimal(ordinal);
                default:
                    return ReflectionTools.ChangeType<Decimal>(reader.GetValue(ordinal));
            }
        }

21. Example

Project: framework
Source File: FieldReader.cs
View license
public Int16 GetInt16(int ordinal)
        {
            LastOrdinal = ordinal;
            switch (typeCodes[ordinal])
            {
                case TypeCode.Byte:
                    return (Int16)reader.GetByte(ordinal);
                case TypeCode.Int16:
                    return reader.GetInt16(ordinal);
                case TypeCode.Int32:
                    return (Int16)reader.GetInt32(ordinal);
                case TypeCode.Int64:
                    return (Int16)reader.GetInt64(ordinal);
                case TypeCode.Double:
                    return (Int16)reader.GetDouble(ordinal);
                case TypeCode.Single:
                    return (Int16)reader.GetFloat(ordinal);
                case TypeCode.Decimal:
                    return (Int16)reader.GetDecimal(ordinal);
                default:
                    return ReflectionTools.ChangeType<Int16>(reader.GetValue(ordinal));
            }
        }

22. Example

Project: framework
Source File: FieldReader.cs
View license
public Int32 GetInt32(int ordinal)
        {
            LastOrdinal = ordinal;
            switch (typeCodes[ordinal])
            {
                case TypeCode.Byte:
                    return (Int32)reader.GetByte(ordinal);
                case TypeCode.Int16:
                    return (Int32)reader.GetInt16(ordinal);
                case TypeCode.Int32:
                    return reader.GetInt32(ordinal);
                case TypeCode.Int64:
                    return (Int32)reader.GetInt64(ordinal);
                case TypeCode.Double:
                    return (Int32)reader.GetDouble(ordinal);
                case TypeCode.Single:
                    return (Int32)reader.GetFloat(ordinal);
                case TypeCode.Decimal:
                    return (Int32)reader.GetDecimal(ordinal);
                default:
                    return ReflectionTools.ChangeType<Int32>(reader.GetValue(ordinal));
            }
        }

23. Example

Project: framework
Source File: FieldReader.cs
View license
public Int64 GetInt64(int ordinal)
        {
            LastOrdinal = ordinal;
            switch (typeCodes[ordinal])
            {
                case TypeCode.Byte:
                    return (Int64)reader.GetByte(ordinal);
                case TypeCode.Int16:
                    return (Int64)reader.GetInt16(ordinal);
                case TypeCode.Int32:
                    return (Int64)reader.GetInt32(ordinal);
                case TypeCode.Int64:
                    return (Int64)reader.GetInt64(ordinal);
                case TypeCode.Double:
                    return (Int64)reader.GetDouble(ordinal);
                case TypeCode.Single:
                    return (Int64)reader.GetFloat(ordinal);
                case TypeCode.Decimal:
                    return (Int64)reader.GetDecimal(ordinal);
                default:
                    return ReflectionTools.ChangeType<Int64>(reader.GetValue(ordinal));
            }
        }

24. Example

Project: nuodb-dotnet
Source File: TestFixture.cs
View license
[Test]
        public void testDB16326()
        {
            using (NuoDbConnection connection = n/n ..... /n //View Source file for more details /n }

25. Example

Project: framework
Source File: FieldReader.cs
View license
public string GetString(int ordinal)
        {
            LastOrdinal = ordinal;
            if (reader.IsDBNull(ordinal))
            {
                return null;
            }

            switch (typeCodes[ordinal])
            {
                case TypeCode.Byte:
                    return reader.GetByte(ordinal).ToString();
                case TypeCode.Int16:
                    return reader.GetInt16(ordinal).ToString();
                case TypeCode.Int32:
                    return reader.GetInt32(ordinal).ToString();
                case TypeCode.Int64:
                    return reader.GetInt64(ordinal).ToString();
                case TypeCode.Double:
                    return reader.GetDouble(ordinal).ToString();
                case TypeCode.Single:
                    return reader.GetFloat(ordinal).ToString();
                case TypeCode.Decimal:
                    return reader.GetDecimal(ordinal).ToString();
                case TypeCode.DateTime:
                    return reader.GetDateTime(ordinal).ToString();
                case tcGuid:
                    return reader.GetGuid(ordinal).ToString();
                case TypeCode.String:
                    return reader.GetString(ordinal);
                default:
                    return reader.GetValue(ordinal).ToString();
            }
        }

26. Example

View license
private Delegate GetValuesGetter(int ind, MemberInfo m)
			{
				var memberType = ReflectionUtils.Ge/n ..... /n //View Source file for more details /n }