Inheritance: Pet, IOptimizedPersistable
コード例 #1
0
 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;
     }
 }
コード例 #2
0
ファイル: AllSupported.cs プロジェクト: springmin/VelocityDB
 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;
     }
 }
コード例 #3
0
 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;
   }
 }