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


C# ByteArrayBuffer.WriteIDOf方法代码示例

本文整理汇总了C#中ByteArrayBuffer.WriteIDOf方法的典型用法代码示例。如果您正苦于以下问题:C# ByteArrayBuffer.WriteIDOf方法的具体用法?C# ByteArrayBuffer.WriteIDOf怎么用?C# ByteArrayBuffer.WriteIDOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ByteArrayBuffer的用法示例。


在下文中一共展示了ByteArrayBuffer.WriteIDOf方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Write

 public virtual void Write(Transaction trans, ClassMetadata clazz, ByteArrayBuffer
     writer)
 {
     writer.WriteShortString(trans, clazz.NameToWrite());
     var intFormerlyKnownAsMetaClassID = 0;
     writer.WriteInt(intFormerlyKnownAsMetaClassID);
     writer.WriteIDOf(trans, clazz._ancestor);
     WriteIndex(trans, clazz, writer);
     writer.WriteInt(clazz.DeclaredAspectCount());
     clazz.TraverseDeclaredAspects(new _IProcedure4_39(this, trans, clazz, writer));
 }
开发者ID:masroore,项目名称:db4o,代码行数:11,代码来源:ClassMarshaller.cs

示例2: Write

 public override void Write(Transaction trans, ClassMetadata clazz, ClassAspect aspect
     , ByteArrayBuffer writer)
 {
     base.Write(trans, clazz, aspect, writer);
     if (!(aspect is FieldMetadata))
     {
         return;
     }
     var field = (FieldMetadata) aspect;
     if (!HasBTreeIndex(field))
     {
         return;
     }
     writer.WriteIDOf(trans, field.GetIndex(trans));
 }
开发者ID:masroore,项目名称:db4o,代码行数:15,代码来源:FieldMarshaller1.cs

示例3: WriteThis

 public override void WriteThis(Transaction trans, ByteArrayBuffer a_writer)
 {
     a_writer.WriteByte(BtreeVersion);
     a_writer.WriteInt(_size);
     a_writer.WriteInt(NodeSize());
     a_writer.WriteIDOf(trans, _root);
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:BTree.cs

示例4: WriteThis

 public override void WriteThis(Transaction trans, ByteArrayBuffer buffer)
 {
     var count = 0;
     var startOffset = buffer._offset;
     var context = trans.Context();
     buffer.IncrementOffset(CountLeafAnd3LinkLength);
     if (_isLeaf)
     {
         for (var i = 0; i < _count; i++)
         {
             var obj = InternalKey(trans, i);
             if (obj != No4.Instance)
             {
                 count++;
                 KeyHandler().WriteIndexEntry(context, buffer, obj);
             }
         }
     }
     else
     {
         for (var i = 0; i < _count; i++)
         {
             if (ChildCanSupplyFirstKey(i))
             {
                 var child = (BTreeNode
                     ) _children[i];
                 var childKey = child.FirstKey(trans);
                 if (childKey != No4.Instance)
                 {
                     count++;
                     KeyHandler().WriteIndexEntry(context, buffer, childKey);
                     buffer.WriteIDOf(trans, child);
                 }
             }
             else
             {
                 count++;
                 KeyHandler().WriteIndexEntry(context, buffer, Key(i));
                 buffer.WriteIDOf(trans, _children[i]);
             }
         }
     }
     var endOffset = buffer._offset;
     buffer._offset = startOffset;
     buffer.WriteInt(count);
     buffer.WriteByte(_isLeaf ? (byte) 1 : (byte) 0);
     buffer.WriteInt(_parentID);
     buffer.WriteInt(_previousID);
     buffer.WriteInt(_nextID);
     buffer._offset = endOffset;
 }
开发者ID:masroore,项目名称:db4o,代码行数:51,代码来源:BTreeNode.cs


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