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

C# Internal.ObjectContainerBase类代码示例

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

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



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

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


示例2: CollectionToArray

		public static object[] CollectionToArray(ObjectContainerBase stream, object obj)
        {
            Collection4 col = FlattenCollection(stream, obj);
            object[] ret = new object[col.Size()];
            col.ToArray(ret);
            return ret;
        }
开发者ID:superyfwy,项目名称:db4o,代码行数:7,代码来源:Platform4.cs


示例3: PrimitiveTypeMetadata

 public PrimitiveTypeMetadata(ObjectContainerBase container, ITypeHandler4 handler
     , int id, IReflectClass classReflector) : base(container, classReflector)
 {
     _aspects = FieldMetadata.EmptyArray;
     _typeHandler = handler;
     _id = id;
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:PrimitiveTypeMetadata.cs


示例4: DatabaseIdentityIDAndUUID

 /// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
 private DatabaseIdentityIDAndUUID ReadDatabaseIdentityIDAndUUID
     (ObjectContainerBase container, ClassMetadata classMetadata, Slot oldSlot, bool
         checkClass)
 {
     if (DTrace.enabled)
     {
         DTrace.RereadOldUuid.LogLength(oldSlot.Address(), oldSlot.Length());
     }
     var reader = container.DecryptedBufferByAddress(oldSlot.Address(), oldSlot
         .Length());
     if (checkClass)
     {
         var realClass = ClassMetadata.ReadClass(container, reader);
         if (realClass != classMetadata)
         {
             return null;
         }
     }
     if (classMetadata.SeekToField(container.Transaction, reader, this) == HandlerVersion
         .Invalid)
     {
         return null;
     }
     return new DatabaseIdentityIDAndUUID(reader.ReadInt(), reader.ReadLong
         ());
 }
开发者ID:masroore,项目名称:db4o,代码行数:27,代码来源:UUIDFieldMetadata.cs


示例5: Transaction

 public Transaction(ObjectContainerBase container, Transaction
     systemTransaction, IReferenceSystem referenceSystem)
 {
     // contains DeleteInfo nodes
     _container = container;
     _systemTransaction = systemTransaction;
     _referenceSystem = referenceSystem;
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:Transaction.cs


示例6: LocalTransaction

 public LocalTransaction(ObjectContainerBase container, Transaction parentTransaction
     , ITransactionalIdSystem idSystem, IReferenceSystem referenceSystem) : base(container
         , parentTransaction, referenceSystem)
 {
     _file = (LocalObjectContainer) container;
     _committedCallbackDispatcher = new _ICommittedCallbackDispatcher_39(this);
     _idSystem = idSystem;
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:LocalTransaction.cs


示例7: NewTransportObjectContainer

		private static TransportObjectContainer NewTransportObjectContainer(ObjectContainerBase
			 serviceProvider, MemoryBin memoryBin)
		{
			TransportObjectContainer container = new TransportObjectContainer(serviceProvider
				, memoryBin);
			container.DeferredOpen();
			return container;
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:8,代码来源:Serializer.cs


示例8: CreateBTreeIndex

		private void CreateBTreeIndex(ObjectContainerBase stream, int btreeID)
		{
			if (stream.IsClient)
			{
				return;
			}
			_btreeIndex = ((LocalObjectContainer)stream).CreateBTreeClassIndex(btreeID);
			_btreeIndex.SetRemoveListener(new _IVisitor4_61(this));
		}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:BTreeClassIndexStrategy.cs


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


示例10: TransportObjectContainer

 public TransportObjectContainer(ObjectContainerBase parent, MemoryBin memoryFile)
     : base(parent.Config())
 {
     _memoryBin = memoryFile;
     _parent = parent;
     _lock = parent.Lock();
     _showInternalClasses = parent._showInternalClasses;
     Open();
 }
开发者ID:masroore,项目名称:db4o,代码行数:9,代码来源:TransportObjectContainer.cs


示例11: ReadIndex

		protected override void ReadIndex(ObjectContainerBase stream, ClassMetadata clazz
			, ByteArrayBuffer reader)
		{
			int indexID = reader.ReadInt();
			if (indexID == 0)
			{
				return;
			}
			clazz.Index().Read(stream, indexID);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:10,代码来源:ClassMarshaller2.cs


示例12: PrepareComparison

		public override IPreparedComparison PrepareComparison(ObjectContainerBase container
			, object constraint)
		{
			Db4objects.Db4o.Internal.ClassMetadata classMetadata = ClassMetadata();
			if (classMetadata == null)
			{
				return null;
			}
			return classMetadata.PrepareComparison(container.Transaction.Context(), constraint
				);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:11,代码来源:QPrimitiveCandidate.cs


示例13: ClassMetadata

 protected ClassMetadata(ObjectContainerBase container)
 {
     if (null == container)
     {
         throw new ArgumentNullException();
     }
     _container = container;
     _index = CreateIndexStrategy();
     _classIndexed = true;
     _fieldAccessor = new StrictFieldAccessor();
 }
开发者ID:masroore,项目名称:db4o,代码行数:11,代码来源:ClassMetadata.cs


示例14: Marshall

		public static SerializedGraph Marshall(ObjectContainerBase serviceProvider, object
			 obj)
		{
			MemoryBin memoryBin = new MemoryBin(223, GrowthStrategy());
			TransportObjectContainer carrier = NewTransportObjectContainer(serviceProvider, memoryBin
				);
			carrier.ProduceClassMetadata(carrier.Reflector().ForObject(obj));
			carrier.Store(obj);
			int id = (int)carrier.GetID(obj);
			carrier.Close();
			return new SerializedGraph(id, memoryBin.Data());
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:12,代码来源:Serializer.cs


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


示例16: ForObjectContainer

		public static IWeakReferenceSupport ForObjectContainer(ObjectContainerBase container
			)
		{
			if (!Platform4.HasWeakReferences())
			{
				return DisabledWeakReferenceSupport();
			}
			if (!container.ConfigImpl.WeakReferences())
			{
				return DisabledWeakReferenceSupport();
			}
			return new EnabledWeakReferenceSupport(container);
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:13,代码来源:WeakReferenceSupportFactory.cs


示例17: FromSpec

		protected override FieldMetadata FromSpec(RawFieldSpec spec, ObjectContainerBase 
			stream, ClassMetadata containingClass)
		{
			FieldMetadata actualField = base.FromSpec(spec, stream, containingClass);
			if (spec == null)
			{
				return null;
			}
			if (spec.IndexID() != 0)
			{
				actualField.InitIndex(stream.SystemTransaction(), spec.IndexID());
			}
			return actualField;
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:14,代码来源:FieldMarshaller1.cs


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


示例19: ObjectHeader

		private ObjectHeader(ObjectContainerBase container, Db4objects.Db4o.Internal.ClassMetadata
			 classMetadata, IReadWriteBuffer reader)
		{
			int classID = reader.ReadInt();
			_marshallerFamily = ReadMarshallerFamily(reader, classID);
			classID = NormalizeID(classID);
			_classMetadata = (classMetadata != null ? classMetadata : container.ClassMetadataForID
				(classID));
			// This check has been added to cope with defragment in debug mode: SlotDefragment#setIdentity()
			// will trigger calling this constructor with a source db class metadata and a target db stream,
			// thus _classMetadata==null. There may be a better solution, since this call is just meant to
			// skip the object header.
			_headerAttributes = SlotFormat().ReadHeaderAttributes((ByteArrayBuffer)reader);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:14,代码来源:ObjectHeader.cs


示例20: MarshalledLength

		public override int MarshalledLength(ObjectContainerBase stream, ClassAspect aspect
			)
		{
			int len = base.MarshalledLength(stream, aspect);
			if (!(aspect is FieldMetadata))
			{
				return len;
			}
			FieldMetadata field = (FieldMetadata)aspect;
			if (!HasBTreeIndex(field))
			{
				return len;
			}
			return len + Const4.IdLength;
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:15,代码来源:FieldMarshaller1.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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