Esempio n. 1
0
        public void RemoveNode(SmsNode nodeToRemove)
        {
            var node = _nodeList.Find(n => n.Equals($"{nodeToRemove.Host.Trim().ToUpper()}{Delimiter}{nodeToRemove.Port}"));

            if (node == null)
            {
                return;
            }

            _nodeList.Remove($"{nodeToRemove.Host.Trim().ToUpper()}{Delimiter}{nodeToRemove.Port}");
            _ptLogger.LogInfo($"{nodeToRemove.Host.Trim().ToUpper()}{Delimiter}{nodeToRemove.Port} was removed");
        }
Esempio n. 2
0
        public void AddNode(SmsNode newNode)
        {
            var node = _nodeList.Find(n => n.Equals($"{newNode.Host.Trim().ToUpper()}{Delimiter}{newNode.Port}"));

            if (node != null)
            {
                return;
            }

            _nodeList.Add($"{newNode.Host.Trim().ToUpper()}:{newNode.Port}");
            _ptLogger.LogInfo($"{newNode.Host.Trim().ToUpper()}:{newNode.Port} was added");
        }