Ejemplo n.º 1
0
        public Agent(string NodeId, string AgentId, string AgentPath, Illuminate.Communication.Communicator Com)
        {
            _com = Com;
            _nodeId = NodeId;
            _agentId = _nodeId + "_" + AgentId;
            _agentPath = AgentPath;
            _sectionName = AgentId;

            #region Get Agent Filename

            string tempPath = _agentPath;
            tempPath = tempPath.Replace("\\", "/");
            string[] pathParts = tempPath.Split('/');
            _agentType = pathParts[pathParts.Length - 1];

            #endregion

            #region Get Log Name

            if (_agentId.Contains("Monitor") || _agentId.Contains("Manager"))
            {
                LOGNAME = _agentId;
            }
            else
            {
                LOGNAME = _agentId + "_" + _agentType;
            }

            #endregion
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="LockEvent">Shared lock object to manage lock synchronization</param>
 /// <param name="NodeId">The ID of the Node</param>
 public AgentCollection(string NodeId)
 {
     _nodeId = NodeId;
     _com = new Illuminate.Communication.Communicator();
     _com.OnDataOut += new Illuminate.Communication.Communicator.OnDataOutDelegate(RunCommand);
 }