private NpgsqlConnectionString(NpgsqlConnectionString Other) { connection_string = Other.connection_string; connection_string_values = new ListDictionary(CaseInsensitiveComparer.Default); foreach (DictionaryEntry DE in Other.connection_string_values) { connection_string_values.Add(DE.Key, DE.Value); } }
/// <summary> /// Initializes a new instance of the /// <see cref="Npgsql.NpgsqlConnection">NpgsqlConnection</see> class /// and sets the <see cref="Npgsql.NpgsqlConnection.ConnectionString">ConnectionString</see>. /// </summary> /// <param name="ConnectionString">The connection used to open the PostgreSQL database.</param> public NpgsqlConnection(String ConnectionString) { NpgsqlEventLog.LogMethodEnter(LogLevel.Debug, CLASSNAME, CLASSNAME, "NpgsqlConnection()"); connection_string = NpgsqlConnectionString.ParseConnectionString(ConnectionString); LogConnectionString(); NoticeDelegate = new NoticeEventHandler(OnNotice); NotificationDelegate = new NotificationEventHandler(OnNotification); CertificateValidationCallbackDelegate = new CertificateValidationCallback(DefaultCertificateValidationCallback); CertificateSelectionCallbackDelegate = new CertificateSelectionCallback(DefaultCertificateSelectionCallback); PrivateKeySelectionCallbackDelegate = new PrivateKeySelectionCallback(DefaultPrivateKeySelectionCallback); }
/// <summary> /// Constructor. /// </summary> /// <param name="Shared">Controls whether the connector can be shared.</param> public NpgsqlConnector(NpgsqlConnectionString ConnectionString, bool Pooled, bool Shared) { this.ConnectionString = ConnectionString; _connection_state = ConnectionState.Closed; _pooled = Pooled; _shared = Shared; _isInitialized = false; _state = NpgsqlClosedState.Instance; _mediator = new NpgsqlMediator(); _oidToNameMapping = new NpgsqlBackendTypeMapping(); _planIndex = 0; _portalIndex = 0; _notificationThreadStopCount = 1; _notificationAutoResetEvent = new AutoResetEvent(true); }
/// <summary> /// Constructor. /// </summary> /// <param name="Shared">Controls whether the connector can be shared.</param> public NpgsqlConnector(NpgsqlConnectionString ConnectionString, bool Pooled, bool Shared) { this.ConnectionString = ConnectionString; _connection_state = ConnectionState.Closed; _pooled = Pooled; _shared = Shared; _isInitialized = false; _state = NpgsqlClosedState.Instance; _mediator = new NpgsqlMediator(); _oidToNameMapping = new NpgsqlBackendTypeMapping(); _planIndex = 0; _portalIndex = 0; }