必须填写至少10个字的日志
nnhy authored at 2012-07-27 18:48:21
0.98 KiB
X
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace NewLife.Messaging
{
    /// <summary>字符串消息。封装一个字符串,UTF8编码。</summary>
    public class StringMessage : Message
    {
        /// <summary>消息类型</summary>
        [XmlIgnore]
        public override MessageKind Kind { get { return MessageKind.Data; } }

        //private Int32 _Length;
        ///// <summary>长度</summary>
        //public Int32 Length { get { return _Length; } set { _Length = value; } }

        private String _Value;
        /// <summary>字符串</summary>
        public String Value { get { return _Value; } set { _Value = value; } }

        #region 辅助
        /// <summary>已重载。</summary>
        /// <returns></returns>
        public override string ToString()
        {
            return String.Format("{0} {1}", base.ToString(), Value);
        }
        #endregion
    }
}