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

C# IDataWriter类代码示例

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

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



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

示例1: Serialize

 public override void Serialize(IDataWriter writer)
 {
     writer.WriteShort(msgId);
     writer.WriteUInt(timeStamp);
     writer.WriteUTF(owner);
     writer.WriteUInt(objectGenericId);
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:LivingObjectMessageMessage.cs


示例2: DataWriterProvider

		/// <summary>
		/// Ctor
		/// </summary>
		/// <param name="writers">inject with all possible writers</param>
		public DataWriterProvider(IEnumerable<IDataWriter> writers)
		{
			if (writers != null)
			{
				foreach (IDataWriter writer in writers)
				{
					if (this.DefaultWriter == null)
					{
						// TODO: decide less arbitrary way to choose default
						// without hardcoding value into IDataWriter
						this.DefaultWriter = writer;
					}

					if (!String.IsNullOrEmpty(writer.ContentType))
					{
						this.WritersByMime[writer.ContentType] = writer;
					}

					if (!String.IsNullOrEmpty(writer.ContentType))
					{
						string ext = DataWriterProvider.NormalizeExtension(writer.FileExtension);
						this.WritersByExt[ext] = writer;
					}
				}
			}
		}
开发者ID:dearzhangle,项目名称:UNION-OpenSource-MOBA,代码行数:30,代码来源:DataWriterProvider.cs


示例3: Serialize

 public override void Serialize(IDataWriter writer)
 {
     base.Serialize(writer);
     writer.WriteInt(mountId);
     writer.WriteDouble(date);
     writer.WriteShort(modelId);
 }
开发者ID:Guiedo,项目名称:BehaviorIsManaged,代码行数:7,代码来源:ObjectEffectMount.cs


示例4: Serialize

 public override void Serialize(IDataWriter writer)
 {
     writer.WriteInt(casterId);
     writer.WriteShort(targetCellId);
     writer.WriteShort(spellId);
     writer.WriteSByte(spellLevel);
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:GameRolePlaySpellAnimMessage.cs


示例5: Serialize

 public override void Serialize(IDataWriter writer)
 {
     writer.WriteInt(fightId);
     writer.WriteInt(sourceId);
     writer.WriteInt(targetId);
     writer.WriteBoolean(accept);
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:GameRolePlayPlayerFightFriendlyAnsweredMessage.cs


示例6: Serialize

 public override void Serialize(IDataWriter writer)
 {
     base.Serialize(writer);
     writer.WriteUTF(name);
     writer.WriteInt(id);
     writer.WriteSByte(relationType);
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:7,代码来源:CharacterLevelUpInformationMessage.cs


示例7: Serialize

 public override void Serialize(IDataWriter writer)
 {
     writer.WriteUTF(name);
     writer.WriteShort(worldX);
     writer.WriteShort(worldY);
     writer.WriteUTF(ownername);
 }
开发者ID:Guiedo,项目名称:BehaviorIsManaged,代码行数:7,代码来源:ExchangeMountTakenFromPaddockMessage.cs


示例8: Serialize

 public virtual void Serialize(IDataWriter writer)
 {
     writer.WriteShort(cellId);
     writer.WriteSByte(zoneSize);
     writer.WriteInt(cellColor);
     writer.WriteSByte(cellsType);
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:GameActionMarkedCell.cs


示例9: Serialize

 public virtual void Serialize(IDataWriter writer)
 {
     writer.WriteShort(@base);
     writer.WriteShort(objectsAndMountBonus);
     writer.WriteShort(alignGiftBonus);
     writer.WriteShort(contextModif);
 }
开发者ID:Guiedo,项目名称:BehaviorIsManaged,代码行数:7,代码来源:CharacterBaseCharacteristic.cs


示例10: Serialize

 public override void Serialize(IDataWriter writer)
 {
     writer.WriteInt(areaId);
     writer.WriteSByte(atLeastNbMount);
     writer.WriteSByte(atLeastNbMachine);
     writer.WriteInt(maxPrice);
 }
开发者ID:clapette,项目名称:BehaviorIsManaged,代码行数:7,代码来源:PaddockToSellFilterMessage.cs


示例11: Serialize

 public virtual void Serialize(IDataWriter writer)
 {
     writer.WriteShort(actionId);
     writer.WriteInt(sourceId);
     writer.WriteShort(effect.TypeId);
     effect.Serialize(writer);
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:FightDispellableEffectExtendedInformations.cs


示例12: Serialize

 public override void Serialize(IDataWriter writer)
 {
     writer.WriteSByte(paymentType);
     writer.WriteBoolean(bAdd);
     writer.WriteInt(objectToMoveId);
     writer.WriteInt(quantity);
 }
开发者ID:clapette,项目名称:BehaviorIsManaged,代码行数:7,代码来源:ExchangeItemObjectAddAsPaymentMessage.cs


示例13: SetUp

 public void SetUp()
 {
     mock=new MockRepository();
     dataWriter = mock.DynamicMock<IDataWriter>();
     dataReader = mock.Stub<IDataReader>();
     randomSecret = mock.Stub<IRandomSecret>();
 }
开发者ID:tonyx,项目名称:CodeBreakerMockingIo,代码行数:7,代码来源:GuessMarkerAcceptanceTest.cs


示例14: Serialize

 public override void Serialize(IDataWriter writer)
 {
     base.Serialize(writer);
     writer.WriteShort(firstNameId);
     writer.WriteShort(lastNameId);
     writer.WriteShort(level);
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:7,代码来源:GameFightTaxCollectorInformations.cs


示例15: Serialize

 public override void Serialize(IDataWriter writer)
 {
     base.Serialize(writer);
     writer.WriteInt(targetId);
     writer.WriteInt(spellId);
     writer.WriteShort(value);
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:GameActionFightSpellCooldownVariationMessage.cs


示例16: Serialize

 public override void Serialize(IDataWriter writer)
 {
     writer.WriteShort(fightId);
     writer.WriteSByte(teamId);
     writer.WriteSByte(option);
     writer.WriteBoolean(state);
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:GameFightOptionStateUpdateMessage.cs


示例17: DoAcceptTcpClientCallback

        // Process the client connection.
        private static void DoAcceptTcpClientCallback(IAsyncResult ar, IDataWriter writer, IDataGetter reader, CancellationToken ct)
        {
            if (ct.IsCancellationRequested)
                return;
            // Get the listener that handles the client request.
            var listener = (TcpListener)ar.AsyncState;

            // End the operation
            var client = listener.EndAcceptTcpClient(ar);

            client.ReceiveTimeout = TimingConstants.ClientCommunicationTimeout;
            client.SendTimeout = TimingConstants.ClientCommunicationTimeout;
            writer.Log(new LogItem("New client is coming!", ((IPEndPoint)client.Client.RemoteEndPoint).Address.ToString()));
            try
            {
                var currentClient = new ClientThread(client, writer, reader);
                //
                Task.Run(() => currentClient.Execute(ct), ct);
            }
            catch (Exception e)
            {
                writer.Log(new LogItem("Server got an exception when client arrived: " + e.Message, "no ip"));
            }

            // Signal the calling thread to continue.
            _tcpClientConnected.Set();
        }
开发者ID:AndreyRepko,项目名称:BBrother,代码行数:28,代码来源:ServerMainThread.cs


示例18: Serialize

 public override void Serialize(IDataWriter writer)
 {
     writer.WriteInt(entityId);
     writer.WriteInt(elemId);
     writer.WriteShort(skillId);
     writer.WriteShort(duration);
 }
开发者ID:Torf,项目名称:BehaviorIsManaged,代码行数:7,代码来源:InteractiveUsedMessage.cs


示例19: Serialize

 public override void Serialize(IDataWriter writer)
 {
     writer.WriteDouble(mountUid);
     writer.WriteSByte(mountLocation);
     writer.WriteInt(mountFoodUid);
     writer.WriteInt(quantity);
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:7,代码来源:MountFeedRequestMessage.cs


示例20: Serialize

 public override void Serialize(IDataWriter writer)
 {
     base.Serialize(writer);
     writer.WriteByte(position);
     writer.WriteInt(spellId);
     writer.WriteSByte(spellLevel);
 }
开发者ID:Geraff,项目名称:BehaviorIsManaged,代码行数:7,代码来源:SpellItem.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IDatabase类代码示例发布时间:2022-05-24
下一篇:
C# IDataTable类代码示例发布时间: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