C# Class Npgsql.NpgsqlConnector

!!! Helper class, for compilation only. Connector implements the logic for the Connection Objects to access the physical connection to the database, and isolate the application developer from connection pooling internals.
Exibir arquivo Open project: undeadlabs/Npgsql Class Usage Examples

Private Properties

Property Type Description
AddNotificationThread void
Authenticate void
Bind void
BlockNotificationThread NotificationThreadBlock
CancelRequest void
Close void
DefaultCertificateSelectionCallback System.Security.Cryptography.X509Certificates.X509Certificate
DefaultCertificateValidationCallback bool
DefaultPrivateKeySelectionCallback System.Security.Cryptography.AsymmetricAlgorithm
DefaultProvideClientCertificatesCallback void
DefaultValidateRemoteCertificateCallback bool
Describe void
Execute void
FireNotice void
FireNotification void
IsValid Boolean
NextPlanName String
NextPortalName String
Open void
Parse void
ProcessAndDiscardBackendResponses void
ProcessBackendResponsesEnum IEnumerable
ProcessServerVersion void
Query void
ReleasePlansPortals void
ReleaseRegisteredListen void
ReleaseResources void
ReleaseWithDiscard void
RemoveNotificationThread void
ResumeNotificationThread void
SetBackendCommandTimeout void
StopNotificationThread void
Sync void
TestConnector void

Public Methods

Method Description
AddParameterStatus ( Npgsql.NpgsqlParameterStatus ps ) : void
NpgsqlConnector ( NpgsqlConnection Connection ) : System
NpgsqlConnector ( NpgsqlConnectionStringBuilder ConnectionString, bool Pooled, bool Shared ) : System

Constructor.

Private Methods

Method Description
AddNotificationThread ( ) : void
Authenticate ( byte password ) : void
Bind ( Npgsql.NpgsqlBind bind ) : void
BlockNotificationThread ( ) : NotificationThreadBlock
CancelRequest ( ) : void
Close ( ) : void

Closes the physical connection to the server.

DefaultCertificateSelectionCallback ( X509CertificateCollection clientCertificates, X509Certificate serverCertificate, string targetHost, X509CertificateCollection serverRequestedCertificates ) : X509Certificate

Default SSL CertificateSelectionCallback implementation.

DefaultCertificateValidationCallback ( X509Certificate certificate, int certificateErrors ) : bool

Default SSL CertificateValidationCallback implementation.

DefaultPrivateKeySelectionCallback ( X509Certificate certificate, string targetHost ) : AsymmetricAlgorithm

Default SSL PrivateKeySelectionCallback implementation.

DefaultProvideClientCertificatesCallback ( X509CertificateCollection certificates ) : void

Default SSL ProvideClientCertificatesCallback implementation.

DefaultValidateRemoteCertificateCallback ( object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors errors ) : bool

Default SSL ValidateRemoteCertificateCallback implementation.

Describe ( Npgsql.NpgsqlDescribe describe ) : void
Execute ( Npgsql.NpgsqlExecute execute ) : void
FireNotice ( Npgsql.NpgsqlError e ) : void
FireNotification ( Npgsql.NpgsqlNotificationEventArgs e ) : void
IsValid ( ) : Boolean

This method checks if the connector is still ok. We try to send a simple query text, select 1 as ConnectionTest;

NextPlanName ( ) : String

Returns next plan index.

NextPortalName ( ) : String

Returns next portal index.

Open ( ) : void

Opens the physical connection to the server.

Usually called by the RequestConnector Method of the connection pool manager.

Parse ( NpgsqlParse parse ) : void
ProcessAndDiscardBackendResponses ( ) : void
ProcessBackendResponsesEnum ( ) : IEnumerable
ProcessServerVersion ( ) : void

This method is required to set all the version dependent features flags. SupportsPrepare means the server can use prepared query plans (7.3+)

Query ( NpgsqlQuery query ) : void
ReleasePlansPortals ( ) : void

This method is responsible to release all portals used by this Connector.

ReleaseRegisteredListen ( ) : void
ReleaseResources ( ) : void

This method is responsible for releasing all resources associated with this Connector.

ReleaseWithDiscard ( ) : void
RemoveNotificationThread ( ) : void
ResumeNotificationThread ( ) : void
SetBackendCommandTimeout ( int timeout ) : void

Modify the backend statement_timeout value if needed.

StopNotificationThread ( ) : void
Sync ( ) : void
TestConnector ( ) : void

Method Details

AddParameterStatus() public method

public AddParameterStatus ( Npgsql.NpgsqlParameterStatus ps ) : void
ps Npgsql.NpgsqlParameterStatus
return void

NpgsqlConnector() public method

public NpgsqlConnector ( NpgsqlConnection Connection ) : System
Connection NpgsqlConnection
return System

NpgsqlConnector() public method

Constructor.
public NpgsqlConnector ( NpgsqlConnectionStringBuilder ConnectionString, bool Pooled, bool Shared ) : System
ConnectionString NpgsqlConnectionStringBuilder Connection string.
Pooled bool Pooled
Shared bool Controls whether the connector can be shared.
return System