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


C# Internal.ObjectContainerBase类代码示例

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


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


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