本文整理汇总了C#中Db4objects.Db4o.Internal.ClassMetadata.GetID方法的典型用法代码示例。如果您正苦于以下问题:C# ClassMetadata.GetID方法的具体用法?C# ClassMetadata.GetID怎么用?C# ClassMetadata.GetID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Internal.ClassMetadata
的用法示例。
在下文中一共展示了ClassMetadata.GetID方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterClassMetadataById
private void RegisterClassMetadataById(ClassMetadata clazz)
{
if (clazz.GetID() == 0)
{
clazz.Write(_systemTransaction);
}
_classMetadataByID.Put(clazz.GetID(), clazz);
}
示例2: GetWriter
public MsgD GetWriter(Transaction trans, Pointer4 pointer, ClassMetadata classMetadata
, int param, ByteArrayBuffer buffer)
{
return GetWriter(trans, pointer, buffer, new[]
{
classMetadata.GetID(), param
});
}
示例3: GetWriter
public MsgD GetWriter(Transaction trans, Pointer4 pointer, ClassMetadata classMetadata
, ByteArrayBuffer buffer)
{
if (classMetadata == null)
{
return GetWriter(trans, pointer, buffer, new int[] { 0 });
}
return GetWriter(trans, pointer, buffer, new int[] { classMetadata.GetID() });
}
示例4: FieldMetadata
internal FieldMetadata(ClassMetadata containingClass, IReflectField field, ClassMetadata
fieldType) : this(containingClass)
{
Init(field.GetName());
_reflectField = field;
_fieldType = fieldType;
_fieldTypeID = fieldType.GetID();
// TODO: beautify !!! possibly pull up isPrimitive to ReflectField
bool isPrimitive = field is GenericField ? ((GenericField)field).IsPrimitive() :
false;
Configure(field.GetFieldType(), isPrimitive);
CheckDb4oType();
SetAvailable();
}
示例5: InstanceCount
public override int InstanceCount(ClassMetadata clazz, Transaction trans)
{
MsgD msg = Msg.InstanceCount.GetWriterForInt(trans, clazz.GetID());
Write(msg);
MsgD response = (MsgD)ExpectedResponse(Msg.InstanceCount);
return response.ReadInt();
}
示例6: GetIDsForClass
private long[] GetIDsForClass(Transaction trans, ClassMetadata clazz, bool triggerQueryEvents
)
{
MsgD msg = Msg.GetInternalIds.GetWriterForInts(trans, new int[] { clazz.GetID(),
PrefetchDepth(), PrefetchCount(), triggerQueryEvents ? 1 : 0 });
Write(msg);
ByRef result = ByRef.NewInstance();
WithEnvironment(new _IRunnable_901(this, trans, result));
return ((long[])result.value);
}
示例7: WriteElementTypeId
private static void WriteElementTypeId(IWriteContext context, ClassMetadata elementType)
{
context.WriteInt(elementType.GetID());
}
示例8: RefreshClass
private void RefreshClass(ClassMetadata clazz)
{
if (_classMetadataByID.Get(clazz.GetID()) == null)
{
_classes.Add(clazz);
_classMetadataByID.Put(clazz.GetID(), clazz);
RefreshClassCache(clazz, null);
}
}
示例9: ProcessClassAndFieldIndices
/// <exception cref="Db4objects.Db4o.CorruptionException"></exception>
/// <exception cref="System.IO.IOException"></exception>
private static void ProcessClassAndFieldIndices(DefragmentServicesImpl context, ClassMetadata
curClass, IPassCommand command)
{
int sourceClassIndexID = 0;
int targetClassIndexID = 0;
if (curClass.HasClassIndex())
{
sourceClassIndexID = curClass.Index().Id();
targetClassIndexID = context.MappedID(sourceClassIndexID, -1);
}
command.ProcessClass(context, curClass, curClass.GetID(), targetClassIndexID);
}