Exemple #1
0
 public void Register(AgentInfo agentInfo)
 {
     _agentRepository.AddAsync(new AgentEntity
     {
         //AgentId = 0,
         AgentUrl = agentInfo.AgentAddress
     });
 }
Exemple #2
0
        /// <summary>
        /// 创建代理
        /// </summary>
        private async Task <Agent> AddAgent(Agent agent)
        {
            var maxCode = await AgentRepository.GetMaxCode();

            agent.Init();
            agent.SetCode(maxCode);
            agent.SetAgentPath(await GetCurrentAgentAsync());
            await AgentRepository.AddAsync(agent);

            return(agent);
        }