Пример #1
0
        public void SerializeDeserializeIntegerUInt64EnumUtf16(UInt64Enum input)
        {
            var serialized   = JsonSerializer.Generic.Utf16.Serialize <UInt64Enum, ExcludeNullCamelCaseIntegerEnumResolver <char> >(input);
            var deserialized = JsonSerializer.Generic.Utf16.Deserialize <UInt64Enum, ExcludeNullCamelCaseIntegerEnumResolver <char> >(serialized);

            Assert.Equal(input, deserialized);
        }
Пример #2
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);
     }
 }
Пример #3
0
        public void SerializeDeserializeUInt64EnumUtf16(UInt64Enum input)
        {
            var serialized   = JsonSerializer.Generic.Utf16.Serialize(input);
            var deserialized = JsonSerializer.Generic.Utf16.Deserialize <UInt64Enum>(serialized);

            Assert.Equal(input, deserialized);
        }
 public void PopulateWithInvalidPositiveValues()
 {
     SByteValue  = (SByteEnum)123;
     ByteValue   = (ByteEnum)123;
     Int16Value  = (Int16Enum)123;
     UInt16Value = (UInt16Enum)123;
     Int32Value  = (Int32Enum)123;
     UInt32Value = (UInt32Enum)123;
     Int64Value  = (Int64Enum)123;
     UInt64Value = (UInt64Enum)123;
 }
 public void PopulateWithValidValues()
 {
     SByteValue  = SByteEnum.B | SByteEnum.C;
     ByteValue   = ByteEnum.B | ByteEnum.C;
     Int16Value  = Int16Enum.B | Int16Enum.C;
     UInt16Value = UInt16Enum.B | UInt16Enum.C;
     Int32Value  = Int32Enum.B | Int32Enum.C;
     UInt32Value = UInt32Enum.B | UInt32Enum.C;
     Int64Value  = Int64Enum.B | Int64Enum.C;
     UInt64Value = UInt64Enum.B | UInt64Enum.C;
 }
Пример #6
0
        public void LiftedEnumAddition(UInt64Enum?enumVal, ulong?integralVal, UInt64Enum expected)
        {
            dynamic d      = enumVal;
            object  result = unchecked (d + integralVal);

            Assert.Equal(expected, result);
            Assert.IsType <UInt64Enum>(result);
            result = unchecked (integralVal + d);
            Assert.Equal(expected, result);
            Assert.IsType <UInt64Enum>(result);
            d      = integralVal;
            result = unchecked (enumVal + d);
            Assert.Equal(expected, result);
            Assert.IsType <UInt64Enum>(result);
            result = unchecked (d + enumVal);
            Assert.Equal(expected, result);
            Assert.IsType <UInt64Enum>(result);
        }
Пример #7
0
 public AllSupported(Int32 arraySize, SessionBase session)
 {
     _uint64EnumArray = new UInt64Enum[arraySize];
     if (arraySize > 1)
     {
         _uint64EnumArray[1] = UInt64Enum.dd;
     }
     enum16list         = new List <Int16Enum>(arraySize);
     aSnake             = new PersistenceByInterfaceSnake("Curly", 1, true, 58);
     jaggedArray[0]     = new int[] { 1, 3, 5, 7, 9 };
     jaggedArray[1]     = new int[] { 0, 2, 4, 6 };
     jaggedArray[2]     = new int[] { 11, 22 };
     m_nullabledateTime = null;
     m_nullableByte     = null;
     m_enumByte         = ByteEnum.b;
     m_enumInt16        = Int16Enum.c;
     m_enumInt32        = Int32Enum.f;
     m_enumInt64        = Int64Enum.ff;
     m_enumUInt64       = UInt64Enum.ff;
     ListEnumUInt64     = new List <UInt64Enum>();
     ListEnumUInt64.Add(m_enumUInt64);
     ListEnumUInt64Nullable = new List <UInt64Enum?>();
     ListEnumUInt64Nullable.Add(null);
     ListEnumUInt64Nullable.Add(m_enumUInt64);
     m_objectArray          = new object[arraySize];
     m_objectInterfaceArray = new ISomeStuff[arraySize];
     byteArray             = new byte[arraySize];
     charArray             = new char[arraySize];
     m_weakRefArray        = new WeakIOptimizedPersistableReference <IOptimizedPersistable> [arraySize];
     uint16Array           = new UInt16[arraySize];
     uint32Array           = new UInt32[arraySize];
     uint64Array           = new UInt64[arraySize];
     int16Array            = new Int16[arraySize];
     int32Array            = new Int32[arraySize];
     int64Array            = new Int64[arraySize];
     floatArray            = new float[arraySize];
     doubleArray           = new double[arraySize];
     dateTimeArray         = new DateTime[arraySize];
     oidArray              = new Oid[arraySize];
     nullablebyteArray     = new byte?[arraySize];
     nullablecharArray     = new char?[arraySize];
     nullableuint16Array   = new UInt16?[arraySize];
     nullableuint32Array   = new UInt32?[arraySize];
     nullableuint64Array   = new UInt64?[arraySize];
     nullableint16Array    = new Int16?[arraySize];
     nullableint32Array    = new Int32?[arraySize];
     nullableint64Array    = new Int64?[arraySize];
     nullablefloatArray    = new float?[arraySize];
     nullabledoubleArray   = new double?[arraySize];
     nullableDateTimeArray = new DateTime?[arraySize];
     nullableDecimalArray  = new Decimal?[arraySize];
     nullableGuidArray     = new Guid?[arraySize];
     nullableOidArray      = new Oid?[arraySize];
     listByte              = new List <byte>(arraySize); // just samples of what Key can be
     personList            = new List <Person>(arraySize);
     m_petListOidShort     = new List <Pet>(arraySize);
     petListLongOid        = new List <Pet>(arraySize);
     petList2              = new ArrayList(arraySize);
     int32List             = new List <Int32>(arraySize);
     uint32List            = new List <UInt32>(arraySize);
     uint64List            = new List <ulong>(arraySize);
     oidList         = new List <Oid>(arraySize);
     nullableoidList = new List <Oid?>(arraySize);
     personHashSet   = new VelocityDbHashSet <Person>();
     person          = new Person();
     personHashSet.Add(person);
     //session.Persist(personHashSet);
     session.Persist(person);
     _weakRefToPerson    = new WeakReferencedConnection <Person>(person);
     timeSpan            = new TimeSpan(1, 0, 0);
     personArrayOidShort = new Person[arraySize];
     if (arraySize > 1)
     {
         personArrayOidShort[1] = new Person();
     }
     personArrayOidShort[0] = null;
     personListShort        = new List <Person>(arraySize);
     personListShort.Add(null);
     personListShort.Add(null);
     personListShort.Add(new Person());
     aPet = new Cat("Boze", 5);
     m_petListOidShort.Add(aPet);
     m_petListOidShort.Add(null);
     aPet = new Cat("Fendy", 4); // create a new cat so that first cat is created within same database as owner (OidShort)
     petListLongOid.Add(aPet);
     petList2.Add(aPet);
     uint32List.Add(5555);
     int32List.Add(-66666);
     uint64List.Add(8989898988989);
     doubleArray[0] = 0.2323232323232;
     aSlot          = new Slot();
     aSlot.value    = new Person();
     m_slots        = new Slot[5];
     enum16list.Add(m_enumInt16);
     nullableoidList.Add(new Oid((ulong)4444));
     nullableoidList.Add(null);
     nullableoidList.Add(new Oid((ulong)8888));
     if (arraySize > 0)
     {
         oidArray[0]           = new Oid((ulong)99999);
         nullableOidArray[0]   = new Oid((ulong)99999);
         nullableint32Array[0] = 5;
     }
     if (arraySize > 2)
     {
         m_objectArray[1]          = this;
         m_objectInterfaceArray[2] = this;
         oidArray[2]           = new Oid((ulong)66666);
         nullableOidArray[2]   = new Oid((ulong)66666);
         nullableint32Array[2] = 6;
     }
     for (int i = 0; i < 5; i++)
     {
         m_slots[i].hashCode = i;
         m_slots[i].value    = new Person();
         m_slots[i].next     = i + 1;
     }
 }
Пример #8
0
 public TestAttribute(UInt64Enum value)
 {
 }
 public void PopulateWithValidValues()
 {
     SByteValue = SByteEnum.B | SByteEnum.C;
     ByteValue = ByteEnum.B | ByteEnum.C;
     Int16Value = Int16Enum.B | Int16Enum.C;
     UInt16Value = UInt16Enum.B | UInt16Enum.C;
     Int32Value = Int32Enum.B | Int32Enum.C;
     UInt32Value = UInt32Enum.B | UInt32Enum.C;
     Int64Value = Int64Enum.B | Int64Enum.C;
     UInt64Value = UInt64Enum.B | UInt64Enum.C;
 }
 public void PopulateWithInvalidPositiveValues()
 {
     SByteValue = (SByteEnum)123;
     ByteValue = (ByteEnum)123;
     Int16Value = (Int16Enum)123;
     UInt16Value = (UInt16Enum)123;
     Int32Value = (Int32Enum)123;
     UInt32Value = (UInt32Enum)123;
     Int64Value = (Int64Enum)123;
     UInt64Value = (UInt64Enum)123;
 }
Пример #11
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;
        }
Пример #12
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);
        }