private object ProcessRequest(object res, object state) { var message = utility.DeserializeFromObject <NotificationMessage>(res); if (message == null) { return(null); } iconState = (message.TurnOn) ? IconState.On : IconState.Off; if (iconState == IconState.On) { ni.Icon = onIcon; var title = message.WindowsNotification.Title; var text = message.WindowsNotification.Text; windowsNotificationService.ShowNotification(title, text); } else { ni.Icon = offIcon; } return(null); }
private PingResponse HandlePing(object res, object state) { var pingReq = utility.DeserializeFromObject <PingRequest>(res); if (pingReq == null) { return(null); } var pingResponse = new PingResponse { Address = networkService.GetIpString(), }; return(pingResponse); }