Ejemplo n.º 1
0
		public object Construct(ObjectReferenceContext context)
		{
			ContextState contextState = context.SaveState();
			bool fieldHasValue = ContainingClass().SeekToField(context, this);
			try
			{
				return ((IObjectConstructor)_translator).OnInstantiate(context.Container(), fieldHasValue
					 ? Read(context) : null);
			}
			finally
			{
				context.RestoreState(contextState);
			}
		}
Ejemplo n.º 2
0
 public virtual void ReadVirtualAttributes(ObjectReferenceContext context)
 {
     ITraverseAspectCommand command = new _MarshallingInfoTraverseAspectCommand_398(context
         , EnsureFieldList(context));
     TraverseAllAspects(context, command);
 }
Ejemplo n.º 3
0
 public _MarshallingInfoTraverseAspectCommand_398(ObjectReferenceContext context,
     IMarshallingInfo baseArg1) : base(baseArg1)
 {
     this.context = context;
 }
Ejemplo n.º 4
0
		internal abstract void Instantiate1(ObjectReferenceContext context);
Ejemplo n.º 5
0
		public virtual void ReadVirtualAttribute(ObjectReferenceContext context)
		{
			if (!context.Transaction().SupportsVirtualFields())
			{
				IncrementOffset(context, context);
				return;
			}
			Instantiate1(context);
		}
Ejemplo n.º 6
0
 public virtual void ReadVirtualAttributes(Transaction trans, ObjectReference @ref
     , bool lastCommitted)
 {
     var id = @ref.GetID();
     var container = trans.Container();
     var buffer = container.ReadBufferById(trans, id, lastCommitted);
     var oh = new ObjectHeader(this, buffer);
     var context = new ObjectReferenceContext(trans, buffer, oh, @ref
         );
     Handlers4.FieldAwareTypeHandler(CorrectHandlerVersion(context)).ReadVirtualAttributes
         (context);
 }
Ejemplo n.º 7
0
		internal override void Instantiate1(ObjectReferenceContext context)
		{
			context.ObjectReference().VirtualAttributes().i_version = context.ReadLong();
		}
Ejemplo n.º 8
0
 public virtual void ReadVirtualAttributes(ObjectReferenceContext context)
 {
 }
		internal override void Instantiate1(ObjectReferenceContext context)
		{
		}
Ejemplo n.º 10
0
 internal override void Instantiate1(ObjectReferenceContext context)
 {
     var dbID = context.ReadInt();
     var trans = context.Transaction();
     var container = trans.Container();
     container.ShowInternalClasses(true);
     try
     {
         var db = (Db4oDatabase) container.GetByID2(trans, dbID);
         if (db != null && db.i_signature == null)
         {
             container.Activate(trans, db, new FixedActivationDepth(2));
         }
         var va = context.ObjectReference().VirtualAttributes();
         va.i_database = db;
         va.i_uuid = context.ReadLong();
     }
     finally
     {
         container.ShowInternalClasses(false);
     }
 }