📄 messages.cs
字号:
using System;
using System.Collections;
namespace Com.SMS.Entity
{
#region Message
/// <summary>
/// Message object for NHibernate mapped table 'Messages'.
/// </summary>
public class Message
{
#region Member Variables
protected int _msgId;
protected string _content;
protected string _sender;
protected string _recive;
protected DateTime _sendTime;
#endregion
#region Constructors
public Message() { }
public Message( string content, string sender, string recive, DateTime sendTime )
{
this._content = content;
this._sender = sender;
this._recive = recive;
this._sendTime = sendTime;
}
#endregion
#region Public Properties
public int MsgId
{
get {return _msgId;}
set {_msgId = value;}
}
public string Content
{
get { return _content; }
set
{
if ( value != null && value.Length > 140)
throw new ArgumentOutOfRangeException("Invalid value for Content", value, value.ToString());
_content = value;
}
}
public string Sender
{
get { return _sender; }
set
{
if ( value != null && value.Length > 30)
throw new ArgumentOutOfRangeException("Invalid value for Sender", value, value.ToString());
_sender = value;
}
}
public string Recive
{
get { return _recive; }
set
{
if ( value != null && value.Length > 30)
throw new ArgumentOutOfRangeException("Invalid value for Recive", value, value.ToString());
_recive = value;
}
}
public DateTime SendTime
{
get { return _sendTime; }
set { _sendTime = value; }
}
#endregion
}
#endregion
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -