当前位置: 首页>>代码示例>>C#>>正文


C# Internal.Transaction类代码示例

本文整理汇总了C#中Db4objects.Db4o.Internal.Transaction的典型用法代码示例。如果您正苦于以下问题:C# Transaction类的具体用法?C# Transaction怎么用?C# Transaction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Transaction类属于Db4objects.Db4o.Internal命名空间,在下文中一共展示了Transaction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetWriterForByte

 public MsgD GetWriterForByte(Transaction trans
     , byte b)
 {
     var msg = GetWriterForLength(trans, 1);
     msg._payLoad.WriteByte(b);
     return msg;
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:MsgD.cs

示例2: FrozenObjectInfo

 public FrozenObjectInfo(Transaction trans, ObjectReference @ref, bool committed) :
     this(@ref, IsInstantiatedReference(@ref)
         ? @ref.VirtualAttributes(trans, committed
             )
         : null)
 {
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:FrozenObjectInfo.cs

示例3: Rename

 protected virtual void Rename(Transaction transaction, string from, string to)
 {
     var item = Query(transaction, from);
     Assert.IsNotNull(item);
     item.name = to;
     Container().Store(transaction, item);
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:StringIndexTestCaseBase.cs

示例4: Remove

 protected virtual void Remove(Transaction transaction, int[] keys)
 {
     for (var i = 0; i < keys.Length; i++)
     {
         Remove(transaction, keys[i]);
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:BTreeTestCaseBase.cs

示例5: TraverseAll

		public override void TraverseAll(Transaction ta, IVisitor4 command)
		{
			if (_btreeIndex != null)
			{
				_btreeIndex.TraverseKeys(ta, command);
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:7,代码来源:BTreeClassIndexStrategy.cs

示例6: ReadTypeInfo

		public virtual void ReadTypeInfo(Transaction trans, IReadBuffer buffer, ArrayInfo
			 info, int classID)
		{
			BitMap4 typeInfoBitmap = new BitMap4(buffer.ReadByte());
			info.Primitive(typeInfoBitmap.IsTrue(0));
			info.Nullable(typeInfoBitmap.IsTrue(1));
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:ArrayVersionHelper.cs

示例7: Add

		protected virtual void Add(Transaction transaction, int[] keys)
		{
			for (int i = 0; i < keys.Length; i++)
			{
				Add(transaction, keys[i]);
			}
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:7,代码来源:BTreeTestCaseBase.cs

示例8: Dispatch

			public virtual bool Dispatch(Transaction trans, object obj, int eventID)
			{
				if (methods[eventID] == null)
				{
					return true;
				}
				object[] parameters = new object[] { trans.ObjectContainer() };
				ObjectContainerBase container = trans.Container();
				int stackDepth = container.StackDepth();
				int topLevelCallId = container.TopLevelCallId();
				container.StackDepth(0);
				try
				{
					object res = methods[eventID].Invoke(obj, parameters);
					if (res is bool)
					{
						return ((bool)res);
					}
				}
				finally
				{
					container.StackDepth(stackDepth);
					container.TopLevelCallId(topLevelCallId);
				}
				return true;
			}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:26,代码来源:EventDispatchers.cs

示例9: Release

		public virtual void Release(ShutdownMode mode, Transaction transaction, bool rollbackOnClose
			)
		{
			lock (_mainContainer.Lock())
			{
				ClientTransactionPool.ContainerCount entry = (ClientTransactionPool.ContainerCount
					)_transaction2Container.Get(transaction);
				entry.Container().CloseTransaction(transaction, false, mode.IsFatal() ? false : rollbackOnClose
					);
				_transaction2Container.Remove(transaction);
				entry.Release();
				if (entry.IsEmpty())
				{
					_fileName2Container.Remove(entry.FileName());
					try
					{
						entry.Close(mode);
					}
					catch (Exception t)
					{
						// If we are in fatal ShutdownMode close will
						// throw but we want to continue shutting down
						// all entries.
						Sharpen.Runtime.PrintStackTrace(t);
					}
				}
			}
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:28,代码来源:ClientTransactionPool.cs

示例10: CreateDefault

		public virtual object CreateDefault(Transaction a_trans)
		{
			BlobImpl bi = null;
			bi = (BlobImpl)this.MemberwiseClone();
			bi.SetTrans(a_trans);
			return bi;
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:BlobImpl.cs

示例11: GetOrCreate

		public override object GetOrCreate(Transaction a_trans, object a_OnObject)
		{
			// This is the first part of marshalling
			// Virtual fields do it all in #marshall(), the object is never used.
			// Returning any object here prevents triggering null handling.
			return AnyObject;
		}
开发者ID:Galigator,项目名称:db4o,代码行数:7,代码来源:VirtualFieldMetadata.cs

示例12: EnsureSingleOccurence

			private void EnsureSingleOccurence(Transaction trans, IObjectInfoCollection col)
			{
				IEnumerator i = col.GetEnumerator();
				while (i.MoveNext())
				{
					IObjectInfo objectInfo = (IObjectInfo)i.Current;
					if (this.ReflectClass() != this._enclosing.ReflectorFor(trans, objectInfo.GetObject
						()))
					{
						continue;
					}
					object obj = this.ObjectFor(trans, objectInfo);
					object fieldValue = this.FieldMetadata().GetOn(trans, obj);
					if (fieldValue == null)
					{
						continue;
					}
					IBTreeRange range = this.FieldMetadata().Search(trans, fieldValue);
					if (range.Size() > 1)
					{
						throw new UniqueFieldValueConstraintViolationException(this.ClassMetadata().GetName
							(), this.FieldMetadata().GetName());
					}
				}
			}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:25,代码来源:UniqueFieldValueConstraint.cs

示例13: QConClass

		internal QConClass(Transaction trans, QCon parent, QField field, IReflectClass claxx
			) : base(trans, parent, field, null)
		{
			// C/S
			if (claxx != null)
			{
				ObjectContainerBase container = trans.Container();
				_classMetadata = container.ClassMetadataForReflectClass(claxx);
				if (_classMetadata == null)
				{
					// could be an aliased class, try to resolve.
					string className = claxx.GetName();
					string aliasRunTimeName = container.Config().ResolveAliasStoredName(className);
					if (!className.Equals(aliasRunTimeName))
					{
						_classMetadata = container.ClassMetadataForName(aliasRunTimeName);
					}
				}
				if (claxx.Equals(container._handlers.IclassObject))
				{
					_classMetadata = (ClassMetadata)_classMetadata.TypeHandler();
				}
			}
			_claxx = claxx;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:25,代码来源:QConClass.cs

示例14: UnmarshallingContext

		public UnmarshallingContext(Transaction transaction, ByteArrayBuffer buffer, ObjectReference
			 @ref, int addToIDTree, bool checkIDTree) : base(transaction, buffer, null, @ref
			)
		{
			_addToIDTree = addToIDTree;
			_checkIDTree = checkIDTree;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:UnmarshallingContext.cs

示例15: LazyClientQueryResult

		public LazyClientQueryResult(Transaction trans, ClientObjectContainer client, int
			 queryResultID) : base(trans)
		{
			_client = client;
			_queryResultID = queryResultID;
			_iterator = new LazyClientIdIterator(this);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:LazyClientQueryResult.cs


注:本文中的Db4objects.Db4o.Internal.Transaction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。