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

C# IValueWriter类代码示例

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

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



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

示例1: WritePayload

        public override void WritePayload(IValueWriter writerm)
        {
            writerm.WriteUInt32(this.NetworkID);
            writerm.WriteString(this.CharacterName);

            writerm.WriteByte((byte)this.Action);
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:7,代码来源:PlayerUpdateMessage.cs


示例2: WritePayload

 public override void WritePayload(ISerializationContext context, IValueWriter writer)
 {
     using (var ms = new MemoryStream())
     {
         ScreenFrame.Save(ms, ImageFormat.Png);
         writer.WriteBytes(ms.GetBuffer());
     }
 }
开发者ID:erpframework,项目名称:screenshare,代码行数:8,代码来源:ScreenFrameResponseMessage.cs


示例3: WritePayload

		public override void WritePayload (ISerializationContext context, IValueWriter writer)
		{
			if (writer.WriteBool (SenderId != null))
				writer.WriteString (SenderId);

			writer.WriteInt32 (GroupId);
			writer.WriteString (Text);
		}
开发者ID:ermau,项目名称:Tempest.Social,代码行数:8,代码来源:TextMessage.cs


示例4: WritePayload

 public override void WritePayload(IValueWriter writer)
 {
     base.WritePayload(writer);
     writer.WriteBytes(InternalOwnEndPoint.Address.GetAddressBytes());
     writer.WriteInt32(InternalOwnEndPoint.Port);
     writer.WriteBytes(ExternalPeerEndPoint.Address.GetAddressBytes());
     writer.WriteInt32(ExternalPeerEndPoint.Port);
 }
开发者ID:dishiyicijinqiu,项目名称:tcp-holepunching,代码行数:8,代码来源:RequestIntroducerIntroductionMessage.cs


示例5: Write

 public void Write(IValueWriter writer)
 {
     writer.Write(_grhIndexValueKey, GrhIndex);
     writer.Write(_sourceValueKey, SourceName);
     writer.Write(_destValueKey, DestName);
     writer.Write(_offsetValueKey, Offset);
     writer.Write(_originValueKey, Origin);
 }
开发者ID:wtfcolt,项目名称:game,代码行数:8,代码来源:SkeletonBodyItemInfo.cs


示例6: WritePayload

        public override void WritePayload(IValueWriter writer)
        {
            if (String.IsNullOrEmpty (this.Password))
                throw new InvalidOperationException ("Can not login without a password.");

            writer.WriteString (Username);
            writer.WriteString (Password);
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:8,代码来源:LoginMessage.cs


示例7: Serialize

        public void Serialize(IValueWriter writer)
        {
            writer.WriteBool (this.NonCharacter);
            writer.WriteInt32 (this.PlayerID);

            writer.WriteInt32 (this.path.Count);
            foreach(Directions dir in this.path)
                writer.WriteInt32 ((int) dir);
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:9,代码来源:ApplyMovementCommand.cs


示例8: WritePayload

        public override void WritePayload(ISerializationContext context, IValueWriter writer)
        {
            writer.WriteInt32 (Entities.Count);

            foreach (SnapshotEntity sentity in Entities)
            {
                WriteEntity (sentity.Entity, context, writer);
            }
        }
开发者ID:NullSoldier,项目名称:Cinco,代码行数:9,代码来源:EntitySnapshotMessage.cs


示例9: WritePayload

        public override void WritePayload(IValueWriter writer)
        {
            writer.WriteUInt32 (this.NetworkID);

            writer.WriteInt32 (this.X);
            writer.WriteInt32 (this.Y);
            writer.WriteInt32 (this.Direction);

            writer.WriteString (this.Animation);
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:10,代码来源:ServerMovementMessage.cs


示例10: WritePayload

        public override void WritePayload(IValueWriter writer)
        {
            writer.WriteInt32 (this.EventCommands.Count);

            foreach(IEventCommand command in this.EventCommands)
            {
                writer.WriteInt32 ((int) command.Command);
                command.Serialize (writer);
            }
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:10,代码来源:ServerEventMessage.cs


示例11: NetworkServerConnection

 internal NetworkServerConnection(NetworkServerConnectionProvider provider, uint nid, TcpClient tcp, IPEndPoint endPoint, IValueWriter uwriter)
 {
     this.NetworkId = nid;
     this.Tcp = tcp;
     this.ReliableStream = tcp.GetStream ();
     this.provider = provider;
     this.EndPoint = endPoint;
     this.UnreliableWriter = uwriter;
     this.ReliableReader = new StreamValueReader (ReliableStream);
     this.ReliableWriter = new StreamValueWriter (ReliableStream);
 }
开发者ID:NullSoldier,项目名称:Valkyrie,代码行数:11,代码来源:NetworkServerConnection.cs


示例12: WriteState

        /// <summary>
        /// Writes the state of the object to an <see cref="IValueWriter"/>.
        /// </summary>
        /// <param name="writer">The <see cref="IValueWriter"/> to write the values to.</param>
        public void WriteState(IValueWriter writer)
        {
            PersistableHelper.Write(this, writer);

            // Equipped bodies

            Debug.Assert(_equippedBodies.Count <= byte.MaxValue);

            writer.Write("EquippedBodiesCount", (byte)_equippedBodies.Count);

            for (var i = 0; i < _equippedBodies.Count; i++)
            {
                writer.Write("EquippedBody_" + i, _equippedBodies[i]);
            }
        }
开发者ID:wtfcolt,项目名称:game,代码行数:19,代码来源:AccountCharacterInfo.cs


示例13: WriteCustomValues

 /// <summary>
 /// When overridden in the derived class, writes all custom state values to the <paramref name="writer"/>.
 /// </summary>
 /// <param name="writer">The <see cref="IValueWriter"/> to write the state values to.</param>
 protected override void WriteCustomValues(IValueWriter writer)
 {
     writer.Write("SerializedValue", SerializedValue);
 }
开发者ID:wtfcolt,项目名称:game,代码行数:8,代码来源:ParticleModifierTests.cs


示例14: Write

 /// <summary>
 /// Writes the <see cref="ColumnSchema"/>.
 /// </summary>
 /// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
 public void Write(IValueWriter writer)
 {
     var v = _values.OrderBy(x => x.Key).ToArray();
     writer.WriteManyNodes(_valuesNodeName, v, WriteKVP);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:9,代码来源:ColumnSchema.cs


示例15: Write

        /// <summary>
        /// Writes the <see cref="Skeleton"/> to an <see cref="IValueWriter"/>.
        /// </summary>
        /// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
        /// <exception cref="ArgumentNullException"><paramref name="writer" /> is <c>null</c>.</exception>
        public void Write(IValueWriter writer)
        {
            if (writer == null)
                throw new ArgumentNullException("writer");

            writer.WriteManyNodes(_nodesNodeName, RootNode.GetAllNodes(), ((w, item) => item.Write(w)));
        }
开发者ID:wtfcolt,项目名称:game,代码行数:12,代码来源:Skeleton.cs


示例16: Serialize

 internal void Serialize(IValueWriter writer)
 {
     writer.WriteInt32 (this.UserId);
     writer.WriteByte ((byte)this.ResultState);
 }
开发者ID:NullSoldier,项目名称:Valkyrie,代码行数:5,代码来源:LoginResult.cs


示例17: SoundID

        /// <summary>
        /// Writes the state of the object to an <see cref="IValueWriter"/>.
        /// </summary>
        /// <param name="writer">The <see cref="IValueWriter"/> to write the values to.</param>
        void IPersistable.WriteState(IValueWriter writer)
        {
            PersistableHelper.Write(this, writer);
            /*
            writer.Write(_keyID, ID);

            writer.Write(_keyHasSound, Sound.HasValue);
            writer.Write(_keySoundID, (Sound.HasValue ? Sound.Value : new SoundID(0)));

            writer.Write(_keyScript, Script);
            writer.Write(_keyGrhIndex, GrhIndex);
            writer.Write(_keyParticleEffect, ParticleEffect);*/
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:17,代码来源:ActionDisplay.cs


示例18: WriteCustomValues

 /// <summary>
 /// When overridden in the derived class, writes all custom state values to the <paramref name="writer"/>.
 /// </summary>
 /// <param name="writer">The <see cref="IValueWriter"/> to write the state values to.</param>
 protected override void WriteCustomValues(IValueWriter writer)
 {
     writer.Write(_positionKeyName, Position);
     writer.Write(_radiusKeyName, Radius);
     writer.Write(_strengthKeyName, Strength);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:10,代码来源:ParticleRadialGravityModifier.cs


示例19: WriteKVP

 static void WriteKVP(IValueWriter writer, KeyValuePair<string, string> value)
 {
     writer.Write(_keyValueName, value.Key);
     writer.Write(_valueValueName, value.Value ?? string.Empty);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:5,代码来源:ColumnSchema.cs


示例20: Write

        /// <summary>
        /// Writes the <see cref="NPCChatDialogBase"/>'s values to an <see cref="IValueWriter"/>.
        /// </summary>
        /// <param name="writer"><see cref="IValueWriter"/> to write the values to.</param>
        public void Write(IValueWriter writer)
        {
            var items = GetDialogItems();

            writer.Write(_nodeValueKeyID, ID);
            writer.Write(_nodeValueKeyTitle, Title);
            writer.WriteManyNodes(_nodeValueKeyItems, items, ((w, item) => item.Write(w)));
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:12,代码来源:NPCChatDialogBase.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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