コード例 #1
0
        public void SerializeDeserializeSByteEnumUtf16(SByteEnum input)
        {
            var serialized   = JsonSerializer.Generic.Utf16.Serialize(input);
            var deserialized = JsonSerializer.Generic.Utf16.Deserialize <SByteEnum>(serialized);

            Assert.Equal(input, deserialized);
        }
コード例 #2
0
        public void SerializeDeserializeIntegerSByteEnumUtf16(SByteEnum input)
        {
            var serialized   = JsonSerializer.Generic.Utf16.Serialize <SByteEnum, ExcludeNullCamelCaseIntegerEnumResolver <char> >(input);
            var deserialized = JsonSerializer.Generic.Utf16.Deserialize <SByteEnum, ExcludeNullCamelCaseIntegerEnumResolver <char> >(serialized);

            Assert.Equal(input, deserialized);
        }
コード例 #3
0
 public void SimpleEnumTest()
 {
     {
         const ByteEnum a = ByteEnum.Help;
         Assert.AreEqual(JsonSerializer.Deserialize <ByteEnum>(JsonSerializer.Serialize(a)), a);
     }
     {
         const SByteEnum a = SByteEnum.None;
         Assert.AreEqual(JsonSerializer.Deserialize <SByteEnum>(JsonSerializer.Serialize(a)), a);
     }
     {
         const Int16Enum a = Int16Enum.Queue;
         Assert.AreEqual(JsonSerializer.Deserialize <Int16Enum>(JsonSerializer.Serialize(a)), a);
     }
     {
         const UInt16Enum a = UInt16Enum.Queue;
         Assert.AreEqual(JsonSerializer.Deserialize <UInt16Enum>(JsonSerializer.Serialize(a)), a);
     }
     {
         const Int32Enum a = Int32Enum.Want;
         Assert.AreEqual(JsonSerializer.Deserialize <Int32Enum>(JsonSerializer.Serialize(a)), a);
     }
     {
         const UInt32Enum a = UInt32Enum.Want;
         Assert.AreEqual(JsonSerializer.Deserialize <UInt32Enum>(JsonSerializer.Serialize(a)), a);
     }
     {
         const Int64Enum a = (Int64Enum)long.MaxValue;
         Assert.AreEqual(JsonSerializer.Deserialize <Int64Enum>(JsonSerializer.Serialize(a)), a);
     }
     {
         const UInt64Enum a = (UInt64Enum)ulong.MaxValue;
         Assert.AreEqual(JsonSerializer.Deserialize <UInt64Enum>(JsonSerializer.Serialize(a)), a);
     }
 }
        public void EmptyMethodWithEnumTypeRefArg()
        {
            EasyType typebuilder = new EasyType(module, "mytype");

            SByteEnum refArgInst = SByteEnum.Two;
            Type      refType    = GetEnumRefType(ref refArgInst);

            Assert.IsTrue(refType.IsByRef);

            ArgumentReference         refArg = new ArgumentReference(refType);
            ReturnReferenceExpression ret    = new ReturnReferenceExpression(typeof(int));

            EasyMethod emptyMethod = typebuilder.CreateMethod("DoSomething", ret, refArg);

            Type newType = typebuilder.BuildType();

            Assert.IsNotNull(newType);
            object instance = Activator.CreateInstance(newType);

            Assert.IsNotNull(instance);

            MethodInfo method = instance.GetType().GetMethod("DoSomething");

            method.Invoke(instance, new object[] { refArgInst });

            Assert.AreEqual(SByteEnum.Two, refArgInst, "Argument made round-trip successfully");

            RunPEVerify();
        }
コード例 #5
0
 public void TestRoundtripSByteEnum([ValueSource(nameof(SByteEnumValues))] SByteEnum value)
 {
     Roundtrip(value).Should().Be(value);
     Roundtrip(new GenericType <SByteEnum> {
         Value = value
     }).Value.Should().Be(value);
 }
        public Type GetEnumRefType(ref SByteEnum refArg)
        {
            // Need this because .Net 1.1 does not have the Type.MakeByRefType method.
            ParameterInfo[] parameters = this.GetType().GetMethod("GetEnumRefType").GetParameters();
            Assert.AreEqual(1, parameters.Length);
            Type refType = parameters[0].ParameterType;

            Assert.IsTrue(refType.IsByRef);
            return(refType);
        }
コード例 #7
0
        public void LiftedEnumAddition(SByteEnum?enumVal, sbyte?integralVal, SByteEnum expected)
        {
            dynamic d      = enumVal;
            object  result = unchecked (d + integralVal);

            Assert.Equal(expected, result);
            Assert.IsType <SByteEnum>(result);
            result = unchecked (integralVal + d);
            Assert.Equal(expected, result);
            Assert.IsType <SByteEnum>(result);
            d      = integralVal;
            result = unchecked (enumVal + d);
            Assert.Equal(expected, result);
            Assert.IsType <SByteEnum>(result);
            result = unchecked (d + enumVal);
            Assert.Equal(expected, result);
            Assert.IsType <SByteEnum>(result);
        }
        public void ProxyForRefAndOutClassWithEnumTypeParamsWhereInterceptorModifiesTheValues()
        {
            RefAndOutInterceptor interceptor = new RefAndOutInterceptor();

            RefAndOutClass proxy = (RefAndOutClass)
                                   _generator.CreateClassProxy(
                typeof(RefAndOutClass), interceptor);

            Assert.IsNotNull(proxy);

            SByteEnum value1 = SByteEnum.One;

            proxy.RefSByteEnum(ref value1);
            Assert.AreEqual(SByteEnum.One, value1);

            SByteEnum value2;

            proxy.OutSByteEnum(out value2);
            Assert.AreEqual(SByteEnum.One, value2);

            Assert.AreEqual("RefSByteEnum OutSByteEnum ", interceptor.LogContents);
        }
コード例 #9
0
 public TestAttribute(SByteEnum value)
 {
 }
コード例 #10
0
 public static float TestSByteEnum(SByteEnum a)
 {
     return((float)a);
 }
コード例 #11
0
        public Primitives(sbyte sb, byte b, short s, ushort us, int i, uint ui, long l, ulong ul,
                          SByteEnum sbe, ByteEnum be, ShortEnum se, UShortEnum use, IntEnum ie, UIntEnum uie, LongEnum le, ULongEnum ule,
                          char c, bool bo, float f, double d,
                          string str, Type t, int[] arr, object obj)
        {
            SByteConstructor = sb;
            ByteConstructor = b;
            ShortConstructor = s;
            UShortConstructor = us;
            IntConstructor = i;
            UIntConstructor = ui;
            LongConstructor = l;
            ULongConstructor = ul;

            SByteEnumConstructor = sbe;
            ByteEnumConstructor = be;
            ShortEnumConstructor = se;
            UShortEnumConstructor = use;
            IntEnumConstructor = ie;
            UIntEnumConstructor = uie;
            LongEnumConstructor = le;
            ULongEnumConstructor = ule;

            CharConstructor = c;
            BoolConstructor = bo;
            FloatConstructor = f;
            DoubleConstructor = d;

            StringConstructor = str;
            TypeConstructor = t;
            ArrayConstructor = arr;
            ObjectConstructor = obj;
        }
コード例 #12
0
		// Enum types
		public virtual void RefSByteEnum(ref SByteEnum en)
		{
			en = en == SByteEnum.One ? SByteEnum.Two : SByteEnum.One;
		}
コード例 #13
0
		public Type GetEnumRefType(ref SByteEnum refArg)
		{
			// Need this because .Net 1.1 does not have the Type.MakeByRefType method.
			ParameterInfo[] parameters = this.GetType().GetMethod("GetEnumRefType").GetParameters();
			Assert.AreEqual(1, parameters.Length);
			Type refType = parameters[0].ParameterType;
			Assert.IsTrue(refType.IsByRef);
			return refType;
		}
コード例 #14
0
 public static SByteEnum PassthroughSByteEnum(SByteEnum value)
 {
     return(value);
 }
コード例 #15
0
        Populate(
            int stringSize,
            int binarySize)
        {
            PartitionKey = typeof(AllDataExplicit).Name;
            RowKey       = Guid.NewGuid().ToString();

            // Fields + Nullable. 8 + 8 + 6 = 22
            StringField     = DataGenerator.GetStringSizeFixed(stringSize);
            StringFieldNull = null;

            BoolField        = DataGenerator.Rnd.Next(2) == 1;
            BoolFieldNull    = null;
            BoolFieldNullNot = DataGenerator.Rnd.Next(2) == 1;

            IntField        = DataGenerator.Rnd.Next(Int32.MaxValue);
            IntFieldNull    = null;
            IntFieldNullNot = DataGenerator.Rnd.Next(int.MaxValue);

            Int64Field        = (Int64)(DataGenerator.Rnd.Next(Int32.MaxValue) * DataGenerator.Rnd.Next(Int32.MaxValue));
            Int64FieldNull    = null;
            Int64FieldNullNot = (Int64)(DataGenerator.Rnd.Next(Int32.MaxValue) * DataGenerator.Rnd.Next(Int32.MaxValue));

            DoubleField        = DataGenerator.Rnd.NextDouble() * Double.MaxValue;
            DoubleFieldNull    = null;
            DoubleFieldNullNot = DataGenerator.Rnd.NextDouble() * Double.MaxValue;

            DateTimeField        = DateTime.UtcNow;
            DateTimeFieldNull    = null;
            DateTimeFieldNullNot = DateTime.UtcNow;

            GuidField        = Guid.NewGuid();
            GuidFieldNull    = null;
            GuidFieldNullNot = Guid.NewGuid();

            BinaryField     = DataGenerator.GetBytesSizeFixed(binarySize);
            BinaryFieldNull = null;

            // intrinsic morphs + Nullable. 7 * 4 = 28
            ByteFieldMin     = Byte.MinValue;
            ByteFieldMax     = Byte.MaxValue;
            ByteFieldNull    = null;
            ByteFieldNullNot = (byte)DataGenerator.Rnd.Next(byte.MaxValue);

            SByteFieldMin     = SByte.MinValue;
            SByteFieldMax     = SByte.MaxValue;
            SByteFieldNull    = null;
            SByteFieldNullNot = (sbyte)DataGenerator.Rnd.Next(sbyte.MaxValue);

            Int16FieldMin     = Int16.MinValue;
            Int16FieldMax     = Int16.MaxValue;
            Int16FieldNull    = null;
            Int16FieldNullNot = (Int16)DataGenerator.Rnd.Next(Int16.MaxValue);

            UInt16FieldMin     = UInt16.MinValue;
            UInt16FieldMax     = UInt16.MaxValue;
            UInt16FieldNull    = null;
            UInt16FieldNullNot = (UInt16)DataGenerator.Rnd.Next(UInt16.MaxValue);

            UInt32FieldMin     = UInt32.MinValue;
            UInt32FieldMax     = UInt32.MaxValue;
            UInt32FieldNull    = null;
            UInt32FieldNullNot = (UInt32)DataGenerator.Rnd.Next(UInt16.MaxValue);

            UInt64FieldMin     = UInt64.MinValue;
            UInt64FieldMax     = UInt64.MaxValue;
            UInt64FieldNull    = null;
            UInt64FieldNullNot = (UInt64)(DataGenerator.Rnd.Next(Int32.MaxValue) * DataGenerator.Rnd.Next(Int32.MaxValue));

            CharFieldMin     = Char.MinValue;
            CharFieldMax     = Char.MaxValue;
            CharFieldNull    = null;
            CharFieldNullNot = (Char)DataGenerator.Rnd.Next(Char.MaxValue);

            // Enums - 8
            ByteEnumField        = ByteEnum.Value2;
            ByteEnumFieldNull    = null;
            ByteEnumFieldNullNot = ByteEnum.Value1;

            SByteEnumField        = SByteEnum.Value2;
            SByteEnumFieldNull    = null;
            SByteEnumFieldNullNot = SByteEnum.Value1;

            Int16EnumField        = Int16Enum.Value2;
            Int16EnumFieldNull    = null;
            Int16EnumFieldNullNot = Int16Enum.Value1;

            UInt16EnumField        = UInt16Enum.Value2;
            UInt16EnumFieldNull    = null;
            UInt16EnumFieldNullNot = UInt16Enum.Value1;

            Int32EnumField        = Int32Enum.Value2;
            Int32EnumFieldNull    = null;
            Int32EnumFieldNullNot = Int32Enum.Value1;

            UInt32EnumField        = UInt32Enum.Value2;
            UInt32EnumFieldNull    = null;
            UInt32EnumFieldNullNot = UInt32Enum.Value1;

            Int64EnumField        = Int64Enum.Value2;
            Int64EnumFieldNull    = null;
            Int64EnumFieldNullNot = Int64Enum.Value1;

            UInt64EnumField        = UInt64Enum.Value2;
            UInt64EnumFieldNull    = null;
            UInt64EnumFieldNullNot = UInt64Enum.Value1;

            // Object
            // Create a derived generic object type to validate correct de-serialization
            var employeeInfo = EmployeeInfo <int> .CreateNew();

            employeeInfo.Dummy = 101;

            PersonInfo = employeeInfo;
        }
コード例 #16
0
 public virtual void OutSByteEnum(out SByteEnum en)
 {
     en = SByteEnum.Two;
 }
コード例 #17
0
 // Enum types
 public virtual void RefSByteEnum(ref SByteEnum en)
 {
     en = en == SByteEnum.One ? SByteEnum.Two : SByteEnum.One;
 }
コード例 #18
0
ファイル: DataRowTests_Enums.cs プロジェクト: kant2002/testfx
 public void DataRowEnums_SByte(SByteEnum testEnum)
 {
     Assert.IsTrue(true);
 }
コード例 #19
0
		public virtual void OutSByteEnum(out SByteEnum en)
		{
			en = SByteEnum.Two;
		}
コード例 #20
0
        void AllDataExplicitQueryOnEachDatatype()
        {
            // setup
            AllDataExplicit
                item = TypeFactory <AllDataExplicit> .CreateRandomSmall();

            StashClient <AllDataExplicit>
            client = StashConfiguration.GetClient <AllDataExplicit>();

            client.Insert(item);

            IQueryable <AllDataExplicit>
            query = client.CreateQuery();


            // queries bool
            bool
                boolField = item.BoolField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.BoolField == boolField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.BoolField == item.BoolField),
                1);

            // queries bool null

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.BoolFieldNull == boolField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.BoolFieldNull == item.BoolField),
                    0);
            }

            // queries bool null not
            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.BoolFieldNullNot == item.BoolFieldNullNot),
                1);

            // queries int
            int
                intField = item.IntField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.IntField == intField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.IntField == item.IntField),
                1);

            // queries int null

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.IntFieldNull == intField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.IntFieldNull == item.IntField),
                    0);
            }

            // queries int null not
            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.IntFieldNullNot == item.IntFieldNullNot),
                1);

            // queries int64
            Int64
                int64Field = item.Int64Field;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int64Field == int64Field),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int64Field == item.Int64Field),
                1);

            // queries int64 null

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.Int64FieldNull == int64Field),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.Int64FieldNull == item.Int64Field),
                    0);
            }

            // queries int64 null not
            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int64FieldNullNot == item.Int64FieldNullNot),
                1);

            // queries double
            double
                doubleField = item.DoubleField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.DoubleField == doubleField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.DoubleField == item.DoubleField),
                1);

            // queries double null

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.DoubleFieldNull == doubleField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.DoubleFieldNull == item.DoubleField),
                    0);
            }

            // queries double null not
            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.DoubleFieldNullNot == item.DoubleFieldNullNot),
                1);

            // queries DateTime
            DateTime
                dateTimeField = item.DateTimeField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.DateTimeField == dateTimeField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.DateTimeField == item.DateTimeField),
                1);

            // queries DateTime null

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.DateTimeField == dateTimeField),
                    1);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.DateTimeField == item.DateTimeField),
                    1);
            }

            // queries DateTime null not
            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.DateTimeFieldNullNot == item.DateTimeFieldNullNot),
                1);

            // queries Guid
            Guid
                guidField = item.GuidField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.GuidField == guidField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.GuidField == item.GuidField),
                1);

            // queries Guid null

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.GuidFieldNull == guidField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.GuidFieldNull == item.GuidField),
                    0);
            }

            // queries Guid null not
            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.GuidFieldNullNot == item.GuidFieldNullNot),
                1);

            // queries string
            string
                stringField = item.StringField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.StringField == stringField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.StringField == item.StringField),
                1);

            // queries string null

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.StringFieldNull == stringField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.StringFieldNull == item.StringField),
                    0);
            }

            // ---------------------------------------------------------------------------------------------------------
            // Implicit Morph

            // byte
            byte
                byteFieldMin = item.ByteFieldMin;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.ByteFieldMin == byteFieldMin),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.ByteFieldMin == item.ByteFieldMin),
                1);

            byte
                byteFieldMax = item.ByteFieldMax;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.ByteFieldMax == byteFieldMax),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.ByteFieldMax == item.ByteFieldMax),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.ByteFieldNull == item.ByteFieldMax),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.ByteFieldNullNot == item.ByteFieldNullNot),
                1);

            // sbyte
            sbyte
                sbyteFieldMin = item.SByteFieldMin;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.SByteFieldMin == sbyteFieldMin),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.SByteFieldMin == item.SByteFieldMin),
                1);

            sbyte
                sbyteFieldMax = item.SByteFieldMax;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.SByteFieldMax == sbyteFieldMax),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.SByteFieldMax == item.SByteFieldMax),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.SByteFieldNull == item.ByteFieldMax),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.SByteFieldNullNot == item.SByteFieldNullNot),
                1);

            // int16
            Int16
                int16FieldMin = item.Int16FieldMin;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int16FieldMin == int16FieldMin),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int16FieldMin == item.Int16FieldMin),
                1);

            Int16
                int16FieldMax = item.Int16FieldMax;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int16FieldMax == int16FieldMax),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int16FieldMax == item.Int16FieldMax),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.Int16FieldNull == item.Int16FieldMax),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int16FieldNullNot == item.Int16FieldNullNot),
                1);

            // uint16
            UInt16
                uint16FieldMin = item.UInt16FieldMin;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt16FieldMin == uint16FieldMin),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt16FieldMin == item.UInt16FieldMin),
                1);

            UInt16
                uint16FieldMax = item.UInt16FieldMax;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt16FieldMax == uint16FieldMax),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt16FieldMax == item.UInt16FieldMax),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.UInt16FieldNull == item.UInt16FieldMax),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt16FieldNullNot == item.UInt16FieldNullNot),
                1);

            // uint32
            UInt32
                uint32FieldMin = item.UInt32FieldMin;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt32FieldMin == uint32FieldMin),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt32FieldMin == item.UInt32FieldMin),
                1);

            UInt32
                uint32FieldMax = item.UInt32FieldMax;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt32FieldMax == uint32FieldMax),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt32FieldMax == item.UInt32FieldMax),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.UInt32FieldNull == item.UInt32FieldMax),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt32FieldNullNot == item.UInt32FieldNullNot),
                1);

            // uint64
            UInt64
                uint64FieldMin = item.UInt64FieldMin;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt64FieldMin == uint64FieldMin),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt64FieldMin == item.UInt64FieldMin),
                1);

            UInt64
                uint64FieldMax = item.UInt64FieldMax;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt64FieldMax == uint64FieldMax),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt64FieldMax == item.UInt64FieldMax),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.UInt64FieldNull == item.UInt64FieldMax),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt64FieldNullNot == item.UInt64FieldNullNot),
                1);

            // char
            char
                charFieldMin = item.CharFieldMin;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.CharFieldMin == charFieldMin),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.CharFieldMin == item.CharFieldMin),
                1);

            char
                charFieldMax = item.CharFieldMax;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.CharFieldMax == charFieldMax),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.CharFieldMax == item.CharFieldMax),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.CharFieldNull == item.CharFieldMax),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.CharFieldNullNot == item.CharFieldNullNot),
                1);

            // Enum byte
            ByteEnum
                byteEnumField = item.ByteEnumField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.ByteEnumField == byteEnumField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.ByteEnumField == item.ByteEnumField),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.ByteEnumFieldNull == byteEnumField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.ByteEnumFieldNull == item.ByteEnumField),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.ByteEnumFieldNullNot == item.ByteEnumFieldNullNot),
                1);

            // Enum SByte
            SByteEnum
                sbyteEnumField = item.SByteEnumField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.SByteEnumField == sbyteEnumField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.SByteEnumField == item.SByteEnumField),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.SByteEnumFieldNull == sbyteEnumField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.SByteEnumFieldNull == item.SByteEnumField),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.SByteEnumFieldNullNot == item.SByteEnumFieldNullNot),
                1);

            // Enum Int16
            Int16Enum
                int16EnumField = item.Int16EnumField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int16EnumField == int16EnumField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int16EnumField == item.Int16EnumField),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.Int16EnumFieldNull == int16EnumField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.Int16EnumFieldNull == item.Int16EnumField),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int16EnumFieldNullNot == item.Int16EnumFieldNullNot),
                1);

            // Enum UInt16
            UInt16Enum
                uint16EnumField = item.UInt16EnumField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt16EnumField == uint16EnumField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt16EnumField == item.UInt16EnumField),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.UInt16EnumFieldNull == uint16EnumField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.UInt16EnumFieldNull == item.UInt16EnumField),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt16EnumFieldNullNot == item.UInt16EnumFieldNullNot),
                1);

            // Enum Int32
            Int32Enum
                int32EnumField = item.Int32EnumField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int32EnumField == int32EnumField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int32EnumField == item.Int32EnumField),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.Int32EnumFieldNull == int32EnumField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.Int32EnumFieldNull == item.Int32EnumField),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int32EnumFieldNullNot == item.Int32EnumFieldNullNot),
                1);

            // Enum UInt32
            UInt32Enum
                uint32EnumField = item.UInt32EnumField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt32EnumField == uint32EnumField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt32EnumField == item.UInt32EnumField),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.UInt32EnumFieldNull == uint32EnumField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.UInt32EnumFieldNull == item.UInt32EnumField),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt32EnumFieldNullNot == item.UInt32EnumFieldNullNot),
                1);

            // Enum Int64
            Int64Enum
                int64EnumField = item.Int64EnumField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int64EnumField == int64EnumField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int64EnumField == item.Int64EnumField),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.Int64EnumFieldNull == int64EnumField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.Int64EnumFieldNull == item.Int64EnumField),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.Int64EnumFieldNullNot == item.Int64EnumFieldNullNot),
                1);

            // Enum UInt64
            UInt64Enum
                uint64EnumField = item.UInt64EnumField;

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt64EnumField == uint64EnumField),
                1);

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt64EnumField == item.UInt64EnumField),
                1);

            // Query against a property not in the row not supported by development storage so will fail
            // http://msdn.microsoft.com/en-us/library/windowsazure/gg433135.aspx
            if (StashConfiguration.IsConfigurationCloud)
            {
                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.UInt64EnumFieldNull == uint64EnumField),
                    0);

                QueryOnEachDatatype(
                    query.Where(t => t.RowKey == item.RowKey && t.UInt64EnumFieldNull == item.UInt64EnumField),
                    0);
            }

            QueryOnEachDatatype(
                query.Where(t => t.RowKey == item.RowKey && t.UInt64EnumFieldNullNot == item.UInt64EnumFieldNullNot),
                1);

            // cleanup
            client.Delete(item);
        }