Free cookie consent management tool by TermsFeed Policy Generator

source: branches/thasling/DistributedGA/DistributedGA.Core/Implementation/MessageContractImpl.cs @ 13524

Last change on this file since 13524 was 13524, checked in by thasling, 8 years ago

Upload des Projekts letztendlich, trotz buggendes Clients...

File size: 841 bytes
Line 
1using DistributedGA.Core.Domain;
2using DistributedGA.Core.Interface;
3using System;
4using System.Collections.Generic;
5using System.Linq;
6using System.ServiceModel;
7using System.Text;
8using System.Threading.Tasks;
9
10namespace DistributedGA.Core.Implementation
11{
12    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
13    public class MessageContractImpl : IMessageContract
14    {
15        public void SendPopulation(PeerInfo sender, SolutionInfo[] population)
16        {
17            MessageRecieveEventArgs args = new MessageRecieveEventArgs() { Sender = sender, Population = population };
18
19            if (MessageRecieved != null)
20            {
21                MessageRecieved(this, args);
22            }
23        }
24
25        public event EventHandler<MessageRecieveEventArgs> MessageRecieved;
26    }
27}
Note: See TracBrowser for help on using the repository browser.