コード例 #1
0
 public void Release(ListUpgrade type, AgentRemote agent)
 {
     if (AgentPools.TryGetValue(type.GetHashCode(), out Pooling <AgentRemote> pool))
     {
         pool.Release(agent);
     }
     else
     {
         CreatePool(type).Release(agent);
     }
 }
コード例 #2
0
 public AgentRemote GetItem(ListUpgrade type)
 {
     if (AgentPools.TryGetValue(type.GetHashCode(), out Pooling <AgentRemote> pool))
     {
         return(pool.GetItem());
     }
     else
     {
         return(CreatePool(type).GetItem());
     }
 }