• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FlatBuffers.FlatBufferBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FlatBuffers.FlatBufferBuilder的典型用法代码示例。如果您正苦于以下问题:C# FlatBufferBuilder类的具体用法?C# FlatBufferBuilder怎么用?C# FlatBufferBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FlatBufferBuilder类属于FlatBuffers命名空间,在下文中一共展示了FlatBufferBuilder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateListThreadsResponse

   public static int CreateListThreadsResponse(FlatBufferBuilder builder,
 int thread = 0)
   {
       builder.StartObject(1);
       ListThreadsResponse.AddThread(builder, thread);
       return ListThreadsResponse.EndListThreadsResponse(builder);
   }
开发者ID:SaviorXTanren,项目名称:xenia,代码行数:7,代码来源:ListThreadsResponse.cs


示例2: CreateTest

 public static Offset<Test> CreateTest(FlatBufferBuilder builder, short A, sbyte B) {
   builder.Prep(2, 4);
   builder.Pad(1);
   builder.PutSbyte(B);
   builder.PutShort(A);
   return new Offset<Test>(builder.Offset);
 }
开发者ID:zzragida,项目名称:flatbuffers,代码行数:7,代码来源:Test.cs


示例3: CreateListModuleEntry

 public static int CreateListModuleEntry(FlatBufferBuilder builder, uint Handle, uint FunctionCount)
 {
     builder.Prep(4, 8);
     builder.PutUint(FunctionCount);
     builder.PutUint(Handle);
     return builder.Offset;
 }
开发者ID:SaviorXTanren,项目名称:xenia,代码行数:7,代码来源:ListModuleEntry.cs


示例4: CreateArea

 public static Offset<Area> CreateArea(FlatBufferBuilder builder, float Largura, float Comprimento)
 {
     builder.Prep(4, 8);
     builder.PutFloat(Comprimento);
     builder.PutFloat(Largura);
     return new Offset<Area>(builder.Offset);
 }
开发者ID:talkitbr,项目名称:FlatBuffers,代码行数:7,代码来源:Area.cs


示例5: RunSerialize

    void RunSerialize()
    {
        for (int i = 0; i < N; i++)
        {
            FlatBufferBuilder messageBuffer = new FlatBufferBuilder(100);

            var text = messageBuffer.CreateString(@"Test message included");

            int embeddedOffset = EmbeddedMessage.CreateEmbeddedMessage(messageBuffer, i);

            TestMessage.StartTestMessage(messageBuffer);
            TestMessage.AddText(messageBuffer, text.Value);
            TestMessage.AddEmbedded(messageBuffer, embeddedOffset);
            TestMessage.AddId(messageBuffer, i);
            int testMessage = TestMessage.EndTestMessage(messageBuffer);
            TestMessage.FinishTestMessageBuffer(messageBuffer, testMessage);

            string s = "";
            for (int j = 0; j < messageBuffer.DataBuffer.Data.Length; j++) s += messageBuffer.DataBuffer.Data[i].ToString() + ", ";
            Debug.Log(s);

            using (MemoryStream ms = new MemoryStream(messageBuffer.DataBuffer.Data,
                                                      0,
                                                      messageBuffer.DataBuffer.Data.Length))
            {
                ByteBuffer byteBuffer = new ByteBuffer(ms.ToArray());
                TestMessage parsed = TestMessage.GetRootAsTestMessage(byteBuffer);

                if (parsed.Embedded().Id() != i) throw new Exception("Invalid embedded value");
            }
        }
    }
开发者ID:zaki,项目名称:unity-benchmarks,代码行数:32,代码来源:BenchmarkFlatbuffers.cs


示例6: CreateSecondTableInA

 public static Offset<SecondTableInA> CreateSecondTableInA(FlatBufferBuilder builder,
     Offset<NamespaceC.TableInC> refer_to_cOffset = default(Offset<NamespaceC.TableInC>))
 {
     builder.StartObject(1);
     SecondTableInA.AddReferToC(builder, refer_to_cOffset);
     return SecondTableInA.EndSecondTableInA(builder);
 }
开发者ID:CadeLaRen,项目名称:flatbuffers,代码行数:7,代码来源:SecondTableInA.cs


示例7: CreateTest

 public static int CreateTest(FlatBufferBuilder builder, short A, sbyte B) {
   builder.Prep(2, 4);
   builder.Pad(1);
   builder.PutSbyte(B);
   builder.PutShort(A);
   return builder.Offset();
 }
开发者ID:rdumusc,项目名称:flatbuffers,代码行数:7,代码来源:Test.cs


示例8: CreateGetFunctionResponse

   public static int CreateGetFunctionResponse(FlatBufferBuilder builder,
 int function = 0)
   {
       builder.StartObject(1);
       GetFunctionResponse.AddFunction(builder, function);
       return GetFunctionResponse.EndGetFunctionResponse(builder);
   }
开发者ID:SaviorXTanren,项目名称:xenia,代码行数:7,代码来源:GetFunctionResponse.cs


示例9: CreateVariableParameters

   public static Offset<VariableParameters> CreateVariableParameters(FlatBufferBuilder builder,
 VariableType type = (VariableType)0)
   {
       builder.StartObject(1);
       VariableParameters.AddType(builder, type);
       return VariableParameters.EndVariableParameters(builder);
   }
开发者ID:wuyuntao,项目名称:Synchronica,代码行数:7,代码来源:VariableParameters.cs


示例10: CreateAddBreakpointsRequest

   public static int CreateAddBreakpointsRequest(FlatBufferBuilder builder,
 int breakpoints = 0)
   {
       builder.StartObject(1);
       AddBreakpointsRequest.AddBreakpoints(builder, breakpoints);
       return AddBreakpointsRequest.EndAddBreakpointsRequest(builder);
   }
开发者ID:SaviorXTanren,项目名称:xenia,代码行数:7,代码来源:AddBreakpointsRequest.cs


示例11: CreateLoginRequest

   public static Offset<LoginRequest> CreateLoginRequest(FlatBufferBuilder builder,
 StringOffset name = default(StringOffset))
   {
       builder.StartObject(1);
       LoginRequest.AddName(builder, name);
       return LoginRequest.EndLoginRequest(builder);
   }
开发者ID:wuyuntao,项目名称:Synchronica,代码行数:7,代码来源:LoginRequest.cs


示例12: CreateanchorPointsHolder

   public static Offset<anchorPointsHolder> CreateanchorPointsHolder(FlatBufferBuilder builder,
 VectorOffset anchorPoints = default(VectorOffset))
   {
       builder.StartObject(1);
       anchorPointsHolder.AddAnchorPoints(builder, anchorPoints);
       return anchorPointsHolder.EndanchorPointsHolder(builder);
   }
开发者ID:kestrelm,项目名称:CreatureTools,代码行数:7,代码来源:anchorPointsHolder.cs


示例13: CreateLoginResponse

   public static Offset<LoginResponse> CreateLoginResponse(FlatBufferBuilder builder,
 int objectId = 0)
   {
       builder.StartObject(1);
       LoginResponse.AddObjectId(builder, objectId);
       return LoginResponse.EndLoginResponse(builder);
   }
开发者ID:wuyuntao,项目名称:Synchronica,代码行数:7,代码来源:LoginResponse.cs


示例14: CreateInputCommand

   public static Offset<InputCommand> CreateInputCommand(FlatBufferBuilder builder,
 Offset<CommandFrame> frame = default(Offset<CommandFrame>))
   {
       builder.StartObject(1);
       InputCommand.AddFrame(builder, frame);
       return InputCommand.EndInputCommand(builder);
   }
开发者ID:wuyuntao,项目名称:DeterministicLockstepNetworking,代码行数:7,代码来源:InputCommand.cs


示例15: CreateGetModuleRequest

   public static int CreateGetModuleRequest(FlatBufferBuilder builder,
 uint module_id = 0)
   {
       builder.StartObject(1);
       GetModuleRequest.AddModuleId(builder, module_id);
       return GetModuleRequest.EndGetModuleRequest(builder);
   }
开发者ID:SaviorXTanren,项目名称:xenia,代码行数:7,代码来源:GetModuleRequest.cs


示例16: Createanimation

   public static Offset<animation> Createanimation(FlatBufferBuilder builder,
 VectorOffset clips = default(VectorOffset))
   {
       builder.StartObject(1);
       animation.AddClips(builder, clips);
       return animation.Endanimation(builder);
   }
开发者ID:kestrelm,项目名称:CreatureTools,代码行数:7,代码来源:animation.cs


示例17: CreateStructInNestedNS

 public static Offset<StructInNestedNS> CreateStructInNestedNS(FlatBufferBuilder builder, int A, int B)
 {
     builder.Prep(4, 8);
     builder.PutInt(B);
     builder.PutInt(A);
     return new Offset<StructInNestedNS>(builder.Offset);
 }
开发者ID:CadeLaRen,项目名称:flatbuffers,代码行数:7,代码来源:StructInNestedNS.cs


示例18: CreateListModulesResponse

   public static int CreateListModulesResponse(FlatBufferBuilder builder,
 int entry = 0)
   {
       builder.StartObject(1);
       ListModulesResponse.AddEntry(builder, entry);
       return ListModulesResponse.EndListModulesResponse(builder);
   }
开发者ID:SaviorXTanren,项目名称:xenia,代码行数:7,代码来源:ListModulesResponse.cs


示例19: Createskeleton

   public static Offset<skeleton> Createskeleton(FlatBufferBuilder builder,
 VectorOffset bones = default(VectorOffset))
   {
       builder.StartObject(1);
       skeleton.AddBones(builder, bones);
       return skeleton.Endskeleton(builder);
   }
开发者ID:kestrelm,项目名称:CreatureTools,代码行数:7,代码来源:skeleton.cs


示例20: CreateTableInNestedNS

   public static Offset<TableInNestedNS> CreateTableInNestedNS(FlatBufferBuilder builder,
 int foo = 0)
   {
       builder.StartObject(1);
       TableInNestedNS.AddFoo(builder, foo);
       return TableInNestedNS.EndTableInNestedNS(builder);
   }
开发者ID:google,项目名称:flatbuffers,代码行数:7,代码来源:TableInNestedNS.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SaveClasses.NamedObjectSave类代码示例发布时间:2022-05-24
下一篇:
C# FlatBuffers.ByteBuffer类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap