Click here to Skip to main content
15,891,136 members
Articles / Desktop Programming / Windows Forms

Windows Services Made Simple

Rate me:
Please Sign up or sign in to vote.
4.62/5 (10 votes)
27 Jun 2007CPOL10 min read 94.5K   6.9K   69  
Describes how to build a Windows Service using the Pegasus Library.
using System;
using System.Collections.Generic;
using System.Text;

namespace Pegasus.ServiceModel
{
	/// <summary>
	/// Event Args for broadcast and private messages events.
	/// </summary>
	public class EventArgsMessage : EventArgs
	{
		// Local Instance Values
		private string m_sender;
		private object m_message;

		/// <summary>
		/// Initializes a new instance of the <see cref="EventArgsMessage"/> class.
		/// </summary>
		/// <param name="sender">The name of the node that sent the message.</param>
		/// <param name="message">The message.</param>
		internal EventArgsMessage( string sender, object message )
		{
			m_sender = sender;
			m_message = message;
		}

		/// <summary>
		/// Gets the name of the node that sent the message.
		/// </summary>
		/// <value>The name of the node that sent the message.</value>
		public string Name
		{
			get
			{
				return m_sender;
			}
		}

		/// <summary>
		/// Gets the message.
		/// </summary>
		/// <value>The message.</value>
		public object Message
		{
			get
			{
				return m_message;
			}
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions