using System; using System.ServiceModel; using DistributedGA.Core.Domain; using DistributedGA.Core.Interface; namespace DistributedGA.Core.Implementation { [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] public class MessageContractImpl : IMessageContract { public void SendData(PeerInfo sender, byte[] data) { MessageRecieveEventArgs args = new MessageRecieveEventArgs() { Sender = sender, data = data }; if (MessageRecieved != null) { MessageRecieved(this, args); } } public event EventHandler MessageRecieved; } }