• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Internal.Transaction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: StatefulBuffer

 public StatefulBuffer(Transaction trans, int initialBufferSize
     )
 {
     _trans = trans;
     _length = initialBufferSize;
     _buffer = new byte[_length];
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:StatefulBuffer.cs


示例17: StatefulBuffer

		public StatefulBuffer(Db4objects.Db4o.Internal.Transaction trans, int initialBufferSize
			)
		{
			_trans = trans;
			_length = initialBufferSize;
			_buffer = new byte[_length];
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:StatefulBuffer.cs


示例18: Write

		public override void Write(Transaction trans, ClassMetadata clazz, ClassAspect aspect
			, ByteArrayBuffer writer)
		{
			writer.WriteShortString(trans, aspect.GetName());
			if (!(aspect is FieldMetadata))
			{
				return;
			}
			FieldMetadata field = (FieldMetadata)aspect;
			field.Alive();
			if (field.IsVirtual())
			{
				return;
			}
			ITypeHandler4 handler = field.GetHandler();
			if (handler is StandardReferenceTypeHandler)
			{
				// TODO: ensure there is a test case, to make this happen 
				if (((StandardReferenceTypeHandler)handler).ClassMetadata().GetID() == 0)
				{
					trans.Container().NeedsUpdate(clazz);
				}
			}
			writer.WriteInt(field.FieldTypeID());
			BitMap4 bitmap = new BitMap4(3);
			bitmap.Set(0, field.IsPrimitive());
			bitmap.Set(1, Handlers4.HandlesArray(handler));
			bitmap.Set(2, Handlers4.HandlesMultidimensionalArray(handler));
			// keep the order
			writer.WriteByte(bitmap.GetByte(0));
		}
开发者ID:Galigator,项目名称:db4o,代码行数:31,代码来源:FieldMarshaller0.cs


示例19: BTree

		public BTree(Transaction trans, BTreeConfiguration config, int id, IIndexable4 keyHandler
			, int treeNodeSize) : base(config._idSystem)
		{
			_config = config;
			if (null == keyHandler)
			{
				throw new ArgumentNullException();
			}
			_nodeSize = treeNodeSize;
			_nodeCache = CacheFactory.NewLRUIntCache(config._cacheSize);
			_halfNodeSize = _nodeSize / 2;
			_nodeSize = _halfNodeSize * 2;
			_keyHandler = keyHandler;
			SetID(id);
			if (IsNew())
			{
				SetStateDirty();
				_root = new BTreeNode(this, 0, true, 0, 0, 0);
				_root.Write(trans.SystemTransaction());
				AddNode(_root);
				Write(trans.SystemTransaction());
			}
			else
			{
				SetStateDeactivated();
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:27,代码来源:BTree.cs


示例20: _IRunnable_50

			public _IRunnable_50(EventRegistryImpl _enclosing, Transaction transaction, IQuery
				 query)
			{
				this._enclosing = _enclosing;
				this.transaction = transaction;
				this.query = query;
			}
开发者ID:erdincay,项目名称:db4o,代码行数:7,代码来源:EventRegistryImpl.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Btree.BTree类代码示例发布时间:2022-05-24
下一篇:
C# Internal.StatefulBuffer类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap