/// <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()"); NpgsqlConnectionStringBuilder builder = cache[ConnectionString]; if (builder == null) { settings = new NpgsqlConnectionStringBuilder(ConnectionString); } else { settings = builder.Clone(); } LogConnectionString(); NoticeDelegate = new NoticeEventHandler(OnNotice); NotificationDelegate = new NotificationEventHandler(OnNotification); ProvideClientCertificatesCallbackDelegate = new ProvideClientCertificatesCallback(DefaultProvideClientCertificatesCallback); CertificateValidationCallbackDelegate = new CertificateValidationCallback(DefaultCertificateValidationCallback); CertificateSelectionCallbackDelegate = new CertificateSelectionCallback(DefaultCertificateSelectionCallback); PrivateKeySelectionCallbackDelegate = new PrivateKeySelectionCallback(DefaultPrivateKeySelectionCallback); // Fix authentication problems. See https://bugzilla.novell.com/show_bug.cgi?id=MONO77559 and // http://pgfoundry.org/forum/message.php?msg_id=1002377 for more info. RSACryptoServiceProvider.UseMachineKeyStore = true; promotable = new NpgsqlPromotableSinglePhaseNotification(this); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (!disposing) { return; } this._ServerCertValidation = (CertificateValidationCallback)null; this._ClientCertSelection = (CertificateSelectionCallback)null; this._PrivateKeySelection = (PrivateKeySelectionCallback)null; this._ServerCertValidation2 = (CertificateValidationCallback2)null; }
/// <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); }
private void Init() { NoticeDelegate = new NoticeEventHandler(OnNotice); NotificationDelegate = new NotificationEventHandler(OnNotification); ProvideClientCertificatesCallbackDelegate = new ProvideClientCertificatesCallback(DefaultProvideClientCertificatesCallback); CertificateValidationCallbackDelegate = new CertificateValidationCallback(DefaultCertificateValidationCallback); CertificateSelectionCallbackDelegate = new CertificateSelectionCallback(DefaultCertificateSelectionCallback); PrivateKeySelectionCallbackDelegate = new PrivateKeySelectionCallback(DefaultPrivateKeySelectionCallback); ValidateRemoteCertificateCallbackDelegate = new ValidateRemoteCertificateCallback(DefaultValidateRemoteCertificateCallback); // Fix authentication problems. See https://bugzilla.novell.com/show_bug.cgi?id=MONO77559 and // http://pgfoundry.org/forum/message.php?msg_id=1002377 for more info. RSACryptoServiceProvider.UseMachineKeyStore = true; promotable = new NpgsqlPromotableSinglePhaseNotification(this); }
/// <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()"); LoadConnectionStringBuilder(ConnectionString); NoticeDelegate = new NoticeEventHandler(OnNotice); NotificationDelegate = new NotificationEventHandler(OnNotification); ProvideClientCertificatesCallbackDelegate = new ProvideClientCertificatesCallback(DefaultProvideClientCertificatesCallback); CertificateValidationCallbackDelegate = new CertificateValidationCallback(DefaultCertificateValidationCallback); CertificateSelectionCallbackDelegate = new CertificateSelectionCallback(DefaultCertificateSelectionCallback); PrivateKeySelectionCallbackDelegate = new PrivateKeySelectionCallback(DefaultPrivateKeySelectionCallback); ValidateRemoteCertificateCallbackDelegate = new ValidateRemoteCertificateCallback(DefaultValidateRemoteCertificateCallback); // Fix authentication problems. See https://bugzilla.novell.com/show_bug.cgi?id=MONO77559 and // http://pgfoundry.org/forum/message.php?msg_id=1002377 for more info. RSACryptoServiceProvider.UseMachineKeyStore = true; promotable = new NpgsqlPromotableSinglePhaseNotification(this); }