Esempio n. 1
0
 protected override void AssertArrays(IExtObjectContainer objectContainer, object
                                      obj)
 {
     LongHandlerUpdateTestCase.ItemArrays itemArrays = (LongHandlerUpdateTestCase.ItemArrays
                                                        )obj;
     AssertPrimitiveArray(itemArrays._typedPrimitiveArray);
     if (Db4oHeaderVersion() == VersionServices.Header3040)
     {
         // Bug in the oldest format: It accidentally long[] arrays to Long[] arrays.
         AssertWrapperArray((long[])itemArrays._primitiveArrayInObject);
     }
     else
     {
         AssertPrimitiveArray((long[])itemArrays._primitiveArrayInObject);
     }
     AssertWrapperArray(itemArrays._typedWrapperArray);
     AssertWrapperArray((long[])itemArrays._wrapperArrayInObject);
 }
Esempio n. 2
0
 protected override object CreateArrays()
 {
     LongHandlerUpdateTestCase.ItemArrays itemArrays = new LongHandlerUpdateTestCase.ItemArrays
                                                           ();
     itemArrays._typedPrimitiveArray = new long[data.Length];
     System.Array.Copy(data, 0, itemArrays._typedPrimitiveArray, 0, data.Length);
     long[] dataWrapper = new long[data.Length];
     for (int i = 0; i < data.Length; i++)
     {
         dataWrapper[i] = data[i];
     }
     itemArrays._typedWrapperArray = new long[data.Length + 1];
     System.Array.Copy(dataWrapper, 0, itemArrays._typedWrapperArray, 0, dataWrapper.Length
                       );
     long[] primitiveArray = new long[data.Length];
     System.Array.Copy(data, 0, primitiveArray, 0, data.Length);
     itemArrays._primitiveArrayInObject = primitiveArray;
     long[] wrapperArray = new long[data.Length + 1];
     System.Array.Copy(dataWrapper, 0, wrapperArray, 0, dataWrapper.Length);
     itemArrays._wrapperArrayInObject = wrapperArray;
     return(itemArrays);
 }
		protected override object CreateArrays()
		{
			LongHandlerUpdateTestCase.ItemArrays itemArrays = new LongHandlerUpdateTestCase.ItemArrays
				();
			itemArrays._typedPrimitiveArray = new long[data.Length];
			System.Array.Copy(data, 0, itemArrays._typedPrimitiveArray, 0, data.Length);
			long[] dataWrapper = new long[data.Length];
			for (int i = 0; i < data.Length; i++)
			{
				dataWrapper[i] = data[i];
			}
			itemArrays._typedWrapperArray = new long[data.Length + 1];
			System.Array.Copy(dataWrapper, 0, itemArrays._typedWrapperArray, 0, dataWrapper.Length
				);
			long[] primitiveArray = new long[data.Length];
			System.Array.Copy(data, 0, primitiveArray, 0, data.Length);
			itemArrays._primitiveArrayInObject = primitiveArray;
			long[] wrapperArray = new long[data.Length + 1];
			System.Array.Copy(dataWrapper, 0, wrapperArray, 0, dataWrapper.Length);
			itemArrays._wrapperArrayInObject = wrapperArray;
			return itemArrays;
		}