Example #1
0
 /// <summary>
 /// Called when an interface property is changed
 /// </summary>
 /// <param name="domain">domain</param>
 /// <param name="source">source</param>
 /// <param name="description">description</param>
 /// <param name="propertyPath">property path</param>
 /// <param name="propertyValue">property value</param>
 protected virtual void OnInterfacePropertyChanged(string domain, string source, string description, string propertyPath, object propertyValue)
 {
     if (this.InterfacePropertyChanged != null)
     {
         var args = new InterfacePropertyChangedEventArgs(domain, source, description, propertyPath, propertyValue);
         this.InterfacePropertyChanged(this, args);
     }
 }
Example #2
0
 public void OnInterfacePropertyChanged(object sender, InterfacePropertyChangedEventArgs args)
 {
     if (sseEventBuffer.Count > sseEventBufferSize)
     {
         sseEventBuffer.RemoveRange(0, sseEventBuffer.Count - sseEventBufferSize);
     }
     sseEventBuffer.Add(new SseEvent(args.EventData));
     // dirty work around for signaling new event and
     // avoiding locks on long socket timetout
     lock (sseEventToken)
         Monitor.PulseAll(sseEventToken);
 }
 public void OnInterfacePropertyChanged(object sender, InterfacePropertyChangedEventArgs args)
 {
     if (webSocketServer != null && webSocketServer.IsListening)
     {
         WebSocketServiceHost host;
         webSocketServer.WebSocketServices.TryGetServiceHost("/events", out host);
         if (host == null)
         {
             return;
         }
         host.Sessions.BroadcastAsync(MigService.JsonSerialize(args.EventData), () => {});
     }
 }
 public void OnInterfacePropertyChanged(object sender, InterfacePropertyChangedEventArgs args)
 {
     wsocketServer.WebSocketServices.Broadcast(MigService.JsonSerialize(args.EventData));
 }
Example #5
0
        public void OnInterfacePropertyChanged(object sender, InterfacePropertyChangedEventArgs args)
        {
            UTF8Encoding encoding = new UTF8Encoding();

            server.SendAll(encoding.GetBytes(MigService.JsonSerialize(args)));
        }
 protected virtual void OnInterfacePropertyChanged(string domain, string source, string description, string propertyPath, object propertyValue)
 {
     if (InterfacePropertyChanged != null)
     {
         var args = new InterfacePropertyChangedEventArgs(domain, source, description, propertyPath, propertyValue);
         InterfacePropertyChanged(this, args);
     }
 }
 public void OnInterfacePropertyChanged(object sender, InterfacePropertyChangedEventArgs args)
 {
     wsocketServer.WebSocketServices.Broadcast(MigService.JsonSerialize(args.EventData));
 }
 public void OnInterfacePropertyChanged(object sender, InterfacePropertyChangedEventArgs args)
 {
     if (PropertyChanged != null)
     {
         new Thread(() =>
         {
             PropertyChanged(this, args);
         }).Start();
         //ThreadPool.QueueUserWorkItem(new WaitCallback((state) => {
         //    PropertyChanged(this, args);
         //}));
     }
 }
 public void OnInterfacePropertyChanged(object sender, InterfacePropertyChangedEventArgs args)
 {
     UTF8Encoding encoding = new UTF8Encoding();
     server.SendAll(encoding.GetBytes(MigService.JsonSerialize(args)));
 }
 public void OnInterfacePropertyChanged(object sender, InterfacePropertyChangedEventArgs args)
 {
     if (sseEventBuffer.Count > sseEventBufferSize)
     {
         sseEventBuffer.RemoveRange(0, sseEventBuffer.Count - sseEventBufferSize);
     }
     sseEventBuffer.Add(new SseEvent(args.EventData));
     // dirty work around for signaling new event and 
     // avoiding locks on long socket timetout
     lock (sseEventToken)
         Monitor.PulseAll(sseEventToken);
 }
Example #11
0
 private static void MigInterface_InterfacePropertyChanged(object sender, InterfacePropertyChangedEventArgs args)
 {
     Console.WriteLine(args.EventData.Source + " : " + args.EventData.Value);
 }