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


C# IValueWriter类代码示例

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


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


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