public class MyService : IMyService { // this is a standard custom event public event MyHostEventHandler MyHostEvent = delegate { }; //-------------------------------------------------------------------------------- public void SendStatusMessage(string msg) { MyHostEvent(this, new MyHostEventArgs(msg, DateTime.Now)); } //-------------------------------------------------------------------------------- public void SendStatusMessage(string msg, DateTime datetime) { MyHostEvent(this, new MyHostEventArgs(msg, datetime)); } }
SingletonInstance
[ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)