private void UpdateAgentNodeId(int agentId, int nodeId, IInformationServiceProxy2 proxy)
        {
            AgentInfo agentInfo = this._agentInfoDal.GetAgentInfo(agentId);

            if (agentInfo != null)
            {
                ((IInformationServiceProxy)proxy).Update(agentInfo.get_Uri(), (IDictionary <string, object>) new Dictionary <string, object>()
                {
                    {
                        "NodeId",
                        (object)nodeId
                    }
                });
            }
            else
            {
                AgentManager.log.WarnFormat("Agent Id={0} not found.", (object)agentId);
            }
        }
 public void ResetAgentNodeId(int nodeId)
 {
     using (SwisConnectionProxyFactory connectionProxyFactory = new SwisConnectionProxyFactory())
     {
         using (IInformationServiceProxy2 iinformationServiceProxy2 = connectionProxyFactory.Create())
         {
             AgentInfo agentInfoByNode = this._agentInfoDal.GetAgentInfoByNode(nodeId);
             if (agentInfoByNode != null)
             {
                 ((IInformationServiceProxy)iinformationServiceProxy2).Update(agentInfoByNode.get_Uri(), (IDictionary <string, object>) new Dictionary <string, object>()
                 {
                     {
                         "NodeId",
                         (object)nodeId
                     }
                 });
             }
             else
             {
                 AgentManager.log.WarnFormat("Agent for NodeId={0} not found", (object)nodeId);
             }
         }
     }
 }