Пример #1
0
 public Property(NetworkTable table, string key)
 {
     Entry          = table.GetEntry(key);
     Listener       = new NtEntryListener(0);
     Update         = null;
     CreateListener = null;
 }
Пример #2
0
 public void StopListener()
 {
     if (Entry.IsValid && Listener.Get() != 0)
     {
         Entry.RemoveListener(Listener);
         Listener = new NtEntryListener(0);
     }
 }
Пример #3
0
 public void StartListener()
 {
     entryListener = instance.AddEntryListener("", (in RefEntryNotification notification) =>
     {
         if (notification.Flags.HasFlag(NotifyFlags.New))
         {
             NewEntry?.Invoke(notification.Name, notification.Entry, notification.Value.ToValue());
         }
         else if (notification.Flags.HasFlag(NotifyFlags.Delete))
         {
             DeletedEntry?.Invoke(notification.Name);
         }
     }, NotifyFlags.New | NotifyFlags.Delete | NotifyFlags.Immediate | NotifyFlags.Local);
Пример #4
0
 public void NT_RemoveEntryListener(NtEntryListener entry_listener)
 {
     Native_NT_RemoveEntryListener(entry_listener);
 }
Пример #5
0
 private static extern void Native_NT_RemoveEntryListener(NtEntryListener entry_listener);