コード例 #1
1
ファイル: ClassInfo.cs プロジェクト: bvangrinsven/db4o-net
		public ClassInfo(bool isAbstract, Type superClass, Db4objects.Db4o.Reflect.Self.FieldInfo
			[] fieldInfo)
		{
			_isAbstract = isAbstract;
			_superClass = superClass;
			_fieldInfo = fieldInfo;
		}
コード例 #2
0
		public DeleteContextImpl(Db4objects.Db4o.Internal.StatefulBuffer buffer, ObjectHeader
			 objectHeader, IReflectClass fieldClass, Config4Field fieldConfig) : base(buffer
			.Transaction(), buffer, objectHeader)
		{
			_fieldClass = fieldClass;
			_fieldConfig = fieldConfig;
		}
コード例 #3
0
			public void OnEvent(object sender, Db4objects.Db4o.Events.ClassEventArgs args)
			{
				ClassEventArgs classEventArgs = (ClassEventArgs)args;
				Assert.AreEqual(typeof(ClassRegistrationEventsTestCase.Data).FullName, CrossPlatformServices
					.SimpleName(classEventArgs.ClassMetadata().GetName()));
				eventFlag.eventOccurred = true;
			}
コード例 #4
0
		public PersistentIntegerArray(Db4objects.Db4o.Internal.Slots.SlotChangeFactory slotChangeFactory
			, ITransactionalIdSystem idSystem, int[] arr) : base(idSystem)
		{
			_slotChangeFactory = slotChangeFactory;
			_ints = new int[arr.Length];
			System.Array.Copy(arr, 0, _ints, 0, arr.Length);
		}
コード例 #5
0
ファイル: NetConstructor.cs プロジェクト: erdincay/db4o
		public NetConstructor(Db4objects.Db4o.Reflect.IReflector reflector, System.Reflection.ConstructorInfo
			 constructor)
		{
			this.reflector = reflector;
			this.constructor = constructor;
			Db4objects.Db4o.Internal.Platform4.SetAccessible(constructor);
		}
コード例 #6
0
ファイル: SimpleItem.cs プロジェクト: superyfwy/db4o
		public SimpleItem(SimpleListHolder parent_, Db4objects.Drs.Tests.Data.SimpleItem 
			child_, string value_)
		{
			parent = parent_;
			value = value_;
			child = child_;
		}
コード例 #7
0
		public StatefulBuffer(Db4objects.Db4o.Internal.Transaction trans, int initialBufferSize
			)
		{
			_trans = trans;
			_length = initialBufferSize;
			_buffer = new byte[_length];
		}
コード例 #8
0
		public NQOptimizationInfo(Db4objects.Db4o.Query.Predicate predicate, string message
			, object optimized)
		{
			this._predicate = predicate;
			this._message = message;
			this._optimized = optimized;
		}
コード例 #9
0
ファイル: FreeSlotNode.cs プロジェクト: Galigator/db4o
		internal static Tree RemoveGreaterOrEqual(Db4objects.Db4o.Internal.Freespace.FreeSlotNode
			 a_in, TreeIntObject a_finder)
		{
			if (a_in == null)
			{
				return null;
			}
			int cmp = a_in._key - a_finder._key;
			if (cmp == 0)
			{
				a_finder._object = a_in;
				// the highest node in the hierarchy !!!
				return a_in.Remove();
			}
			if (cmp > 0)
			{
				a_in._preceding = RemoveGreaterOrEqual((Db4objects.Db4o.Internal.Freespace.FreeSlotNode
					)((Tree)a_in._preceding), a_finder);
				if (a_finder._object != null)
				{
					a_in._size--;
					return a_in;
				}
				a_finder._object = a_in;
				return a_in.Remove();
			}
			a_in._subsequent = RemoveGreaterOrEqual((Db4objects.Db4o.Internal.Freespace.FreeSlotNode
				)((Tree)a_in._subsequent), a_finder);
			if (a_finder._object != null)
			{
				a_in._size--;
			}
			return a_in;
		}
コード例 #10
0
		public ComplexFieldIndexItem(int foo_, int bar_, Db4objects.Db4o.Tests.Common.Fieldindex.ComplexFieldIndexItem
			 child_)
		{
			foo = foo_;
			bar = bar_;
			child = child_;
		}
コード例 #11
0
		public TransactionalIdSystemImpl(IClosure4 freespaceManager, IClosure4 globalIdSystem
			, Db4objects.Db4o.Internal.Ids.TransactionalIdSystemImpl parentIdSystem)
		{
			_globalIdSystem = globalIdSystem;
			_slotChanges = new IdSlotChanges(this, freespaceManager);
			_parentIdSystem = parentIdSystem;
		}
コード例 #12
0
		public DefragmentContextImpl(Db4objects.Db4o.Internal.DefragmentContextImpl parentContext
			, ObjectHeader header)
		{
			_source = parentContext._source;
			_target = parentContext._target;
			_services = parentContext._services;
			_objectHeader = header;
		}
コード例 #13
0
		public virtual IBTreeRange CreateIncludingRange(Db4objects.Db4o.Internal.Btree.BTreeNodeSearchResult
			 end)
		{
			BTreePointer firstPointer = FirstValidPointer();
			BTreePointer endPointer = end._foundMatch ? end._pointer.Next() : end.FirstValidPointer
				();
			return new BTreeRangeSingle(_transaction, _btree, firstPointer, endPointer);
		}
コード例 #14
0
ファイル: ByteArrayBuffer.cs プロジェクト: superyfwy/db4o
		public bool ContainsTheSame(Db4objects.Db4o.Internal.ByteArrayBuffer other)
		{
			if (other != null)
			{
				return Arrays4.Equals(_buffer, other._buffer);
			}
			return false;
		}
コード例 #15
0
		public Transaction(ObjectContainerBase container, Db4objects.Db4o.Internal.Transaction
			 systemTransaction, IReferenceSystem referenceSystem)
		{
			// contains DeleteInfo nodes
			_container = container;
			_systemTransaction = systemTransaction;
			_referenceSystem = referenceSystem;
		}
コード例 #16
0
ファイル: QQueryBase.cs プロジェクト: superyfwy/db4o
		protected QQueryBase(Db4objects.Db4o.Internal.Transaction a_trans, QQuery a_parent
			, string a_field)
		{
			_this = Cast(this);
			_trans = a_trans;
			i_parent = a_parent;
			i_field = a_field;
		}
コード例 #17
0
			public void OnEvent(object sender, Db4objects.Db4o.Events.CancellableObjectEventArgs
				 objectInfo)
			{
				IObjectContainer container = ((CancellableObjectEventArgs)objectInfo).ObjectContainer
					();
				// this crashes if the MetaInfoWithEnum-class is unknown!
				container.Query(typeof(QueryInCallBackCSCallback.MetaInfo));
			}
コード例 #18
0
		public MethodCallValue(IMethodRef method, Db4objects.Db4o.Instrumentation.Api.CallingConvention
			 callingConvention, IComparisonOperandAnchor parent, IComparisonOperand[] args) : 
			base(parent)
		{
			_method = method;
			_args = args;
			_callingConvention = callingConvention;
		}
コード例 #19
0
ファイル: HierarchyAnalyzer.cs プロジェクト: erdincay/db4o
			public Diff(Db4objects.Db4o.Internal.ClassMetadata classMetadata)
			{
				if (classMetadata == null)
				{
					throw new ArgumentNullException();
				}
				_classMetadata = classMetadata;
			}
コード例 #20
0
ファイル: GenericClass.cs プロジェクト: superyfwy/db4o
		public GenericClass(GenericReflector reflector, IReflectClass delegateClass, string
			 name, Db4objects.Db4o.Reflect.Generic.GenericClass superclass)
		{
			_reflector = reflector;
			_delegate = delegateClass;
			_name = name;
			_superclass = superclass;
			_hashCode = _name.GetHashCode();
		}
コード例 #21
0
ファイル: GetUUIDTestCase.cs プロジェクト: superyfwy/db4o
			public void OnEvent(object sender, Db4objects.Db4o.Events.CommitEventArgs args)
			{
				CommitEventArgs commitEventArgs = (CommitEventArgs)args;
				IEnumerator deletedObjectInfoCollection = commitEventArgs.Deleted.GetEnumerator();
				while (deletedObjectInfoCollection.MoveNext())
				{
					IObjectInfo objectInfo = (IObjectInfo)deletedObjectInfoCollection.Current;
					Assert.AreEqual(itemUUID, objectInfo.GetUUID());
				}
			}
コード例 #22
0
ファイル: ActivationContext4.cs プロジェクト: erdincay/db4o
		public ActivationContext4(Db4objects.Db4o.Internal.Transaction transaction, object
			 obj, IActivationDepth depth)
		{
			if (null == obj)
			{
				throw new ArgumentNullException();
			}
			_transaction = transaction;
			_targetObject = obj;
			_depth = depth;
		}
コード例 #23
0
ファイル: List4.cs プロジェクト: Orvid/SQLInterfaceCollection
		public static int Size(Db4objects.Db4o.Foundation.List4 list)
		{
			int counter = 0;
			Db4objects.Db4o.Foundation.List4 nextList = list;
			while (nextList != null)
			{
				counter++;
				nextList = ((Db4objects.Db4o.Foundation.List4)nextList._next);
			}
			return counter;
		}
コード例 #24
0
			public void OnEvent(object sender, Db4objects.Db4o.Events.CommitEventArgs args)
			{
				try
				{
					((CommitEventArgs)args).ObjectContainer().Query(classConstraint);
				}
				finally
				{
					Lock.Run(new _IClosure4_39(Lock));
				}
			}
コード例 #25
0
			public void OnEvent(object sender, Db4objects.Db4o.Events.ObjectInfoEventArgs args
				)
			{
				this._enclosing.AssertClientTransaction(((ObjectInfoEventArgs)args));
				instantiatedLog.xed = true;
				object obj = ((ObjectInfoEventArgs)args).Object;
				ObjectReference objectReference = this._enclosing.Trans().ReferenceSystem().ReferenceForObject
					(obj);
				Assert.IsNotNull(objectReference);
				Assert.AreSame(objectReference, ((ObjectInfoEventArgs)args).Info);
			}
コード例 #26
0
ファイル: Slot.cs プロジェクト: superyfwy/db4o
		public virtual int CompareByAddress(Db4objects.Db4o.Internal.Slots.Slot slot)
		{
			// FIXME: This is the wrong way around !!!
			// Fix here and in all referers.
			int res = slot._address - _address;
			if (res != 0)
			{
				return res;
			}
			return slot.Length() - Length();
		}
コード例 #27
0
			public void OnEvent(object sender, Db4objects.Db4o.Events.ObjectInfoEventArgs args
				)
			{
				if (this._enclosing.doThrow)
				{
					if (((ObjectInfoEventArgs)args).Info.GetObject().GetType().Equals(typeof(ExceptionInUpdatingCallbackCorruptionTestCase.Item
						)))
					{
						throw new Exception();
					}
				}
			}
コード例 #28
0
		public virtual void Transaction(Db4objects.Db4o.Internal.Transaction transaction)
		{
			if (_transaction != null)
			{
				_transaction = transaction;
			}
			else
			{
				_mainTransaction = transaction;
			}
			_rollbackOnClose = false;
		}
コード例 #29
0
ファイル: BTreeNode.cs プロジェクト: bvangrinsven/db4o-net
		public BTreeNode(Transaction trans, Db4objects.Db4o.Internal.Btree.BTreeNode firstChild
			, Db4objects.Db4o.Internal.Btree.BTreeNode secondChild) : this(firstChild._btree
			, 2, false, 0, 0, 0)
		{
			_keys[0] = firstChild._keys[0];
			_children[0] = firstChild;
			_keys[1] = secondChild._keys[0];
			_children[1] = secondChild;
			Write(trans.SystemTransaction());
			firstChild.SetParentID(trans, GetID());
			secondChild.SetParentID(trans, GetID());
		}
コード例 #30
0
ファイル: BTreeRangeSingle.cs プロジェクト: erdincay/db4o
		public BTreeRangeSingle(Db4objects.Db4o.Internal.Transaction transaction, BTree btree
			, BTreePointer first, BTreePointer end)
		{
			if (transaction == null || btree == null)
			{
				throw new ArgumentNullException();
			}
			_transaction = transaction;
			_btree = btree;
			_first = first;
			_end = end;
		}