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

C# Serialization.Serializer类代码示例

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

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



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

示例1: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.Write(this.Unknown0);
     serializer.WriteVarint(this.Unknown1);
     serializer.Write(this.Unknown2);
     serializer.WriteVarint(this.Unknown3);
     serializer.Write((byte)Unknown4.Length);
     for (int i = 0; i < Unknown4.Length; i++)
     {
         serializer.Write(Unknown4[i]);
     }
     serializer.Write(this.Unknown5);
     serializer.WriteVarint(this.Unknown6);
     serializer.Write(this.Unknown7.IsPresent ? (byte) 1 : (byte) 0);
     if (this.Unknown7.IsPresent)
     {
         serializer.Write(this.Unknown7.Value);
     }
     serializer.Write(this.Unknown8);
     serializer.Write(this.Unknown9);
     serializer.Write(this.Unknown10);
     serializer.Write(this.Unknown11);
     serializer.Write(this.Unknown12);
     serializer.Write(this.Unknown13);
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:26,代码来源:P011_UnknownMessage.cs


示例2: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.Write(this.Unknown0);
     serializer.WriteVarint(this.Unknown1);
     serializer.Write(this.Unknown2);
     serializer.WriteVarint(this.Unknown3);
     serializer.Write((byte)Unknown4.Length);
     for (int i = 0; i < Unknown4.Length; i++)
     {
         serializer.Write(Unknown4[i]);
     }
     serializer.Write(this.Unknown5);
     serializer.WriteVarint(this.Unknown6);
     serializer.Write(this.Unknown7);
     serializer.Write(this.Unknown8);
     serializer.Write(this.Unknown9);
     serializer.Write(this.Unknown10);
     serializer.Write(this.Unknown11);
     for (int i = 0; i < this.Unknown12.Length; i++)
     {
         serializer.Write(this.Unknown12[i]);
     }
     serializer.Write(this.Unknown13);
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:25,代码来源:P012_UnknownMessage.cs


示例3: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.WriteVarint(this.Unknown0);
     serializer.WriteVarint(this.Unknown1);
     serializer.WriteVarint(this.Unknown2);
     serializer.WriteUtf16String(this.Unknown3);
     serializer.Write(this.Unknown4);
     serializer.Write(this.Unknown5);
     serializer.Write(this.Unknown6);
     serializer.WriteUtf16String(this.Unknown7);
     for (int i = 0; i < this.Unknown8.Length; i++)
     {
         serializer.WriteVarint(this.Unknown8[i]);
     }
     serializer.Write((byte)Unknown9.Length);
     for (int i = 0; i < Unknown9.Length; i++)
     {
         serializer.WriteVarint(Unknown9[i]);
     }
     serializer.Write((byte)Unknown10.Length);
     for (int i = 0; i < Unknown10.Length; i++)
     {
         serializer.Write(Unknown10[i]);
     }
     serializer.Write((byte)Unknown11.Length);
     for (int i = 0; i < Unknown11.Length; i++)
     {
         serializer.WriteVarint(Unknown11[i]);
     }
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:31,代码来源:P577_UnknownMessage.cs


示例4: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.Write(this.Unknown0);
     serializer.WriteVarint(this.Unknown1);
     serializer.Write(this.Unknown2);
     serializer.Write(this.Unknown3);
     serializer.Write(this.Unknown4);
     serializer.Write(this.Unknown5);
     serializer.Write(this.Unknown6);
     serializer.Write(this.Unknown7);
     serializer.Write(this.Unknown8);
     serializer.Write((byte)Unknown9.Length);
     for (int i = 0; i < Unknown9.Length; i++)
     {
         serializer.WriteVarint(Unknown9[i]);
     }
     serializer.WriteUtf16String(this.Unknown10);
     serializer.WriteUtf16String(this.Unknown11);
     serializer.Write(this.Unknown12);
     serializer.Write(this.Unknown13);
     serializer.Write((byte)Unknown25.Length);
     for (int i = 0; i < Unknown25.Length; i++)
     {
         Unknown25[i].Serialize(serializer);
     }
     serializer.Write(this.Unknown26);
     serializer.Write(this.Unknown27);
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:29,代码来源:P604_UnknownMessage.cs


示例5: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.Write(this.Unknown0);
     serializer.WriteUtf16String(this.Unknown1);
     serializer.WriteUtf16String(this.Unknown2);
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:7,代码来源:P382_UnknownMessage.cs


示例6: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.Write(this.Unknown0);
     serializer.Write(this.Unknown1);
     serializer.WriteVarint(this.Unknown2);
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:7,代码来源:P687_UnknownMessage.cs


示例7: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.WriteVarint(this.Unknown0);
     serializer.Write(this.Unknown1);
     serializer.Write(this.Unknown2);
     serializer.WriteVarint(this.Unknown3);
     serializer.WriteVarint(this.Unknown4);
     serializer.WriteVarint(this.Unknown5);
     serializer.WriteVarint(this.Unknown6);
     serializer.WriteVarint(this.Unknown7);
     serializer.WriteVarint(this.Unknown8);
     for (int i = 0; i < this.Unknown9.Length; i++)
     {
         serializer.Write(this.Unknown9[i]);
     }
     serializer.Write((byte)Unknown16.Length);
     for (int i = 0; i < Unknown16.Length; i++)
     {
         Unknown16[i].Serialize(serializer);
     }
     for (int i = 0; i < this.Unknown17.Length; i++)
     {
         serializer.Write(this.Unknown17[i]);
     }
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:26,代码来源:P08_UnknownMessage.cs


示例8: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.WriteVarint(this.Unknown1);
     serializer.WriteVarint(this.Unknown2);
     serializer.Write(this.Unknown3);
     serializer.Write(this.Unknown4);
     serializer.Write(this.Unknown5);
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:8,代码来源:P455_UnknownMessage.cs


示例9: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.WriteVarint(this.Unknown0);
     for (int i = 0; i < this.Unknown1.Length; i++)
     {
         serializer.Write(this.Unknown1[i]);
     }
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:9,代码来源:P075_UnknownMessage.cs


示例10: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.Write((byte)Unknown0.Length);
     for (int i = 0; i < Unknown0.Length; i++)
     {
         serializer.Write(Unknown0[i]);
     }
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:9,代码来源:P152_UnknownMessage.cs


示例11: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.WriteVarint(this.Unknown0);
     serializer.Write(this.Unknown1);
     serializer.WriteVarint(this.Unknown2);
     serializer.WriteVarint(this.Unknown3);
     serializer.WriteVarint(this.Unknown4);
     serializer.WriteVarint(this.Unknown5);
     serializer.WriteVarint(this.Unknown6);
     serializer.Write((byte)Unknown10.Length);
     for (int i = 0; i < Unknown10.Length; i++)
     {
         Unknown10[i].Serialize(serializer);
     }
     serializer.Write(this.Unknown11.IsPresent ? (byte) 1 : (byte) 0);
     if (this.Unknown11.IsPresent)
     {
         serializer.WriteVarint(this.Unknown11.Value);
     }
     serializer.Write(this.Unknown12.IsPresent ? (byte) 1 : (byte) 0);
     if (this.Unknown12.IsPresent)
     {
         serializer.Write(this.Unknown12.Value);
     }
     serializer.Write(this.Unknown13.IsPresent ? (byte) 1 : (byte) 0);
     if (this.Unknown13.IsPresent)
     {
         serializer.Write(this.Unknown13.Value);
     }
     serializer.Write(this.Unknown14.IsPresent ? (byte) 1 : (byte) 0);
     if (this.Unknown14.IsPresent)
     {
         serializer.WriteVarint(this.Unknown14.Value);
     }
     serializer.Write(this.Unknown15.IsPresent ? (byte) 1 : (byte) 0);
     if (this.Unknown15.IsPresent)
     {
         serializer.Write(this.Unknown15.Value);
     }
     serializer.Write(this.Unknown22.IsPresent ? (byte) 1 : (byte) 0);
     if (this.Unknown22.IsPresent)
     {
         this.Unknown22.Value.Serialize(serializer);
     }
     serializer.Write(this.Unknown23.IsPresent ? (byte) 1 : (byte) 0);
     if (this.Unknown23.IsPresent)
     {
         serializer.WriteVarint(this.Unknown23.Value);
     }
     serializer.Write(this.Unknown24.IsPresent ? (byte) 1 : (byte) 0);
     if (this.Unknown24.IsPresent)
     {
         serializer.WriteVarint(this.Unknown24.Value);
     }
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:56,代码来源:P244_UnknownMessage.cs


示例12: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.WriteVarint(this.Unknown0);
     serializer.Write((byte)Unknown5.Length);
     for (int i = 0; i < Unknown5.Length; i++)
     {
         Unknown5[i].Serialize(serializer);
     }
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:10,代码来源:P709_UnknownMessage.cs


示例13: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.Write(this.Unknown0);
     serializer.Write(this.Unknown1);
     serializer.Write(this.Unknown2);
     serializer.Write(this.Unknown3);
     serializer.Write(this.Unknown4);
     serializer.Write(this.Unknown5);
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:10,代码来源:P005_UnknownMessage.cs


示例14: ToBytes

        public static byte[] ToBytes(uint[] uints)
        {
            Serializer serializer = new Serializer();
            serializer.Write(uints[0]);
            serializer.Write(uints[1]);
            serializer.Write(uints[2]);
            serializer.Write(uints[3]);
            serializer.Write(uints[4]);

            return serializer.GetBytes();
        }
开发者ID:puppt,项目名称:GW2Emu,代码行数:11,代码来源:CryptoUtils.cs


示例15: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.WriteVarint(this.Unknown0);
     serializer.WriteVarint(this.Unknown1);
     serializer.WriteUtf16String(this.Unknown2);
     serializer.WriteUtf16String(this.Unknown3);
     serializer.WriteUtf16String(this.Unknown4);
     serializer.WriteUtf16String(this.Unknown5);
     serializer.WriteUtf16String(this.Unknown6);
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:11,代码来源:P576_UnknownMessage.cs


示例16: Compress

        public byte[] Compress(byte[] buffer)
        {
            byte[] compressed = compressor.Compress(buffer);

            Serializer serializer = new Serializer();
            serializer.Write((short)compressed.Length);
            serializer.Write((short)buffer.Length);
            serializer.Write(compressed);

            return serializer.GetBytes();
        }
开发者ID:puppt,项目名称:GW2Emu,代码行数:11,代码来源:LZ4Compressor.cs


示例17: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.Write(this.Unknown0);
     serializer.Write(this.Unknown1);
     serializer.Write(this.Unknown2);
     for (int i = 0; i < this.Unknown3.Length; i++)
     {
         serializer.Write(this.Unknown3[i]);
     }
     serializer.Write(this.Unknown4);
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:12,代码来源:P377_UnknownMessage.cs


示例18: Serialize

        public byte[] Serialize(ISession session, IMessage message)
        {
            // serialize the data into a bytestream
            Serializer serializer = new Serializer();
            message.Serialize(serializer);

            // postprocessing...
            byte[] compressed = this.compressor.Compress(serializer.GetBytes());
            byte[] encrypted = this.encryptor.Encrypt(compressed);

            return encrypted;
        }
开发者ID:puppt,项目名称:GW2Emu,代码行数:12,代码来源:ConnectedState.cs


示例19: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.WriteVarint(this.Unknown0);
     serializer.Write(this.Unknown1);
     serializer.Write(this.Unknown2);
     serializer.Write((byte)Unknown3.Length);
     for (int i = 0; i < Unknown3.Length; i++)
     {
         serializer.WriteVarint(Unknown3[i]);
     }
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:12,代码来源:P142_UnknownMessage.cs


示例20: Serialize

 public void Serialize(Serializer serializer)
 {
     serializer.Write(Header);
     serializer.WriteVarint(this.Unknown0);
     serializer.Write(this.Unknown1);
     serializer.WriteVarint(this.Unknown2);
     serializer.WriteUtf16String(this.Unknown3);
     serializer.Write((ushort)Unknown4.Length);
     for (int i = 0; i < Unknown4.Length; i++)
     {
         serializer.Write(Unknown4[i]);
     }
 }
开发者ID:puppt,项目名称:GW2Emu,代码行数:13,代码来源:P18_UnknownMessage.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# GameStateManagement.GameScreen类代码示例发布时间:2022-05-26
下一篇:
C# Serialization.Deserializer类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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