internal static SmppInternalConnection GetConnection(SmppSettings Settings) { SmppShare share; if (Deactivated) { throw new SmppException("The SmppPoolManager is in process of deactivation"); } if (Pools == null) { Initialize(); } string connectionString = Settings.ConnectionString; lock (Pools.SyncRoot) { if (!Pools.Contains(connectionString)) { share = new SmppShare(Settings); Pools.Add(connectionString, share); } else { share = Pools[connectionString] as SmppShare; share.Settings = Settings; } } return(share.GetConnection()); }
internal static SmppInternalConnection GetConnection(SmppSettings Settings) { SmppShare share; if (Deactivated) throw new SmppException("The SmppPoolManager is in process of deactivation"); if (Pools == null) Initialize(); string connectionString = Settings.ConnectionString; lock (Pools.SyncRoot) { if (!Pools.Contains(connectionString)) { share = new SmppShare(Settings); Pools.Add(connectionString, share); } else { share = Pools[connectionString] as SmppShare; share.Settings = Settings; } } return share.GetConnection(); }