本文整理汇总了C#中Db4objects.Db4o.Internal.ClassAspect.GetName方法的典型用法代码示例。如果您正苦于以下问题:C# ClassAspect.GetName方法的具体用法?C# ClassAspect.GetName怎么用?C# ClassAspect.GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Internal.ClassAspect
的用法示例。
在下文中一共展示了ClassAspect.GetName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MarshalledLength
public override int MarshalledLength(ObjectContainerBase stream, ClassAspect aspect
)
{
int len = stream.StringIO().ShortLength(aspect.GetName());
if (aspect is FieldMetadata)
{
FieldMetadata field = (FieldMetadata)aspect;
if (field.NeedsArrayAndPrimitiveInfo())
{
len += 1;
}
if (!(field is VirtualFieldMetadata))
{
len += Const4.IdLength;
}
}
return len;
}
示例2: ReplaceAspectByName
private bool ReplaceAspectByName(Collection4 aspects, ClassAspect aspect)
{
var existing = AspectByName(aspects, aspect.GetName());
if (existing == null)
{
return false;
}
aspects.ReplaceByIdentity(existing, aspect);
return true;
}
示例3: 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));
}