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


C# ClassMetadata.GetID方法代码示例

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


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

示例1: RegisterClassMetadataById

		private void RegisterClassMetadataById(ClassMetadata clazz)
		{
			if (clazz.GetID() == 0)
			{
				clazz.Write(_systemTransaction);
			}
			_classMetadataByID.Put(clazz.GetID(), clazz);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:8,代码来源:ClassMetadataRepository.cs

示例2: GetWriter

 public MsgD GetWriter(Transaction trans, Pointer4 pointer, ClassMetadata classMetadata
     , int param, ByteArrayBuffer buffer)
 {
     return GetWriter(trans, pointer, buffer, new[]
     {
         classMetadata.GetID(), param
     });
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:MsgObject.cs

示例3: GetWriter

		public MsgD GetWriter(Transaction trans, Pointer4 pointer, ClassMetadata classMetadata
			, ByteArrayBuffer buffer)
		{
			if (classMetadata == null)
			{
				return GetWriter(trans, pointer, buffer, new int[] { 0 });
			}
			return GetWriter(trans, pointer, buffer, new int[] { classMetadata.GetID() });
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:9,代码来源:MsgObject.cs

示例4: FieldMetadata

		internal FieldMetadata(ClassMetadata containingClass, IReflectField field, ClassMetadata
			 fieldType) : this(containingClass)
		{
			Init(field.GetName());
			_reflectField = field;
			_fieldType = fieldType;
			_fieldTypeID = fieldType.GetID();
			// TODO: beautify !!!  possibly pull up isPrimitive to ReflectField
			bool isPrimitive = field is GenericField ? ((GenericField)field).IsPrimitive() : 
				false;
			Configure(field.GetFieldType(), isPrimitive);
			CheckDb4oType();
			SetAvailable();
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:14,代码来源:FieldMetadata.cs

示例5: InstanceCount

		public override int InstanceCount(ClassMetadata clazz, Transaction trans)
		{
			MsgD msg = Msg.InstanceCount.GetWriterForInt(trans, clazz.GetID());
			Write(msg);
			MsgD response = (MsgD)ExpectedResponse(Msg.InstanceCount);
			return response.ReadInt();
		}
开发者ID:Galigator,项目名称:db4o,代码行数:7,代码来源:ClientObjectContainer.cs

示例6: GetIDsForClass

		private long[] GetIDsForClass(Transaction trans, ClassMetadata clazz, bool triggerQueryEvents
			)
		{
			MsgD msg = Msg.GetInternalIds.GetWriterForInts(trans, new int[] { clazz.GetID(), 
				PrefetchDepth(), PrefetchCount(), triggerQueryEvents ? 1 : 0 });
			Write(msg);
			ByRef result = ByRef.NewInstance();
			WithEnvironment(new _IRunnable_901(this, trans, result));
			return ((long[])result.value);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:10,代码来源:ClientObjectContainer.cs

示例7: WriteElementTypeId

 private static void WriteElementTypeId(IWriteContext context, ClassMetadata elementType)
 {
     context.WriteInt(elementType.GetID());
 }
开发者ID:Galigator,项目名称:db4o,代码行数:4,代码来源:SystemArrayTypeHandler.cs

示例8: RefreshClass

		private void RefreshClass(ClassMetadata clazz)
		{
			if (_classMetadataByID.Get(clazz.GetID()) == null)
			{
				_classes.Add(clazz);
				_classMetadataByID.Put(clazz.GetID(), clazz);
				RefreshClassCache(clazz, null);
			}
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:9,代码来源:ClassMetadataRepository.cs

示例9: ProcessClassAndFieldIndices

		/// <exception cref="Db4objects.Db4o.CorruptionException"></exception>
		/// <exception cref="System.IO.IOException"></exception>
		private static void ProcessClassAndFieldIndices(DefragmentServicesImpl context, ClassMetadata
			 curClass, IPassCommand command)
		{
			int sourceClassIndexID = 0;
			int targetClassIndexID = 0;
			if (curClass.HasClassIndex())
			{
				sourceClassIndexID = curClass.Index().Id();
				targetClassIndexID = context.MappedID(sourceClassIndexID, -1);
			}
			command.ProcessClass(context, curClass, curClass.GetID(), targetClassIndexID);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:14,代码来源:Defragment.cs


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