public static void TestHasFlagInvalid() { Int32Enum e = (Int32Enum)0x3f06; Assert.Throws <ArgumentNullException>("flag", () => e.HasFlag(null)); // Flag is null Assert.Throws <ArgumentException>(null, () => e.HasFlag((SimpleEnum)0x2)); // Different enum type }
public static void HasFlag_Invalid() { Int32Enum e = (Int32Enum)0x3f06; Assert.Throws <ArgumentNullException>("flag", () => e.HasFlag(null)); // Flag is null Assert.Throws <ArgumentException>(null, () => e.HasFlag((SimpleEnum)0x3000)); // Enum is not the same type as the instance }
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 SerializeDeserializeIntegerInt32EnumUtf16(Int32Enum input) { var serialized = JsonSerializer.Generic.Utf16.Serialize <Int32Enum, ExcludeNullCamelCaseIntegerEnumResolver <char> >(input); var deserialized = JsonSerializer.Generic.Utf16.Deserialize <Int32Enum, ExcludeNullCamelCaseIntegerEnumResolver <char> >(serialized); Assert.Equal(input, deserialized); }
public void TestRoundtripInt32Enum([ValueSource(nameof(Int32EnumValues))] Int32Enum value) { Roundtrip(value).Should().Be(value); Roundtrip(new GenericType <Int32Enum> { Value = value }).Value.Should().Be(value); }
public void Test([Values(Int32Enum.A, Int32Enum.B, Int32Enum.C)] Int32Enum enumValue) { var tm = ProtoBuf.Meta.TypeModel.Create(); var objectType = tm.Add(typeof(object), false); tm.Add(typeof(SomeClass), true); var someEnumType = tm.Add(typeof(Int32Enum), false); someEnumType.Add(0, "A"); someEnumType.Add(1, "B"); someEnumType.Add(2, "C"); tm.Add(typeof(ClassWithObject), true); //objectType.AddSubType(300, typeof(SomeClass)); //objectType.AddSubType(200, typeof(SomeEnum)); var stream = new MemoryStream(); //tm.Serialize(stream, new ClassWithObject{Value = enumValue}); tm.Serialize(stream, enumValue); stream.Position = 0; var actualValue = tm.Deserialize(stream, null, typeof(Int32Enum)); actualValue.Should().Be(enumValue); //var actualValue = tm.Deserialize(stream, null, typeof(ClassWithObject)); //actualValue.Should().NotBeNull(); //actualValue.Should().BeOfType<ClassWithObject>(); //((ClassWithObject) actualValue).Value.Should().Be(enumValue); }
public void SerializeDeserializeInt32EnumUtf16(Int32Enum input) { var serialized = JsonSerializer.Generic.Utf16.Serialize(input); var deserialized = JsonSerializer.Generic.Utf16.Deserialize <Int32Enum>(serialized); Assert.Equal(input, deserialized); }
public static void TestHasFlag(Enum flag, bool expected) { Int32Enum e = (Int32Enum)0x3f06; bool b = e.HasFlag(flag); Assert.Equal(expected, b); }
public void TestRoundtripTypeWithEnum([ValueSource(nameof(Int32EnumValues))] Int32Enum value) { var obj = new TypeWithEnum { Value = value }; var actualObj = Roundtrip(obj); actualObj.Should().NotBeNull(); actualObj.Value.Should().Be(value); }
public void LiftedEnumAddition(Int32Enum?enumVal, int?integralVal, Int32Enum expected) { dynamic d = enumVal; object result = unchecked (d + integralVal); Assert.Equal(expected, result); Assert.IsType <Int32Enum>(result); result = unchecked (integralVal + d); Assert.Equal(expected, result); Assert.IsType <Int32Enum>(result); d = integralVal; result = unchecked (enumVal + d); Assert.Equal(expected, result); Assert.IsType <Int32Enum>(result); result = unchecked (d + enumVal); Assert.Equal(expected, result); Assert.IsType <Int32Enum>(result); }
public TestAttribute(Int32Enum value) { }
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; }
public AllSupported(Int32 arraySize) { 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 }; nullabledateTime = null; m_nullableByte = null; m_enumByte = ByteEnum.b; m_enumInt16 = Int16Enum.c; m_enumInt32 = Int32Enum.f; m_enumInt64 = Int64Enum.ff; byteArray = new byte[arraySize]; charArray = new char[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); 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(); 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); petListOidShort.Add(aPet); petListOidShort.Add(null); 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) { 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; } }
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; } }
public AllSupported(Int32 arraySize) { 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 }; nullabledateTime = null; m_nullableByte = null; m_enumByte = ByteEnum.b; m_enumInt16 = Int16Enum.c; m_enumInt32 = Int32Enum.f; m_enumInt64 = Int64Enum.ff; byteArray = new byte[arraySize]; charArray = new char[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); 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(); 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); petListOidShort.Add(aPet); petListOidShort.Add(null); 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) { 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; } }
public override void Execute() { var formatProvider = CultureInfo.CurrentCulture; var maxIterations = this.MaxIterations; var stringIntArray = new string[maxIterations]; var stringDecimalArray = new string[maxIterations]; var stringGuidArray = new string[maxIterations]; var stringDateTimeArray = new string[maxIterations]; var guidArray = new Guid[maxIterations]; var intArray = new int[maxIterations]; var decimalArray = new decimal[maxIterations]; var doubleArray = new double[maxIterations]; var dateTimeArray = new DateTime[maxIterations]; var customerArray = new Customer[maxIterations]; var customerDtoArray = new CustomerDto[maxIterations]; var personArray = new Person[maxIterations]; var personStringArray = new PersonStringDto[maxIterations]; var addressArray = new Address[maxIterations]; var benchSourceArray = new BenchSource[maxIterations]; var displayResourceEnumArray = new DisplayAttributeResourceEnum[maxIterations]; var displayResxEnumArray = new DisplayAttributeResxEnum[maxIterations]; var displayEnumArray = new DisplayAttributeEnum[maxIterations]; var descriptionEnumArray = new DescriptionAttributeEnum[maxIterations]; var int32EnumArray = new Int32Enum[maxIterations]; var benchSource = new BenchSource(); for (int i = 0; i < maxIterations; i++) { stringIntArray[i] = i.ToString(formatProvider); stringDecimalArray[i] = (i * 0.9m).ToString(formatProvider); stringGuidArray[i] = Guid.NewGuid().ToString(); intArray[i] = i; decimalArray[i] = i * 0.9m; doubleArray[i] = i * 0.9d; guidArray[i] = Guid.NewGuid(); stringDateTimeArray[i] = DateTime.Now.ToString(formatProvider); dateTimeArray[i] = DateTime.Now; personArray[i] = new Person { Id = Guid.NewGuid(), Name = "Test Name " + i, Age = i % 85, Length = 1.70m + ((i % 20) / 100m), BirthDate = DateTime.Now.AddDays(i) }; personStringArray[i] = new PersonStringDto { Id = Guid.NewGuid().ToString(), Name = "Test Name " + i, Age = (i % 85).ToString(CultureInfo.CurrentCulture), Length = (1.70m + ((i % 20) / 100m)).ToString(CultureInfo.CurrentCulture), BirthDate = DateTime.Now.AddDays(i).ToString(CultureInfo.CurrentCulture) }; customerArray[i] = CustomerFactory.CreateTestCustomer(); customerDtoArray[i] = TypeAdapter.Adapt <CustomerDto>(customerArray[i]); addressArray[i] = new Address { Id = i, City = "Gbg", Country = "Sweden", Street = "Street 1" }; benchSourceArray[i] = benchSource; displayResourceEnumArray[i] = (DisplayAttributeResourceEnum)(i % 4); displayResxEnumArray[i] = (DisplayAttributeResxEnum)(i % 4); displayEnumArray[i] = (DisplayAttributeEnum)(i % 4); descriptionEnumArray[i] = (DescriptionAttributeEnum)(i % 4); int32EnumArray[i] = (Int32Enum)(i % 4); } // FromString conversions //this.ProfileConvert<string, Guid>(stringGuidArray, formatProvider, i => new Guid(stringGuidArray[i])); this.ProfileConvert <string, int>(stringIntArray, formatProvider, i => int.Parse(stringIntArray[i], formatProvider)); //this.ProfileConvert<string, string>(stringIntArray, formatProvider, i => stringIntArray[i].Clone()); //this.ProfileConvert<string, DateTime>(stringDateTimeArray, formatProvider, i => Convert.ToDateTime(stringDateTimeArray[i])); //this.ProfileConvert<string, decimal>(stringDecimalArray, formatProvider, i => StringParser.TryParseDecimal(stringDecimalArray[i], formatProvider)); //this.ProfileConvert<int, ExampleEnum>(intArray, formatProvider, null); //this.ProfileConvert<double, decimal>(doubleArray, formatProvider, i => Convert.ToDecimal(doubleArray[i])); //this.ProfileConvert<decimal, double>(decimalArray, formatProvider, i => Convert.ToDouble(decimalArray[i])); //this.ProfileConvert<int, string>(intArray, formatProvider, i => intArray[i].ToString(formatProvider)); /*this.ProfileConvert<int, int>(intArray, formatProvider, i => Convert.ChangeType(i, typeof(int))); * * this.ProfileConvert<decimal, string>(decimalArray, formatProvider, i => decimalArray[i].ToString(formatProvider)); * * this.ProfileConvert<Guid, string>(guidArray, CultureInfo.CurrentCulture, i => guidArray[i].ToString()); * * this.ProfileConvert<DateTime, string>(dateTimeArray, CultureInfo.CurrentCulture, i => dateTimeArray[i].ToString()); */ //this.ProfileConvert<PersonStringDto, Person>(personStringArray, CultureInfo.CurrentCulture, null); //this.ProfileConvert<Customer, CustomerDto>(customerArray, CultureInfo.CurrentCulture, null); //this.ProfileConvert<CustomerDto, Customer>(customerDtoArray, CultureInfo.CurrentCulture, null); //this.ProfileConvert<BenchSource, BenchDestination>(benchSourceArray, CultureInfo.CurrentCulture, null); //this.ProfileConvert<Address, AddressDto>(addressArray, CultureInfo.CurrentCulture, null); //this.ProfileConvert<Person, PersonStringDto>(personArray, CultureInfo.CurrentCulture, null); //this.ProfileConvert<Person, PersonDto>(personArray, CultureInfo.CurrentCulture, null); //this.ProfileConvert<Person, PersonStruct>(personArray, CultureInfo.CurrentCulture, null); //this.ProfileConvert<int, decimal>(intArray, formatProvider, i => Convert.ToDecimal(intArray[i], formatProvider)); /* * this.ProfileConvert<DisplayAttributeResourceEnum, string>(displayResourceEnumArray, CultureInfo.CurrentCulture, null); * this.ProfileConvert<DisplayAttributeResxEnum, string>(displayResxEnumArray, CultureInfo.CurrentCulture, null); * this.ProfileConvert<DisplayAttributeEnum, string>(displayEnumArray, CultureInfo.CurrentCulture, null); * this.ProfileConvert<DescriptionAttributeEnum, string>(descriptionEnumArray, CultureInfo.CurrentCulture, null); * this.ProfileConvert<Int32Enum, string>(int32EnumArray, CultureInfo.CurrentCulture, null); */ }
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); }