Пример #1
0
        private static void UnregisterCaseWatcher(Case @case)
        {
            CaseWatcher watcher = GetCaseWatcher(@case.Token);

            if (watcher == null)
            {
                return;
            }
            watcher.Dispose();
            CaseWatchers.Remove(watcher.Token);
        }
Пример #2
0
        private static void RegisterCaseWatcher(Case @case, String initPath, Action initCallback)
        {
            if (CaseWatchers.ContainsKey(@case.Token))
            {
                return;
            }
            CaseWatcher watcher = new CaseWatcher(@case);

            watcher.Register(initPath, initCallback);
            CaseWatchers.Add(@case.Token, watcher);
        }
Пример #3
0
        internal static void UnregisterPath(Guid token, String path)
        {
            CaseWatcher watcher = GetCaseWatcher(token);

            watcher?.Unregister(path);
        }
Пример #4
0
        internal static void RegisterPath(Guid token, String path, Action callback)
        {
            CaseWatcher watcher = GetCaseWatcher(token);

            watcher?.Register(path, callback);
        }