Search Results for

    Show / Hide Table of Contents

    Class NpgsqlConnectionStringBuilder

    Provides a simple way to create and manage the contents of connection strings used by the NpgsqlConnection class.

    Inheritance
    Object
    DbConnectionStringBuilder
    NpgsqlConnectionStringBuilder
    Implements
    IDictionary
    ICollection
    ICustomTypeDescriptor
    IDictionary<String, Object>
    ICollection<KeyValuePair<String, Object>>
    IEnumerable<KeyValuePair<String, Object>>
    IEnumerable
    Inherited Members
    System.Data.Common.DbConnectionStringBuilder.System.Collections.IDictionary.get_Item(System.Object)
    System.Data.Common.DbConnectionStringBuilder.System.Collections.IDictionary.set_Item(System.Object, System.Object)
    DbConnectionStringBuilder.Add(String, Object)
    DbConnectionStringBuilder.AppendKeyValuePair(StringBuilder, String, String)
    DbConnectionStringBuilder.AppendKeyValuePair(StringBuilder, String, String, Boolean)
    DbConnectionStringBuilder.ClearPropertyDescriptors()
    DbConnectionStringBuilder.EquivalentTo(DbConnectionStringBuilder)
    DbConnectionStringBuilder.ShouldSerialize(String)
    DbConnectionStringBuilder.ICollection.CopyTo(Array, Int32)
    DbConnectionStringBuilder.IDictionary.Add(Object, Object)
    DbConnectionStringBuilder.IDictionary.Contains(Object)
    DbConnectionStringBuilder.IDictionary.GetEnumerator()
    DbConnectionStringBuilder.IDictionary.Remove(Object)
    DbConnectionStringBuilder.IEnumerable.GetEnumerator()
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetAttributes()
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetClassName()
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetComponentName()
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetConverter()
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetDefaultEvent()
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetDefaultProperty()
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetEditor(Type)
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetEvents()
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetEvents(Attribute[])
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetProperties()
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetProperties(Attribute[])
    DbConnectionStringBuilder.ICustomTypeDescriptor.GetPropertyOwner(PropertyDescriptor)
    DbConnectionStringBuilder.ToString()
    DbConnectionStringBuilder.ConnectionString
    DbConnectionStringBuilder.Count
    DbConnectionStringBuilder.IsFixedSize
    DbConnectionStringBuilder.IsReadOnly
    DbConnectionStringBuilder.ICollection.IsSynchronized
    DbConnectionStringBuilder.ICollection.SyncRoot
    DbConnectionStringBuilder.IDictionary.Item[Object]
    Object.Equals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: Npgsql
    Assembly: Npgsql.dll
    Syntax
    public sealed class NpgsqlConnectionStringBuilder : DbConnectionStringBuilder, IDictionary, ICollection, ICustomTypeDescriptor, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable

    Constructors

    | Improve this Doc

    NpgsqlConnectionStringBuilder()

    Initializes a new instance of the NpgsqlConnectionStringBuilder class.

    Declaration
    public NpgsqlConnectionStringBuilder()
    | Improve this Doc

    NpgsqlConnectionStringBuilder(Boolean)

    Initializes a new instance of the NpgsqlConnectionStringBuilder class, optionally using ODBC rules for quoting values.

    Declaration
    public NpgsqlConnectionStringBuilder(bool useOdbcRules)
    Parameters
    Type Name Description
    Boolean useOdbcRules

    true to use {} to delimit fields; false to use quotation marks.

    | Improve this Doc

    NpgsqlConnectionStringBuilder(String)

    Initializes a new instance of the NpgsqlConnectionStringBuilder class and sets its ConnectionString.

    Declaration
    public NpgsqlConnectionStringBuilder(string connectionString)
    Parameters
    Type Name Description
    String connectionString

    Properties

    | Improve this Doc

    ApplicationName

    The optional application name parameter to be sent to the backend during connection initiation.

    Declaration
    [NpgsqlConnectionStringProperty]
    public string ApplicationName { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    AutoPrepareMinUsages

    The minimum number of usages an SQL statement is used before it's automatically prepared. Defaults to 5.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int AutoPrepareMinUsages { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    BackendTimeouts

    Obsolete, see https://www.npgsql.org/doc/release-notes/3.1.html

    Declaration
    [NpgsqlConnectionStringProperty]
    [Obsolete("The BackendTimeouts parameter is no longer supported")]
    public bool BackendTimeouts { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    CheckCertificateRevocation

    Whether to check the certificate revocation list during authentication. False by default.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool CheckCertificateRevocation { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    ClientCertificate

    Location of a client certificate to be sent to the server.

    Declaration
    [NpgsqlConnectionStringProperty]
    public string ClientCertificate { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    ClientEncoding

    Gets or sets the client_encoding parameter.

    Declaration
    [NpgsqlConnectionStringProperty]
    public string ClientEncoding { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    CommandTimeout

    The time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error. Defaults to 30 seconds.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int CommandTimeout { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    ConnectionIdleLifetime

    The time to wait before closing idle connections in the pool if the count of all connections exceeds MinPoolSize.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int ConnectionIdleLifetime { get; set; }
    Property Value
    Type Description
    Int32

    The time (in seconds) to wait. The default value is 300.

    | Improve this Doc

    ConnectionLifeTime

    Obsolete, see https://www.npgsql.org/doc/release-notes/3.1.html

    Declaration
    [NpgsqlConnectionStringProperty]
    [Obsolete("The ConnectionLifeTime parameter is no longer supported")]
    public int ConnectionLifeTime { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    ConnectionPruningInterval

    How many seconds the pool waits before attempting to prune idle connections that are beyond idle lifetime (ConnectionIdleLifetime.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int ConnectionPruningInterval { get; set; }
    Property Value
    Type Description
    Int32

    The interval (in seconds). The default value is 10.

    | Improve this Doc

    ContinuousProcessing

    Obsolete, see https://www.npgsql.org/doc/release-notes/3.1.html

    Declaration
    [NpgsqlConnectionStringProperty]
    [Obsolete("The ContinuousProcessing parameter is no longer supported.")]
    public bool ContinuousProcessing { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    ConvertInfinityDateTime

    Makes MaxValue and MinValue timestamps and dates readable as infinity and negative infinity.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool ConvertInfinityDateTime { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    Database

    The PostgreSQL database to connect to.

    Declaration
    [NpgsqlConnectionStringProperty(new string[]{"DB"})]
    public string Database { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    Encoding

    Gets or sets the .NET encoding that will be used to encode/decode PostgreSQL string data.

    Declaration
    [NpgsqlConnectionStringProperty]
    public string Encoding { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    Enlist

    Whether to enlist in an ambient TransactionScope.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool Enlist { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    EntityAdminDatabase

    The database admin to specify when creating and dropping a database in Entity Framework. This is needed because Npgsql needs to connect to a database in order to send the create/drop database command. If not specified, defaults to "template1". Check NpgsqlServices.UsingPostgresDBConnection for more information.

    Declaration
    [NpgsqlConnectionStringProperty]
    public string EntityAdminDatabase { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    EntityTemplateDatabase

    The database template to specify when creating a database in Entity Framework. If not specified, PostgreSQL defaults to "template1".

    Declaration
    [NpgsqlConnectionStringProperty]
    public string EntityTemplateDatabase { get; set; }
    Property Value
    Type Description
    String
    Remarks

    http://www.postgresql.org/docs/current/static/manage-ag-templatedbs.html

    | Improve this Doc

    Host

    The hostname or IP address of the PostgreSQL server to connect to.

    Declaration
    [NpgsqlConnectionStringProperty(new string[]{"Server"})]
    public string Host { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    IncludeErrorDetails

    When enabled, PostgreSQL error details are included on Detail and Detail. These can contain sensitive data.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool IncludeErrorDetails { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    IncludeRealm

    The Kerberos realm to be used for authentication.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool IncludeRealm { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    IntegratedSecurity

    Whether to use Windows integrated security to log in.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool IntegratedSecurity { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    InternalCommandTimeout

    The time to wait (in seconds) while trying to execute a an internal command before terminating the attempt and generating an error.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int InternalCommandTimeout { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    Item[String]

    Gets or sets the value associated with the specified key.

    Declaration
    public override object this[string keyword] { get; set; }
    Parameters
    Type Name Description
    String keyword

    The key of the item to get or set.

    Property Value
    Type Description
    Object

    The value associated with the specified key.

    Overrides
    DbConnectionStringBuilder.Item[String]
    | Improve this Doc

    KeepAlive

    The number of seconds of connection inactivity before Npgsql sends a keepalive query. Set to 0 (the default) to disable.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int KeepAlive { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    KerberosServiceName

    The Kerberos service name to be used for authentication.

    Declaration
    [NpgsqlConnectionStringProperty(new string[]{"Krbsrvname"})]
    public string KerberosServiceName { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    Keys

    Gets an ICollection{string} containing the keys of the NpgsqlConnectionStringBuilder.

    Declaration
    public ICollection<string> Keys { get; }
    Property Value
    Type Description
    ICollection<String>
    | Improve this Doc

    LoadTableComposites

    Load table composite type definitions, and not just free-standing composite types.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool LoadTableComposites { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    LogParameters

    When enabled, parameter values are logged when commands are executed. Defaults to false.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool LogParameters { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    MaxAutoPrepare

    The maximum number SQL statements that can be automatically prepared at any given point. Beyond this number the least-recently-used statement will be recycled. Zero (the default) disables automatic preparation.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int MaxAutoPrepare { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    MaxPoolSize

    The maximum connection pool size.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int MaxPoolSize { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    MinPoolSize

    The minimum connection pool size.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int MinPoolSize { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    NoResetOnClose

    If set to true, a pool connection's state won't be reset when it is closed (improves performance). Do not specify this unless you know what you're doing.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool NoResetOnClose { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    Passfile

    Path to a PostgreSQL password file (PGPASSFILE), from which the password would be taken.

    Declaration
    [NpgsqlConnectionStringProperty]
    public string Passfile { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    Password

    The password to connect with. Not required if using IntegratedSecurity.

    Declaration
    [NpgsqlConnectionStringProperty(new string[]{"PSW", "PWD"})]
    public string Password { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    PersistSecurityInfo

    Gets or sets a Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool PersistSecurityInfo { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    Pooling

    Whether connection pooling should be used.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool Pooling { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    Port

    The TCP/IP port of the PostgreSQL server.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int Port { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    PreloadReader

    Obsolete, see https://www.npgsql.org/doc/release-notes/3.0.html

    Declaration
    [NpgsqlConnectionStringProperty]
    [Obsolete("The PreloadReader parameter is no longer supported")]
    public bool PreloadReader { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    ReadBufferSize

    Determines the size of the internal buffer Npgsql uses when reading. Increasing may improve performance if transferring large values from the database.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int ReadBufferSize { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    SearchPath

    Gets or sets the schema search path.

    Declaration
    [NpgsqlConnectionStringProperty]
    public string SearchPath { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    ServerCompatibilityMode

    A compatibility mode for special PostgreSQL server types.

    Declaration
    [NpgsqlConnectionStringProperty]
    public ServerCompatibilityMode ServerCompatibilityMode { get; set; }
    Property Value
    Type Description
    ServerCompatibilityMode
    | Improve this Doc

    SocketReceiveBufferSize

    Determines the size of socket read buffer.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int SocketReceiveBufferSize { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    SocketSendBufferSize

    Determines the size of socket send buffer.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int SocketSendBufferSize { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    SslMode

    Controls whether SSL is required, disabled or preferred, depending on server support.

    Declaration
    [NpgsqlConnectionStringProperty]
    public SslMode SslMode { get; set; }
    Property Value
    Type Description
    SslMode
    | Improve this Doc

    TargetServerType

    Gets or sets the PostgreSQL target server.

    Declaration
    [NpgsqlConnectionStringProperty]
    public TargetServerType TargetServerType { get; set; }
    Property Value
    Type Description
    TargetServerType
    | Improve this Doc

    TcpKeepAlive

    Whether to use TCP keepalive with system defaults if overrides isn't specified.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool TcpKeepAlive { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    TcpKeepAliveInterval

    The interval, in milliseconds, between when successive keep-alive packets are sent if no acknowledgement is received. Defaults to the value of TcpKeepAliveTime. TcpKeepAliveTime must be non-zero as well. Supported only on Windows.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int TcpKeepAliveInterval { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    TcpKeepAliveTime

    The number of seconds of connection inactivity before a TCP keepalive query is sent. Use of this option is discouraged, use KeepAlive instead if possible. Set to 0 (the default) to disable. Supported only on Windows.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int TcpKeepAliveTime { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    Timeout

    The time to wait (in seconds) while trying to establish a connection before terminating the attempt and generating an error. Defaults to 15 seconds.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int Timeout { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    Timezone

    Gets or sets the PostgreSQL session timezone, in Olson/IANA database format.

    Declaration
    [NpgsqlConnectionStringProperty]
    public string Timezone { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    TrustServerCertificate

    Whether to trust the server certificate without validating it.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool TrustServerCertificate { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    UseExtendedTypes

    Obsolete, see https://www.npgsql.org/doc/release-notes/3.0.html

    Declaration
    [NpgsqlConnectionStringProperty]
    [Obsolete("The UseExtendedTypes parameter is no longer supported")]
    public bool UseExtendedTypes { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    UsePerfCounters

    Writes connection performance information to performance counters.

    Declaration
    [NpgsqlConnectionStringProperty]
    public bool UsePerfCounters { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    Username

    The username to connect with. Not required if using IntegratedSecurity.

    Declaration
    [NpgsqlConnectionStringProperty(new string[]{"User Name", "UserId", "User Id", "UID"})]
    public string Username { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc

    UseSslStream

    Obsolete, see https://www.npgsql.org/doc/release-notes/4.1.html

    Declaration
    [NpgsqlConnectionStringProperty]
    [Obsolete("The UseSslStream parameter is no longer supported (always true)")]
    public bool UseSslStream { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    Values

    Gets an ICollection{string} containing the values in the NpgsqlConnectionStringBuilder.

    Declaration
    public ICollection<object> Values { get; }
    Property Value
    Type Description
    ICollection<Object>
    | Improve this Doc

    WriteBufferSize

    Determines the size of the internal buffer Npgsql uses when writing. Increasing may improve performance if transferring large values to the database.

    Declaration
    [NpgsqlConnectionStringProperty]
    public int WriteBufferSize { get; set; }
    Property Value
    Type Description
    Int32

    Methods

    | Improve this Doc

    Add(KeyValuePair<String, Object>)

    Adds an item to the NpgsqlConnectionStringBuilder.

    Declaration
    public void Add(KeyValuePair<string, object> item)
    Parameters
    Type Name Description
    KeyValuePair<String, Object> item

    The key-value pair to be added.

    | Improve this Doc

    Clear()

    Clears the contents of the NpgsqlConnectionStringBuilder instance.

    Declaration
    public override void Clear()
    Overrides
    DbConnectionStringBuilder.Clear()
    | Improve this Doc

    Contains(KeyValuePair<String, Object>)

    Determines whether the NpgsqlConnectionStringBuilder contains a specific key-value pair.

    Declaration
    public bool Contains(KeyValuePair<string, object> item)
    Parameters
    Type Name Description
    KeyValuePair<String, Object> item

    The item to locate in the NpgsqlConnectionStringBuilder.

    Returns
    Type Description
    Boolean

    true if the NpgsqlConnectionStringBuilder contains the entry; otherwise false.

    | Improve this Doc

    ContainsKey(String)

    Determines whether the NpgsqlConnectionStringBuilder contains a specific key.

    Declaration
    public override bool ContainsKey(string keyword)
    Parameters
    Type Name Description
    String keyword

    The key to locate in the NpgsqlConnectionStringBuilder.

    Returns
    Type Description
    Boolean

    true if the NpgsqlConnectionStringBuilder contains an entry with the specified key; otherwise false.

    Overrides
    DbConnectionStringBuilder.ContainsKey(String)
    | Improve this Doc

    CopyTo(KeyValuePair<String, Object>[], Int32)

    Copies the elements of the NpgsqlConnectionStringBuilder to an Array, starting at a particular Array index.

    Declaration
    public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
    Parameters
    Type Name Description
    KeyValuePair<String, Object>[] array

    The one-dimensional Array that is the destination of the elements copied from NpgsqlConnectionStringBuilder. The Array must have zero-based indexing.

    Int32 arrayIndex

    The zero-based index in array at which copying begins.

    | Improve this Doc

    Equals(Object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    Object.Equals(Object)
    | Improve this Doc

    GetEnumerator()

    Returns an enumerator that iterates through the NpgsqlConnectionStringBuilder.

    Declaration
    public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
    Returns
    Type Description
    IEnumerator<KeyValuePair<String, Object>>
    | Improve this Doc

    GetHashCode()

    Hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    Object.GetHashCode()
    | Improve this Doc

    GetProperties(Hashtable)

    Declaration
    protected override void GetProperties(Hashtable propertyDescriptors)
    Parameters
    Type Name Description
    Hashtable propertyDescriptors
    Overrides
    DbConnectionStringBuilder.GetProperties(Hashtable)
    | Improve this Doc

    Remove(KeyValuePair<String, Object>)

    Removes the entry from the DbConnectionStringBuilder instance.

    Declaration
    public bool Remove(KeyValuePair<string, object> item)
    Parameters
    Type Name Description
    KeyValuePair<String, Object> item

    The key/value pair to be removed from the connection string in this DbConnectionStringBuilder.

    Returns
    Type Description
    Boolean

    true if the key existed within the connection string and was removed; false if the key did not exist.

    | Improve this Doc

    Remove(String)

    Removes the entry with the specified key from the DbConnectionStringBuilder instance.

    Declaration
    public override bool Remove(string keyword)
    Parameters
    Type Name Description
    String keyword

    The key of the key/value pair to be removed from the connection string in this DbConnectionStringBuilder.

    Returns
    Type Description
    Boolean

    true if the key existed within the connection string and was removed; false if the key did not exist.

    Overrides
    DbConnectionStringBuilder.Remove(String)
    | Improve this Doc

    TryGetValue(String, out Object)

    Retrieves a value corresponding to the supplied key from this NpgsqlConnectionStringBuilder.

    Declaration
    public override bool TryGetValue(string keyword, out object value)
    Parameters
    Type Name Description
    String keyword

    The key of the item to retrieve.

    Object value

    The value corresponding to the key.

    Returns
    Type Description
    Boolean

    true if keyword was found within the connection string, false otherwise.

    Overrides
    DbConnectionStringBuilder.TryGetValue(String, Object)

    Explicit Interface Implementations

    | Improve this Doc

    IDictionary<String, Object>.Item[String]

    Declaration
    object IDictionary<string, object>.this[string keyword] { get; set; }
    Parameters
    Type Name Description
    String keyword
    Returns
    Type Description
    Object

    Implements

    System.Collections.IDictionary
    System.Collections.ICollection
    System.ComponentModel.ICustomTypeDescriptor
    System.Collections.Generic.IDictionary<TKey,TValue>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    • Improve this Doc
    In This Article
    Back to top © Copyright 2021 The Npgsql Development Team