Exemplo n.º 1
0
        public bool UnRegisterNode(NodeId nodeIdForUnregister)
        {
            try
            {
                var response = _session.UnregisterNodes(null, new NodeIdCollection()
                {
                    nodeIdForUnregister
                });

                if (!ServiceResult.IsGood(response.ServiceResult))
                {
                    return(false);
                }
                _registeredNodes.Remove(nodeIdForUnregister);
                return(true);
            }
            catch (Exception e)
            {
                Utils.Trace(Utils.TraceMasks.Error, $"{e.Message}");
                return(false);
            }
        }