Merge pull request #704 from jgagnon/master
[mono.git] / mcs / class / System.Data / System.Data.SqlClient / SqlDecimalExtensions.cs
1 using System.Data.SqlTypes;
2 using Mono.Data.Tds.Protocol;
3
4 namespace System.Data.SqlClient
5 {
6         static class SqlDecimalExtensions
7         {
8                 public static readonly SqlDecimal Null;
9
10                 internal static SqlDecimal FromTdsBigDecimal (TdsBigDecimal x)
11                 {
12                         if (x == null)
13                                 return Null;
14                         else
15                                 return new SqlDecimal (x.Precision, x.Scale, !x.IsNegative, x.Data);
16                 }       
17         }
18 }