利用插件整理代码,排序和移除不需要的引用。小心.Net2/.Net4的兼容问题
nnhy authored at 2012-12-08 10:14:21
949.00 B
X
using System;
using System.Xml.Serialization;

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

        //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
    }
}