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


C# ObjectContainerBase.ProduceClassMetadata方法代码示例

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


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

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

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

示例3: ErasedFieldType

		public static ClassMetadata ErasedFieldType(ObjectContainerBase container, IReflectClass
			 fieldType)
		{
			return fieldType.IsInterface() ? container.ClassMetadataForID(UntypedId) : container
				.ProduceClassMetadata(BaseType(fieldType));
		}
开发者ID:erdincay,项目名称:db4o,代码行数:6,代码来源:Handlers4.cs

示例4: DetectElementTypeHandler

 private static ClassMetadata DetectElementTypeHandler(ObjectContainerBase container, Array collection)
 {
     Type elementType = ElementTypeOf(collection);
 	return container.ProduceClassMetadata(container.Reflector().ForClass(elementType));
 }
开发者ID:Galigator,项目名称:db4o,代码行数:5,代码来源:SystemArrayTypeHandler.cs

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

示例6: DetectElementTypeErasingNullables

		private static ClassMetadata DetectElementTypeErasingNullables(ObjectContainerBase container, IEnumerable collection)
		{
			Type elementType = ElementTypeOf(collection);
			if (IsNullableInstance(elementType))
			{
				return container.ClassMetadataForReflectClass(container.Handlers.IclassObject);
			}
			return container.ProduceClassMetadata(container.Reflector().ForClass(elementType));
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:9,代码来源:GenericCollectionTypeHandler.cs

示例7: PrepareComparison

		internal virtual IPreparedComparison PrepareComparison(ObjectContainerBase container
			, object constraint)
		{
			IContext context = container.Transaction.Context();
			if (_fieldMetadata != null)
			{
				return _fieldMetadata.PrepareComparison(context, constraint);
			}
			if (_classMetadata != null)
			{
				return _classMetadata.PrepareComparison(context, constraint);
			}
			IReflector reflector = container.Reflector();
			Db4objects.Db4o.Internal.ClassMetadata classMetadata = null;
			if (_bytes != null)
			{
				classMetadata = container.ProduceClassMetadata(reflector.ForObject(constraint));
			}
			else
			{
				if (_member != null)
				{
					classMetadata = container.ClassMetadataForReflectClass(reflector.ForObject(_member
						));
				}
			}
			if (classMetadata != null)
			{
				if (_member != null && _member.GetType().IsArray)
				{
					ITypeHandler4 arrayElementTypehandler = classMetadata.TypeHandler();
					if (reflector.Array().IsNDimensional(MemberClass()))
					{
						MultidimensionalArrayHandler mah = new MultidimensionalArrayHandler(arrayElementTypehandler
							, false);
						return mah.PrepareComparison(context, _member);
					}
					ArrayHandler ya = new ArrayHandler(arrayElementTypehandler, false);
					return ya.PrepareComparison(context, _member);
				}
				return classMetadata.PrepareComparison(context, constraint);
			}
			return null;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:44,代码来源:QCandidate.cs


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