예제 #1
0
파일: HMIService.cs 프로젝트: memmm/WCF-HMI
        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);
                }
            }
        }
예제 #2
0
파일: HMIService.cs 프로젝트: memmm/WCF-HMI
        public void Unsubscribe()
        {
            IHMIserviceCallback subscriber = OperationContext.Current.GetCallbackChannel <IHMIserviceCallback>();

            m_Event1 -= subscriber.DataChanged;
        }