private static ConcurrentDictionary<Guid, string> dictDbNames = new ConcurrentDictionary<Guid, string>(); 添加: dictDbNames.TryAdd(Id, dbName); 取值 dictDbNames[Id] 判断是否存在 dictDbNames.ContainsKey(Id)
private static ConcurrentDictionary<Guid, string> dictDbNames = new ConcurrentDictionary<Guid, string>(); 添加: dictDbNames.TryAdd(Id, dbName); 取值 dictDbNames[Id] 判断是否存在 dictDbNames.ContainsKey(Id)