diff Source/Mapping/NullGuidAttribute.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/NullGuidAttribute.cs	Thu Mar 27 21:46:09 2014 +0400
@@ -0,0 +1,42 @@
+using System;
+
+namespace BLToolkit.Mapping
+{
+	public class NullGuidAttribute : NullValueAttribute
+	{
+		public NullGuidAttribute()
+			: base(Guid.Empty)
+		{
+		}
+
+		public NullGuidAttribute(byte[] b)
+			: base(new Guid(b))
+		{
+		}
+
+		public NullGuidAttribute(string g)
+			: base(new Guid(g))
+		{
+		}
+
+		public NullGuidAttribute(int a, short b, short c, byte[] d)
+			: base(new Guid(a, b, c, d))
+		{
+		}
+
+		public NullGuidAttribute(int a, short b, short c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k)
+			: base(new Guid(a, b, c, d, e, f, g, h, i, j, k))
+		{
+		}
+
+#if !SILVERLIGHT
+
+		[CLSCompliant(false)]
+		public NullGuidAttribute(uint a, ushort b, ushort c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k)
+			: base(new Guid(a, b, c, d, e, f, g, h, i, j, k))
+		{
+		}
+
+#endif
+	}
+}