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

C# Reflect.ArrayInfo类代码示例

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

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



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

示例1: 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


示例2: WriteTypeInfo

		public virtual void WriteTypeInfo(IWriteContext context, ArrayInfo info)
		{
			BitMap4 typeInfoBitmap = new BitMap4(2);
			typeInfoBitmap.Set(0, info.Primitive());
			typeInfoBitmap.Set(1, info.Nullable());
			context.WriteByte(typeInfoBitmap.GetByte(0));
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:ArrayVersionHelper.cs


示例3: ReflectClassFromElementsEntry

		public override IReflectClass ReflectClassFromElementsEntry(ObjectContainerBase container
			, ArrayInfo info, int classID)
		{
			if (classID == Const4.IgnoreId)
			{
				// TODO: Here is a low-frequency mistake, extremely unlikely.
				// If classID == 99999 by accident then we will get ignore.
				return null;
			}
			info.Primitive(false);
			if (UseJavaHandling())
			{
				if (classID < Const4.Primitive)
				{
					info.Primitive(true);
					classID -= Const4.Primitive;
				}
			}
			classID = -classID;
			ClassMetadata classMetadata = container.ClassMetadataForID(classID);
			if (classMetadata != null)
			{
				return ClassReflector(container.Reflector(), classMetadata, info.Primitive());
			}
			return null;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:26,代码来源:ArrayVersionHelper3.cs


示例4: HasNullBitmap

		public virtual bool HasNullBitmap(ArrayInfo info)
		{
			if (info.Nullable())
			{
				return true;
			}
			return !info.Primitive();
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:ArrayVersionHelper.cs


示例5: ClassIDFromInfo

		public virtual int ClassIDFromInfo(ObjectContainerBase container, ArrayInfo info)
		{
			ClassMetadata classMetadata = container.ProduceClassMetadata(info.ReflectClass());
			if (classMetadata == null)
			{
				return 0;
			}
			return classMetadata.GetID();
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:9,代码来源:ArrayVersionHelper.cs


示例6: NewInstance

		public virtual object NewInstance(IReflectClass componentType, ArrayInfo info)
		{
			componentType = componentType.GetDelegate();
			if (componentType is GenericClass)
			{
				int length = info.ElementCount();
				return new GenericArray(((GenericClass)componentType).ArrayClass(), length);
			}
			return _delegate.NewInstance(componentType, info);
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:10,代码来源:GenericArrayReflector.cs


示例7: ReadDimensions

 private void ReadDimensions(ArrayInfo info, IReadBuffer buffer, int dimensionCount
     )
 {
     var dim = new int[dimensionCount];
     for (var i = 0; i < dim.Length; i++)
     {
         dim[i] = buffer.ReadInt();
     }
     ((MultidimensionalArrayInfo) info).Dimensions(dim);
     info.ElementCount(ElementCount(dim));
 }
开发者ID:masroore,项目名称:db4o,代码行数:11,代码来源:MultidimensionalArrayHandler.cs


示例8: ReadElements

		protected override void ReadElements(IReadContext context, ArrayInfo info, object
			 array)
		{
			if (array == null)
			{
				return;
			}
			object[] objects = new object[info.ElementCount()];
			ReadInto(context, info, objects);
			ArrayReflector(Container(context)).Shape(objects, 0, array, ((MultidimensionalArrayInfo
				)info).Dimensions(), 0);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:12,代码来源:MultidimensionalArrayHandler.cs


示例9: ClassIDFromInfo

		public override int ClassIDFromInfo(ObjectContainerBase container, ArrayInfo info
			)
		{
			ClassMetadata classMetadata = container.ProduceClassMetadata(info.ReflectClass());
			if (classMetadata == null)
			{
				// TODO: This one is a terrible low-frequency blunder !!!
				// If YapClass-ID == 99999 then we will get IGNORE back.
				// Discovered on adding the primitives
				return Const4.IgnoreId;
			}
			return classMetadata.GetID();
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:13,代码来源:ArrayVersionHelper3.cs


示例10: ReflectClassFromElementsEntry

		public virtual IReflectClass ReflectClassFromElementsEntry(ObjectContainerBase container
			, ArrayInfo info, int classID)
		{
			if (classID == 0)
			{
				return null;
			}
			ClassMetadata classMetadata = container.ClassMetadataForID(classID);
			if (classMetadata == null)
			{
				return null;
			}
			return ClassReflector(container.Reflector(), classMetadata, info.Primitive());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:14,代码来源:ArrayVersionHelper.cs


示例11: Analyze

		public virtual void Analyze(object obj, ArrayInfo info)
		{
		}
开发者ID:erdincay,项目名称:db4o,代码行数:3,代码来源:SelfArray.cs


示例12: AnalyzeDimensions

		protected virtual void AnalyzeDimensions(ObjectContainerBase container, object obj
			, ArrayInfo info)
		{
			info.ElementCount(ArrayReflector(container).GetLength(obj));
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:ArrayHandler.cs


示例13: Analyze

		protected void Analyze(ObjectContainerBase container, object obj, ArrayInfo info)
		{
			// TODO: Move as much analysis as possible to ReflectArray#analyze() 
			ArrayReflector(container).Analyze(obj, info);
			IReflectClass claxx = ComponentType(container, obj);
			Db4objects.Db4o.Internal.ClassMetadata classMetadata = container.ProduceClassMetadata
				(claxx);
			bool primitive = IsPrimitive(container.Reflector(), claxx, classMetadata);
			if (primitive)
			{
				claxx = classMetadata.ClassReflector();
			}
			info.Primitive(primitive);
			info.ReflectClass(claxx);
			AnalyzeDimensions(container, obj, info);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:16,代码来源:ArrayHandler.cs


示例14: WriteDimensions

		protected virtual void WriteDimensions(IWriteContext context, ArrayInfo info)
		{
			context.WriteInt(info.ElementCount());
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:4,代码来源:ArrayHandler.cs


示例15: ClassIDFromInfo

		protected virtual int ClassIDFromInfo(ObjectContainerBase container, ArrayInfo info
			)
		{
			return _versionHelper.ClassIDFromInfo(container, info);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:ArrayHandler.cs


示例16: HasNullBitmap

		public override bool HasNullBitmap(ArrayInfo info)
		{
			return false;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:4,代码来源:ArrayVersionHelper3.cs


示例17: ReadTypeInfo

		// do nothing, the byte for additional type information was added after format 3
		public override void ReadTypeInfo(Transaction trans, IReadBuffer buffer, ArrayInfo
			 info, int classID)
		{
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:ArrayVersionHelper3.cs


示例18: HasNullBitmap

		protected bool HasNullBitmap(ArrayInfo info)
		{
			return _versionHelper.HasNullBitmap(info);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:4,代码来源:ArrayHandler.cs


示例19: ReadElements

		protected virtual void ReadElements(IReadContext context, ArrayInfo info, object 
			array)
		{
			ReadInto(context, info, array);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:ArrayHandler.cs


示例20: DefragmentWriteMappedClassId

		private void DefragmentWriteMappedClassId(IDefragmentContext context, ArrayInfo info
			, int classIdOffset)
		{
			ByteArrayBuffer targetBuffer = context.TargetBuffer();
			int currentOffset = targetBuffer.Offset();
			targetBuffer.Seek(classIdOffset);
			int classID = ClassIDFromInfo(Container(context), info);
			int mappedID = context.MappedID(classID);
			int marshalledMappedId = ClassIdToMarshalledClassId(mappedID, info.Primitive());
			targetBuffer.WriteInt(marshalledMappedId);
			targetBuffer.Seek(currentOffset);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:12,代码来源:ArrayHandler.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# DbFuncionarios.BaseDeDados类代码示例发布时间:2022-05-24
下一篇:
C# Slots.Slot类代码示例发布时间: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