コード例 #1
0
ファイル: TranslatedAspect.cs プロジェクト: danfma/db4o-net
        public override void Activate(UnmarshallingContext context)
        {
            object obj = Read(context);

            // Activation of members is necessary on purpose here.
            // Classes like Hashtable need fully activated members
            // to be able to calculate hashCode()
            if (obj != null)
            {
                context.Container().Activate(context.Transaction(), obj, context.ActivationDepth(
                                                 ));
            }
            SetOn(context.Transaction(), context.PersistentObject(), obj);
        }
コード例 #2
0
        public override void Activate(UnmarshallingContext context)
        {
            if (!CheckAlive(context, context))
            {
                return;
            }
            if (!ShouldStoreField())
            {
                IncrementOffset(context, context);
                return;
            }
            object toSet = Read(context);

            InformAboutTransaction(toSet, context.Transaction());
            Set(context.PersistentObject(), toSet);
        }