コード例 #1
0
        internal override void Instantiate1(ObjectReferenceContext context)
        {
            int                 dbID      = context.ReadInt();
            Transaction         trans     = context.Transaction();
            ObjectContainerBase container = trans.Container();

            container.ShowInternalClasses(true);
            try
            {
                Db4oDatabase db = (Db4oDatabase)container.GetByID2(trans, dbID);
                if (db != null && db.i_signature == null)
                {
                    container.Activate(trans, db, new FixedActivationDepth(2));
                }
                VirtualAttributes va = context.ObjectReference().VirtualAttributes();
                va.i_database = db;
                va.i_uuid     = context.ReadLong();
            }
            finally
            {
                container.ShowInternalClasses(false);
            }
        }
コード例 #2
0
 internal override void Instantiate1(ObjectReferenceContext context)
 {
     context.ObjectReference().VirtualAttributes().i_version = context.ReadLong();
 }