本文整理汇总了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;
}
示例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;
}
示例3: PrimitiveTypeMetadata
public PrimitiveTypeMetadata(ObjectContainerBase container, ITypeHandler4 handler
, int id, IReflectClass classReflector) : base(container, classReflector)
{
_aspects = FieldMetadata.EmptyArray;
_typeHandler = handler;
_id = id;
}
示例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
());
}
示例5: Transaction
public Transaction(ObjectContainerBase container, Transaction
systemTransaction, IReferenceSystem referenceSystem)
{
// contains DeleteInfo nodes
_container = container;
_systemTransaction = systemTransaction;
_referenceSystem = referenceSystem;
}
示例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;
}
示例7: NewTransportObjectContainer
private static TransportObjectContainer NewTransportObjectContainer(ObjectContainerBase
serviceProvider, MemoryBin memoryBin)
{
TransportObjectContainer container = new TransportObjectContainer(serviceProvider
, memoryBin);
container.DeferredOpen();
return container;
}
示例8: CreateBTreeIndex
private void CreateBTreeIndex(ObjectContainerBase stream, int btreeID)
{
if (stream.IsClient)
{
return;
}
_btreeIndex = ((LocalObjectContainer)stream).CreateBTreeClassIndex(btreeID);
_btreeIndex.SetRemoveListener(new _IVisitor4_61(this));
}
示例9: ClassIDFromInfo
public virtual int ClassIDFromInfo(ObjectContainerBase container, ArrayInfo info)
{
ClassMetadata classMetadata = container.ProduceClassMetadata(info.ReflectClass());
if (classMetadata == null)
{
return 0;
}
return classMetadata.GetID();
}
示例10: TransportObjectContainer
public TransportObjectContainer(ObjectContainerBase parent, MemoryBin memoryFile)
: base(parent.Config())
{
_memoryBin = memoryFile;
_parent = parent;
_lock = parent.Lock();
_showInternalClasses = parent._showInternalClasses;
Open();
}
示例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);
}
示例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
);
}
示例13: ClassMetadata
protected ClassMetadata(ObjectContainerBase container)
{
if (null == container)
{
throw new ArgumentNullException();
}
_container = container;
_index = CreateIndexStrategy();
_classIndexed = true;
_fieldAccessor = new StrictFieldAccessor();
}
示例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());
}
示例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();
}