chatmessagereceivedeventargs.cs

来自「这个版本(InteliIM Open Kernel Release 2)是目前最」· CS 代码 · 共 89 行

CS
89
字号
#region Using Directives

using System; 

#endregion

namespace Org.InteliIM.Applications.Messenger.Conversations
{
	/// <summary>
	/// Provides data for the ChatMessageReceived event.
	/// </summary>
	public class ChatMessageReceivedEventArgs : EventArgs
	{
		/// <summary>
		/// Initializes a new instance of the ChatMessageReceivedEventArgs class.
		/// </summary>
		/// <param name="from"></param>
		/// <param name="conversationId"></param>
		/// <param name="message"></param>
		public ChatMessageReceivedEventArgs(string from, string conversationId, ChatContent message)
		{
			this.From = from;
			this.ConversationId = conversationId;
			this.ChatContent = message;
		}

		private string from;

		/// <summary>
		/// Gets or sets the sender.
		/// </summary>
		public string From
		{
			get
			{
				if (this.from == null)
					this.from = "";

				return from;
			}
			set
			{
				from = value;
			}
		}

		private string conversationId;
		
		/// <summary>
		/// Gets or sets the conversation id.
		/// </summary>
		public string ConversationId
		{
			get
			{
				if(this.conversationId == null)
					this.conversationId ="";
				
				return this.conversationId;
			}
			set
			{
				this.conversationId = value;
			}
		}

		private ChatContent chatContent;

		/// <summary>
		/// Gets or sets the chat content.
		/// </summary>
		public ChatContent ChatContent
		{
			get
			{
				if(this.chatContent == null)
					this.chatContent = new ChatContent();

				return this.chatContent;
			}
			set
			{
				this.chatContent = value;
			}
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?