コード例 #1
0
 public void InitChildrenIfNecessary()
 {
     if (childrenWeakReference == null)
     {
         var childrenList = new VelocityDbList <DataBaseFileEntry>();
         childrenList.Persist(Session, this);
         childrenWeakReference = new WeakIOptimizedPersistableReference <VelocityDbList <DataBaseFileEntry> >(childrenList);
         Update();
     }
 }
コード例 #2
0
ファイル: Motorcycle.cs プロジェクト: VelocityDB/VelocityDB
 public void InitChildrenIfNecessary()
 {
   if (childrenWeakReference == null)
   {
     var childrenList = new VelocityDbList<DataBaseFileEntry>();
     childrenList.Persist(Session, this);
     childrenWeakReference = new WeakIOptimizedPersistableReference<VelocityDbList<DataBaseFileEntry>>(childrenList);
     Update();
   }
 }
コード例 #3
0
ファイル: Person.cs プロジェクト: VelocityDB/VelocityDB
 public Person(Person person = null) // creates a random Person object
 {
   int r = randGen.Next(99999);
   firstName = r.ToString();
   r = randGen.Next(99999999);
   lastName = r.ToString();
   VelocityDbList<Person> personList = new VelocityDbList<Person>();
   if (person != null && person.IsPersistent)
   {
     personList.Persist(person.Session, person);
     personList.Add(person);
     friendsRef = new WeakIOptimizedPersistableReference<VelocityDbList<Person>>(personList);
   }
 }
コード例 #4
0
ファイル: Person.cs プロジェクト: timotrob/VelocityDB
        public Person(Person person = null) // creates a random Person object
        {
            int r = randGen.Next(99999);

            firstName = r.ToString();
            r         = randGen.Next(99999999);
            lastName  = r.ToString();
            VelocityDbList <Person> personList = new VelocityDbList <Person>();

            if (person != null && person.IsPersistent)
            {
                personList.Persist(person.Session, person);
                personList.Add(person);
                friendsRef = new WeakIOptimizedPersistableReference <VelocityDbList <Person> >(personList);
            }
        }