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


C# SerializationContext.Write方法代码示例

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


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

示例1: GetObjectData

        public override void GetObjectData(SerializationContext output)
        {
            base.GetObjectData(output);

            output.WriteVersion(2);
            output.Write(ROM);
            output.Write(Bank);
        }
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:8,代码来源:Cart78AB.cs

示例2: Serialize

        public override void Serialize(SerializationContext context)
        {
            base.Serialize(context);

            int target = (Owner != null) ? Owner.ServerIndex : -1;
            context.Write(target);
        }
开发者ID:cody82,项目名称:spacewar-arena,代码行数:7,代码来源:Program.cs

示例3: GetObjectData

        public override void GetObjectData(SerializationContext output)
        {
            if (_pokeySound == null)
                throw new Emu7800SerializationException("Cart7832P must be attached before serialization.");

            base.GetObjectData(output);

            output.WriteVersion(1);
            output.Write(ROM);
            output.WriteOptional(_pokeySound);
        }
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:11,代码来源:Cart7832P.cs

示例4: Serialize

 public override void Serialize(SerializationContext context)
 {
     base.Serialize(context);
     context.Write((byte)(Team + 1));
     context.Write(Name);
     context.Write((short)Checks);
 }
开发者ID:cody82,项目名称:spacewar-arena,代码行数:7,代码来源:game.cs

示例5: Serialize

		public void Serialize(BinaryWriter writer, object instance)
		{
			SerializationContext context = new SerializationContext(this, writer);
			context.MarkFixedInstances(this.FixedInstances);
			context.Mark(instance);
			context.Scan();
			context.ScanTypes();
			context.Write();
			context.WriteObjectID(instance);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:10,代码来源:FastSerializer.cs

示例6: Serialize

        public virtual void Serialize(SerializationContext context)
        {
            string hm=Root.Instance.ResourceManager.Find(Height).GetFullPath();
            string color=Root.Instance.ResourceManager.Find(Material.diffusemap).GetFullPath();
            string detail=Root.Instance.ResourceManager.Find(Material.DetailMap).GetFullPath();

            context.Write(hm);
            context.Write(color);
            context.Write(detail);
        }
开发者ID:cody82,项目名称:spacewar-arena,代码行数:10,代码来源:Terrain.cs

示例7: GetObjectData

        public override void GetObjectData(SerializationContext output)
        {
            base.GetObjectData(output);

            output.WriteVersion(1);
            output.Write(ROM);
            output.Write(RAM);
            output.Write(BankBaseAddr);
            output.Write(BankBaseRAMAddr);
            output.Write(RAMBankOn);
        }
开发者ID:ddugovic,项目名称:RASuite,代码行数:11,代码来源:CartMN16K.cs

示例8: Serialize

 public override void Serialize(SerializationContext context)
 {
     base.Serialize(context);
     context.Write((byte)ScoreIntervall);
     context.Write((short)TeamScoreLimit);
 }
开发者ID:cody82,项目名称:spacewar-arena,代码行数:6,代码来源:rules.cs

示例9: Serialize

 public override void Serialize(SerializationContext context)
 {
     context.Write((byte)EventList.Count);
     foreach (EventReplicationInfo e in EventList)
     {
         e.Serialize(context);
     }
 }
开发者ID:cody82,项目名称:spacewar-arena,代码行数:8,代码来源:Net.cs

示例10: GetObjectData

        public override void GetObjectData(SerializationContext output)
        {
            base.GetObjectData(output);

            output.WriteVersion(1);
            output.Write(ROM);
            output.Write(SegmentBase);
        }
开发者ID:ddugovic,项目名称:RASuite,代码行数:8,代码来源:CartPB8K.cs

示例11: Serialize

 public override void Serialize(SerializationContext context)
 {
     base.Serialize(context);
     context.Write(Radius);
 }
开发者ID:cody82,项目名称:spacewar-arena,代码行数:5,代码来源:planets.cs

示例12: Serialize

 public override void Serialize(SerializationContext context)
 {
     base.Serialize(context);
     if (Source != null)
     {
         context.Write(Source.ServerIndex);
     }
     else
         context.Write(-1);
 }
开发者ID:cody82,项目名称:spacewar-arena,代码行数:10,代码来源:weapons.cs

示例13: GetObjectData

        public override void GetObjectData(SerializationContext output)
        {
            base.GetObjectData(output);

            output.WriteVersion(1);
            output.Write(Mem);
            output.Write(CPU);
            output.Write(Maria);
            output.Write(PIA);
            output.Write(RAM1);
            output.Write(RAM2);
            output.WriteOptional(BIOS);
            output.WriteOptional(HSC);
            output.Write(Cart);
        }
开发者ID:CadeLaRen,项目名称:BizHawk,代码行数:15,代码来源:Machine7800.cs

示例14: GetObjectData

        public override void GetObjectData(SerializationContext output)
        {
            base.GetObjectData(output);

            output.WriteVersion(1);
            output.Write(Mem);
            output.Write(CPU);
            output.Write(TIA);
            output.Write(PIA);
            output.Write(Cart);
        }
开发者ID:ddugovic,项目名称:RASuite,代码行数:11,代码来源:Machine2600.cs

示例15: GetObjectData

        public override void GetObjectData(SerializationContext output)
        {
            base.GetObjectData(output);

            output.WriteVersion(1);
            output.Write(ROM);
            output.Write(BankBaseAddr);
            output.Write(Tops);
            output.Write(Bots);
            output.Write(Counters);
            output.Write(Flags);
            output.Write(MusicMode);
            output.Write(LastSystemClock);
            output.Write(FractionalClocks);
            output.Write(_ShiftRegister);
        }
开发者ID:ddugovic,项目名称:RASuite,代码行数:16,代码来源:CartDPC.cs


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