public void Connect() { IHMIserviceCallback proxyToClient = OperationContext.Current.GetCallbackChannel <IHMIserviceCallback>(); //Check if user already connected if (!clientList.Contains(proxyToClient)) { clientList.Add(proxyToClient); foreach (var user in clientList) { user.NewClientConnected(clientList.Count); } } }
public void Unsubscribe() { IHMIserviceCallback subscriber = OperationContext.Current.GetCallbackChannel <IHMIserviceCallback>(); m_Event1 -= subscriber.DataChanged; }