diff Source/Mapping/NullDecimalAttribute.cs @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Source/Mapping/NullDecimalAttribute.cs	Thu Mar 27 21:46:09 2014 +0400
@@ -0,0 +1,43 @@
+using System;
+
+namespace BLToolkit.Mapping
+{
+	public class NullDecimalAttribute : NullValueAttribute
+	{
+		public NullDecimalAttribute()
+			: base(0m)
+		{
+		}
+
+		public NullDecimalAttribute(decimal nullValue)
+			: base(nullValue)
+		{
+		}
+
+		public NullDecimalAttribute(double value)
+			: base(new Decimal(value))
+		{
+		}
+
+		public NullDecimalAttribute(int[] bits)
+			: base(new Decimal(bits))
+		{
+		}
+
+		public NullDecimalAttribute(long value)
+			: base(new Decimal(value))
+		{
+		}
+
+		[CLSCompliant(false)]
+		public NullDecimalAttribute(ulong value)
+			: base(new Decimal(value))
+		{
+		}
+
+		public NullDecimalAttribute(int lo, int mid, int hi, bool isNegative, byte scale)
+			: base(new Decimal(lo, mid, hi, isNegative, scale))
+		{
+		}
+	}
+}