private void InitializeWebSocket()
        {
            var url    = ConfigurationManager.AppSettings["server"];
            var client = new ch.hsr.wpf.gadgeothek.websocket.WebSocketClient(url);

            client.NotificationReceived += (o, e) =>
            {
                if (e.Notification.Target == typeof(Loan).Name.ToLower())
                {
                    FillData();
                }
            };
            client.ListenAsync();
        }
        public void initWebSocket()
        {
            // web socket connection to listen to changes:
            var client = new ch.hsr.wpf.gadgeothek.websocket.WebSocketClient(serverUrl);

            client.NotificationReceived += (o, e) =>
            {
                // demonstrate how these updates could be further used
                if (e.Notification.Target == typeof(Gadget).Name.ToLower())
                {
                    setData();
                }
            };
            // spawn a new background thread in which the websocket client listens to notifications from the server
            client.ListenAsync();
        }