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


C# NeoDatis.GetNumberOfObjects方法代码示例

本文整理汇总了C#中NeoDatis.GetNumberOfObjects方法的典型用法代码示例。如果您正苦于以下问题:C# NeoDatis.GetNumberOfObjects方法的具体用法?C# NeoDatis.GetNumberOfObjects怎么用?C# NeoDatis.GetNumberOfObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NeoDatis的用法示例。


在下文中一共展示了NeoDatis.GetNumberOfObjects方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1:

		/// <summary>Shift all unconnected infos to connected (committed) infos</summary>
		/// <param name="classInfo"></param>
		/// <returns>The updated class info</returns>
		public virtual NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo BuildClassInfoForCommit
			(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo classInfo)
		{
			long nbObjects = classInfo.GetNumberOfObjects();
			classInfo.GetCommitedZoneInfo().SetNbObjects(nbObjects);
			if (classInfo.GetCommitedZoneInfo().first != null)
			{
			}
			else
			{
				// nothing to change
				classInfo.GetCommitedZoneInfo().first = classInfo.GetUncommittedZoneInfo().first;
			}
			if (classInfo.GetUncommittedZoneInfo().last != null)
			{
				classInfo.GetCommitedZoneInfo().last = classInfo.GetUncommittedZoneInfo().last;
			}
			// Resets the unconnected zone info
			classInfo.GetUncommittedZoneInfo().Set(new NeoDatis.Odb.Core.Layers.Layer2.Meta.CIZoneInfo
				(classInfo, null, null, 0));
			return classInfo;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:25,代码来源:DefaultTransaction.cs

示例2: UpdateInstanceFieldsOfClassInfo

		/// <summary>
		/// Updates the instance related field of the class info into the database
		/// file Updates the number of objects, the first object oid and the next
		/// class oid
		/// </summary>
		/// <param name="classInfo">The class info to be updated</param>
		/// <param name="writeInTransaction">To specify if it must be part of a transaction @
		/// 	</param>
		public virtual void UpdateInstanceFieldsOfClassInfo(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
			 classInfo, bool writeInTransaction)
		{
			long currentPosition = fsi.GetPosition();
			if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogIdDebug))
			{
				NeoDatis.Tool.DLogger.Debug(DepthToSpaces() + "Start of updateInstanceFieldsOfClassInfo for "
					 + classInfo.GetFullClassName());
			}
			long position = classInfo.GetPosition() + NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.StorageEngineConstant
				.ClassOffsetClassNbObjects;
			fsi.SetWritePosition(position, writeInTransaction);
			long nbObjects = classInfo.GetNumberOfObjects();
			fsi.WriteLong(nbObjects, writeInTransaction, "class info update nb objects", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
				.PointerWriteAction);
			WriteOid(classInfo.GetCommitedZoneInfo().first, writeInTransaction, "class info update first obj oid"
				, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.PointerWriteAction);
			WriteOid(classInfo.GetCommitedZoneInfo().last, writeInTransaction, "class info update last obj oid"
				, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.PointerWriteAction);
			if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogIdDebug))
			{
				NeoDatis.Tool.DLogger.Debug(DepthToSpaces() + "End of updateInstanceFieldsOfClassInfo for "
					 + classInfo.GetFullClassName());
			}
			fsi.SetWritePosition(currentPosition, writeInTransaction);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:34,代码来源:AbstractObjectWriter.cs


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