本文整理汇总了C#中Db4objects.Db4o.Internal.ClassMetadata类的典型用法代码示例。如果您正苦于以下问题:C# ClassMetadata类的具体用法?C# ClassMetadata怎么用?C# ClassMetadata使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClassMetadata类属于Db4objects.Db4o.Internal命名空间,在下文中一共展示了ClassMetadata类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ProcessObjectSlot
/// <exception cref="Db4objects.Db4o.CorruptionException"></exception>
/// <exception cref="System.IO.IOException"></exception>
public void ProcessObjectSlot(DefragmentServicesImpl services, ClassMetadata classMetadata
, int id)
{
ByteArrayBuffer sourceBuffer = services.SourceBufferByID(id);
DefragmentContextImpl.ProcessCopy(services, id, new _ISlotCopyHandler_43(this, services
), sourceBuffer);
}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:SecondPassCommand.cs
示例2: Write
public override void Write(Transaction trans, ClassMetadata clazz, ClassAspect aspect
, ByteArrayBuffer writer)
{
writer.WriteShortString(trans, aspect.GetName());
if (!(aspect is FieldMetadata))
{
return;
}
FieldMetadata field = (FieldMetadata)aspect;
field.Alive();
if (field.IsVirtual())
{
return;
}
ITypeHandler4 handler = field.GetHandler();
if (handler is StandardReferenceTypeHandler)
{
// TODO: ensure there is a test case, to make this happen
if (((StandardReferenceTypeHandler)handler).ClassMetadata().GetID() == 0)
{
trans.Container().NeedsUpdate(clazz);
}
}
writer.WriteInt(field.FieldTypeID());
BitMap4 bitmap = new BitMap4(3);
bitmap.Set(0, field.IsPrimitive());
bitmap.Set(1, Handlers4.HandlesArray(handler));
bitmap.Set(2, Handlers4.HandlesMultidimensionalArray(handler));
// keep the order
writer.WriteByte(bitmap.GetByte(0));
}
开发者ID:Galigator,项目名称:db4o,代码行数:31,代码来源:FieldMarshaller0.cs
示例3: ModifiedAspectTraversalStrategy
public ModifiedAspectTraversalStrategy(ClassMetadata classMetadata, IList ancestors
)
{
_classDiffs = new ArrayList();
_classDiffs.Add(new HierarchyAnalyzer.Same(classMetadata));
Sharpen.Collections.AddAll(_classDiffs, ancestors);
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:ModifiedAspectTraversalStrategy.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: Process
internal virtual void Process(ClassMetadata newClassMetadata)
{
if (_pending.Contains(newClassMetadata))
{
return;
}
ClassMetadata ancestor = newClassMetadata.GetAncestor();
if (ancestor != null)
{
Process(ancestor);
}
_pending.Add(newClassMetadata);
_members.Add(newClassMetadata);
if (_running)
{
return;
}
_running = true;
try
{
CheckInits();
_pending = new Collection4();
}
finally
{
_running = false;
}
}
开发者ID:erdincay,项目名称:db4o,代码行数:28,代码来源:PendingClassInits.cs
示例6: QCandidates
internal QCandidates(LocalTransaction a_trans, ClassMetadata a_classMetadata, QField
a_field, bool isTopLevel)
{
// Transaction necessary as reference to stream
// collection of all constraints
// possible class information
// possible field information
// current executing constraint, only set where needed
_result = new QueryResultCandidates(this);
_isTopLevel = isTopLevel;
i_trans = a_trans;
_classMetadata = a_classMetadata;
_field = a_field;
if (a_field == null || a_field._fieldMetadata == null || !(a_field._fieldMetadata
.GetHandler() is StandardReferenceTypeHandler))
{
return;
}
ClassMetadata yc = ((StandardReferenceTypeHandler)a_field._fieldMetadata.GetHandler
()).ClassMetadata();
if (_classMetadata == null)
{
_classMetadata = yc;
}
else
{
yc = _classMetadata.GetHigherOrCommonHierarchy(yc);
if (yc != null)
{
_classMetadata = yc;
}
}
}
开发者ID:Galigator,项目名称:db4o,代码行数:33,代码来源:QCandidates.cs
示例7: QCandidates
internal QCandidates(LocalTransaction a_trans, ClassMetadata a_classMetadata, QField
a_field)
{
// Transaction necessary as reference to stream
// root of the QCandidate tree
// collection of all constraints
// possible class information
// possible field information
// current executing constraint, only set where needed
i_trans = a_trans;
i_classMetadata = a_classMetadata;
_field = a_field;
if (a_field == null || a_field._fieldMetadata == null || !(a_field._fieldMetadata
.GetHandler() is StandardReferenceTypeHandler))
{
return;
}
ClassMetadata yc = ((StandardReferenceTypeHandler)a_field._fieldMetadata.GetHandler
()).ClassMetadata();
if (i_classMetadata == null)
{
i_classMetadata = yc;
}
else
{
yc = i_classMetadata.GetHigherOrCommonHierarchy(yc);
if (yc != null)
{
i_classMetadata = yc;
}
}
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:32,代码来源:QCandidates.cs
示例8: Defrag
public override void Defrag(ClassMetadata classMetadata, ClassAspect aspect, LatinStringIO
sio, DefragmentContextImpl context)
{
base.Defrag(classMetadata, aspect, sio, context);
if (!(aspect is FieldMetadata))
{
return;
}
FieldMetadata field = (FieldMetadata)aspect;
if (field.IsVirtual())
{
return;
}
if (field.HasIndex())
{
BTree index = field.GetIndex(context.SystemTrans());
int targetIndexID = context.CopyID();
if (targetIndexID != 0)
{
index.DefragBTree(context.Services());
}
}
else
{
context.WriteInt(0);
}
}
开发者ID:superyfwy,项目名称:db4o,代码行数:27,代码来源:FieldMarshaller1.cs
示例9: ActivationDepthFor
public virtual IActivationDepth ActivationDepthFor(ClassMetadata classMetadata, ActivationMode
mode)
{
Record(new MethodCall("activationDepthFor", new object[] { classMetadata, mode })
);
return _delegate.ActivationDepthFor(classMetadata, mode);
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:MockActivationDepthProvider.cs
示例10: InstanceCount
public override int InstanceCount(ClassMetadata clazz, Transaction trans)
{
lock (Lock())
{
return clazz.IndexEntryCount(trans);
}
}
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:LocalObjectContainer.cs
示例11: GetWriter
public MsgD GetWriter(Transaction trans, Pointer4 pointer, ClassMetadata classMetadata
, int param, ByteArrayBuffer buffer)
{
return GetWriter(trans, pointer, buffer, new[]
{
classMetadata.GetID(), param
});
}
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:MsgObject.cs
示例12: _IProcedure4_39
public _IProcedure4_39(ClassMarshaller _enclosing, Transaction trans, ClassMetadata
clazz, ByteArrayBuffer writer)
{
this._enclosing = _enclosing;
this.trans = trans;
this.clazz = clazz;
this.writer = writer;
}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:ClassMarshaller.cs
示例13: Adjust
public virtual IUpdateDepth Adjust(ClassMetadata clazz)
{
if (clazz.CascadesOnDeleteOrUpdate())
{
return AdjustDepthToBorders().Descend();
}
return Descend();
}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:FixedUpdateDepth.cs
示例14: RegisterClassMetadataById
private void RegisterClassMetadataById(ClassMetadata clazz)
{
if (clazz.GetID() == 0)
{
clazz.Write(_systemTransaction);
}
_classMetadataByID.Put(clazz.GetID(), clazz);
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:8,代码来源:ClassMetadataRepository.cs
示例15: Diff
public Diff(Db4objects.Db4o.Internal.ClassMetadata classMetadata)
{
if (classMetadata == null)
{
throw new ArgumentNullException();
}
_classMetadata = classMetadata;
}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:HierarchyAnalyzer.cs
示例16: WriteUpdateProcessor
public WriteUpdateProcessor(LocalTransaction transaction, int id, ClassMetadata clazz
, ArrayType typeInfo)
{
_transaction = transaction;
_id = id;
_clazz = clazz;
_typeInfo = typeInfo;
}
开发者ID:Galigator,项目名称:db4o,代码行数:8,代码来源:WriteUpdateProcessor.cs
示例17: ConfiguredActivationDepth
private int ConfiguredActivationDepth(ClassMetadata metadata)
{
Config4Class config = metadata.ConfigOrAncestorConfig();
if (config != null && _mode.IsActivate())
{
return config.AdjustActivationDepth(_depth);
}
return _depth;
}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:LegacyActivationDepth.cs
示例18: TypeHandlerAspect
public TypeHandlerAspect(ClassMetadata classMetadata, ITypeHandler4 typeHandler)
{
if (Handlers4.IsValueType(typeHandler))
{
throw new InvalidOperationException();
}
_ownerMetadata = classMetadata;
_typeHandler = typeHandler;
}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:TypeHandlerAspect.cs
示例19: Descend
public override IActivationDepth Descend(ClassMetadata metadata)
{
if (_depth < 1)
{
return this;
}
return new Db4objects.Db4o.Internal.Activation.FixedActivationDepth(_depth - 1, _mode
);
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:9,代码来源:FixedActivationDepth.cs
示例20: StoredClassImpl
public StoredClassImpl(Transaction transaction, ClassMetadata classMetadata)
{
if (classMetadata == null)
{
throw new ArgumentException();
}
_transaction = transaction;
_classMetadata = classMetadata;
}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:StoredClassImpl.cs
注:本文中的Db4objects.Db4o.Internal.ClassMetadata类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论