SqlConnectionStringBuilder Třída

Definice

Poskytuje jednoduchý způsob, jak vytvořit a spravovat obsah připojovacích řetězců používaných SqlConnection třídou.Provides a simple way to create and manage the contents of connection strings used by the SqlConnection class.

public ref class SqlConnectionStringBuilder sealed : System::Data::Common::DbConnectionStringBuilder
public sealed class SqlConnectionStringBuilder : System.Data.Common.DbConnectionStringBuilder
[System.ComponentModel.TypeConverter(typeof(System.Data.SqlClient.SqlConnectionStringBuilder/SqlConnectionStringBuilderConverter))]
public sealed class SqlConnectionStringBuilder : System.Data.Common.DbConnectionStringBuilder
type SqlConnectionStringBuilder = class
    inherit DbConnectionStringBuilder
[<System.ComponentModel.TypeConverter(typeof(System.Data.SqlClient.SqlConnectionStringBuilder/SqlConnectionStringBuilderConverter))>]
type SqlConnectionStringBuilder = class
    inherit DbConnectionStringBuilder
Public NotInheritable Class SqlConnectionStringBuilder
Inherits DbConnectionStringBuilder
Dědičnost
SqlConnectionStringBuilder
Atributy

Příklady

Následující aplikace konzoly sestavuje připojovací řetězce pro databázi SQL Server.The following console application builds connection strings for a SQL Server database. Kód používá SqlConnectionStringBuilder třídu k vytvoření připojovacího řetězce a poté předá ConnectionString vlastnost SqlConnectionStringBuilder instance konstruktoru třídy Connection.The code uses a SqlConnectionStringBuilder class to create the connection string, and then passes the ConnectionString property of the SqlConnectionStringBuilder instance to the constructor of the connection class. Příklad také analyzuje existující připojovací řetězec a ukazuje různé způsoby manipulace s obsahem připojovacího řetězce.The example also parses an existing connection string and demonstrates various ways of manipulating the connection string's contents.

Poznámka

Tento příklad obsahuje heslo k předvedení toho, jak SqlConnectionStringBuilder funguje s připojovacími řetězci.This example includes a password to demonstrate how SqlConnectionStringBuilder works with connection strings. Ve vašich aplikacích doporučujeme používat ověřování systému Windows.In your applications, we recommend that you use Windows Authentication. Pokud je nutné použít heslo, nevkládejte do své aplikace pevně zakódované heslo.If you must use a password, do not include a hard-coded password in your application.

using System.Data;
using System.Data.SqlClient;

class Program
{
    static void Main()
    {
        // Create a new SqlConnectionStringBuilder and
        // initialize it with a few name/value pairs.
        SqlConnectionStringBuilder builder =
            new SqlConnectionStringBuilder(GetConnectionString());

        // The input connection string used the
        // Server key, but the new connection string uses
        // the well-known Data Source key instead.
        Console.WriteLine(builder.ConnectionString);

        // Pass the SqlConnectionStringBuilder an existing
        // connection string, and you can retrieve and
        // modify any of the elements.
        builder.ConnectionString = "server=(local);user id=ab;" +
            "password= a!Pass113;initial catalog=AdventureWorks";

        // Now that the connection string has been parsed,
        // you can work with individual items.
        Console.WriteLine(builder.Password);
        builder.Password = "new@1Password";
        builder.AsynchronousProcessing = true;

        // You can refer to connection keys using strings,
        // as well. When you use this technique (the default
        // Item property in Visual Basic, or the indexer in C#),
        // you can specify any synonym for the connection string key
        // name.
        builder["Server"] = ".";
        builder["Connect Timeout"] = 1000;
        builder["Trusted_Connection"] = true;
        Console.WriteLine(builder.ConnectionString);

        Console.WriteLine("Press Enter to finish.");
        Console.ReadLine();
    }

    private static string GetConnectionString()
    {
        // To avoid storing the connection string in your code,
        // you can retrieve it from a configuration file.
        return "Server=(local);Integrated Security=SSPI;" +
            "Initial Catalog=AdventureWorks";
    }
}
Imports System.Data.SqlClient

Module Module1
    Sub Main()
        ' Create a new SqlConnectionStringBuilder and
        ' initialize it with a few name/value pairs:
        Dim builder As New SqlConnectionStringBuilder(GetConnectionString())

        ' The input connection string used the 
        ' Server key, but the new connection string uses
        ' the well-known Data Source key instead.
        Console.WriteLine(builder.ConnectionString)

        ' Pass the SqlConnectionStringBuilder an existing 
        ' connection string, and you can retrieve and
        ' modify any of the elements.
        builder.ConnectionString = _
            "server=(local);user id=ab;" & _
            "password=a!Pass113;initial catalog=AdventureWorks"
        ' Now that the connection string has been parsed,
        ' you can work with individual items.
        Console.WriteLine(builder.Password)
        builder.Password = "new@1Password"
        builder.AsynchronousProcessing = True

        ' You can refer to connection keys using strings, 
        ' as well. When you use this technique (the default
        ' Item property in Visual Basic, or the indexer in C#)
        ' you can specify any synonym for the connection string key
        ' name.
        builder("Server") = "."
        builder("Connect Timeout") = 1000

        ' The Item property is the default for the class, 
        ' and setting the Item property adds the value to the 
        ' dictionary, if necessary. 
        builder.Item("Trusted_Connection") = True
        Console.WriteLine(builder.ConnectionString)

        Console.WriteLine("Press Enter to finish.")
        Console.ReadLine()
    End Sub

    Private Function GetConnectionString() As String
        ' To avoid storing the connection string in your code,
        ' you can retrieve it from a configuration file. 
        Return "Server=(local);Integrated Security=SSPI;" & _
          "Initial Catalog=AdventureWorks"
    End Function
End Module

Poznámky

Tvůrce připojovacích řetězců umožňuje vývojářům programově vytvářet syntakticky správné připojovací řetězce a analyzovat a znovu sestavovat stávající připojovací řetězce pomocí vlastností a metod třídy.The connection string builder lets developers programmatically create syntactically correct connection strings, and parse and rebuild existing connection strings, using properties and methods of the class. Tvůrce připojovacích řetězců poskytuje vlastnosti silného typu, které odpovídají známým dvojicím klíč/hodnota, které povoluje SQL Server.The connection string builder provides strongly typed properties corresponding to the known key/value pairs allowed by SQL Server. Vývojáři, kteří potřebují vytvářet připojovací řetězce jako součást aplikací, mohou použít SqlConnectionStringBuilder třídu k sestavení a úpravě připojovacích řetězců.Developers needing to create connection strings as part of applications can use the SqlConnectionStringBuilder class to build and modify connection strings. Třída také usnadňuje správu připojovacích řetězců uložených v konfiguračním souboru aplikace.The class also makes it easy to manage connection strings stored in an application configuration file.

SqlConnectionStringBuilderProvede kontrolu platných párů klíč/hodnota.The SqlConnectionStringBuilder performs checks for valid key/value pairs. Proto nemůžete tuto třídu použít k vytvoření neplatných připojovacích řetězců; pokus o přidání neplatných dvojic vyvolá výjimku.Therefore, you cannot use this class to create invalid connection strings; trying to add invalid pairs will throw an exception. Třída udržuje pevnou kolekci synonym a může překládat z synonym na odpovídající název známého klíče.The class maintains a fixed collection of synonyms and can translate from a synonym to the corresponding well-known key name.

Například při použití vlastnosti Item k načtení hodnoty můžete zadat řetězec, který obsahuje synonymum pro klíč, který potřebujete.For example, when you use the Item property to retrieve a value, you can specify a string that contains any synonym for the key you need. Můžete například zadat "Síťová adresa", "addr" nebo jakékoli jiné přijatelné synonymo pro tento klíč v připojovacím řetězci, pokud použijete libovolného člena, který vyžaduje řetězec, který obsahuje název klíče, jako je například vlastnost Item nebo Remove metoda.For example, you can specify "Network Address", "addr", or any other acceptable synonym for this key within a connection string when you use any member that requires a string that contains the key name, such as the Item property or the Remove method. ConnectionStringÚplný seznam přijatelných synonym naleznete v této vlastnosti.See the ConnectionString property for a full list of acceptable synonyms.

Popisovače vlastnosti položky se pokusí vložit škodlivé položky.The Item property handles tries to insert malicious entries. Například následující kód, který používá vlastnost výchozí položky (indexer, v jazyce C#) správně řídí vnořenou dvojici klíč/hodnota:For example, the following code, using the default Item property (the indexer, in C#) correctly escapes the nested key/value pair:

Dim builder As New System.Data.SqlClient.SqlConnectionStringBuilder
builder("Data Source") = "(local)"
builder("Integrated Security") = True
builder("Initial Catalog") = "AdventureWorks;NewValue=Bad"
Console.WriteLine(builder.ConnectionString)
System.Data.SqlClient.SqlConnectionStringBuilder builder =
  new System.Data.SqlClient.SqlConnectionStringBuilder();
builder["Data Source"] = "(local)";
builder["integrated Security"] = true;
builder["Initial Catalog"] = "AdventureWorks;NewValue=Bad";
Console.WriteLine(builder.ConnectionString);

Výsledkem je následující připojovací řetězec, který zpracovává neplatnou hodnotu bezpečným způsobem:The result is the following connection string that handles the invalid value in a safe manner:

Source=(local);Initial Catalog="AdventureWorks;NewValue=Bad";
Integrated Security=True

Konstruktory

SqlConnectionStringBuilder()

Inicializuje novou instanci SqlConnectionStringBuilder třídy.Initializes a new instance of the SqlConnectionStringBuilder class.

SqlConnectionStringBuilder(String)

Inicializuje novou instanci SqlConnectionStringBuilder třídy.Initializes a new instance of the SqlConnectionStringBuilder class. Zadaný připojovací řetězec poskytuje data pro interní informace o připojení instance.The provided connection string provides the data for the instance's internal connection information.

Vlastnosti

ApplicationIntent

Deklaruje typ úlohy aplikace při připojení k databázi ve skupině dostupnosti SQL Server.Declares the application workload type when connecting to a database in an SQL Server Availability Group. Hodnotu této vlastnosti lze nastavit pomocí ApplicationIntent .You can set the value of this property with ApplicationIntent. Další informace o podpoře SqlClient pro skupiny dostupnosti Always On najdete v článku Podpora SqlClient pro vysokou dostupnost a zotavení po havárii.For more information about SqlClient support for Always On Availability Groups, see SqlClient Support for High Availability, Disaster Recovery.

ApplicationName

Získá nebo nastaví název aplikace přidružené k připojovacímu řetězci.Gets or sets the name of the application associated with the connection string.

AsynchronousProcessing

Získá nebo nastaví logickou hodnotu, která určuje, zda je asynchronní zpracování povoleno připojením vytvořeným pomocí tohoto připojovacího řetězce.Gets or sets a Boolean value that indicates whether asynchronous processing is allowed by the connection created by using this connection string.

AttachDBFilename

Získá nebo nastaví řetězec, který obsahuje název primárního datového souboru.Gets or sets a string that contains the name of the primary data file. To zahrnuje úplný název cesty připojitelné databáze.This includes the full path name of an attachable database.

Authentication

Získá ověřování připojovacího řetězce.Gets the authentication of the connection string.

BrowsableConnectionString

Získává nebo nastavuje hodnotu, která indikuje, jestli ConnectionString je vlastnost viditelná v návrhářích sady Visual Studio.Gets or sets a value that indicates whether the ConnectionString property is visible in Visual Studio designers.

(Zděděno od DbConnectionStringBuilder)
ColumnEncryptionSetting

Získá nebo nastaví nastavení šifrování sloupce pro Tvůrce připojovacích řetězců.Gets or sets the column encryption settings for the connection string builder.

ConnectionReset
Zastaralé.

Zastaralé.Obsolete. Získá nebo nastaví logickou hodnotu, která označuje, jestli se při vykreslování z fondu připojení má resetovat připojení.Gets or sets a Boolean value that indicates whether the connection is reset when drawn from the connection pool.

ConnectionString

Získá nebo nastaví připojovací řetězec přidružený k DbConnectionStringBuilder .Gets or sets the connection string associated with the DbConnectionStringBuilder.

(Zděděno od DbConnectionStringBuilder)
ConnectRetryCount

Počet pokusů o připojení po zjištění, že došlo k nečinnému selhání připojení.The number of reconnections attempted after identifying that there was an idle connection failure. Toto musí být celé číslo v rozmezí od 0 do 255.This must be an integer between 0 and 255. Výchozí hodnota je 1.Default is 1. Nastavte na hodnotu 0, pokud chcete zakázat opětovné připojení při nečinném selhání připojení.Set to 0 to disable reconnecting on idle connection failures. ArgumentExceptionPokud je hodnota nastavena na hodnotu mimo povolený rozsah, bude vyvolána výjimka.An ArgumentException will be thrown if set to a value outside of the allowed range.

ConnectRetryInterval

Množství času (v sekundách) mezi jednotlivými pokusy o opětovné připojení po zjištění, že došlo k nečinnému selhání připojení.Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure. Musí to být celé číslo v rozmezí od 1 do 60.This must be an integer between 1 and 60. Výchozí hodnota je 10 sekund.The default is 10 seconds. ArgumentExceptionPokud je hodnota nastavena na hodnotu mimo povolený rozsah, bude vyvolána výjimka.An ArgumentException will be thrown if set to a value outside of the allowed range.

ConnectTimeout

Získá nebo nastaví dobu (v sekundách), po kterou se má čekat na připojení k serveru před ukončením pokusu a vygenerováním chyby.Gets or sets the length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.

ContextConnection

Získává nebo nastavuje hodnotu, která indikuje, jestli se má udělat připojení typu klient/server nebo v rámci procesu SQL Server.Gets or sets a value that indicates whether a client/server or in-process connection to SQL Server should be made.

Count

Získá aktuální počet klíčů, které jsou obsaženy v rámci ConnectionString Vlastnosti.Gets the current number of keys that are contained within the ConnectionString property.

(Zděděno od DbConnectionStringBuilder)
CurrentLanguage

Získá nebo nastaví název záznamu jazyka SQL Server.Gets or sets the SQL Server Language record name.

DataSource

Získá nebo nastaví název nebo síťovou adresu instance SQL Server, ke které se chcete připojit.Gets or sets the name or network address of the instance of SQL Server to connect to.

EnclaveAttestationUrl

Získá nebo nastaví adresu URL pro ověření enklávy, která se má použít pro enklávy založenou na Always Encrypted.Gets or sets the enclave attestation Url to be used with enclave based Always Encrypted.

Encrypt

Získá nebo nastaví logickou hodnotu, která indikuje, jestli SQL Server používá šifrování SSL pro všechna data odesílaná mezi klientem a serverem, pokud je na serveru nainstalovaný certifikát.Gets or sets a Boolean value that indicates whether SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed.

Enlist

Získá nebo nastaví logickou hodnotu, která označuje, zda SQL Server připojení Pooler automaticky zařadí připojení do kontextu aktuálního transakce vlákna vytvoření.Gets or sets a Boolean value that indicates whether the SQL Server connection pooler automatically enlists the connection in the creation thread's current transaction context.

FailoverPartner

Získá nebo nastaví název nebo adresu partnerského serveru, ke kterému se má připojit, pokud je primární server mimo provoz.Gets or sets the name or address of the partner server to connect to if the primary server is down.

InitialCatalog

Získá nebo nastaví název databáze přidružené k připojení.Gets or sets the name of the database associated with the connection.

IntegratedSecurity

Získá nebo nastaví logickou hodnotu, která indikuje, jestli je ID a heslo uživatele zadané v připojení (kdy false ), nebo jestli se mají používat aktuální přihlašovací údaje účtu systému Windows pro ověřování (při true ).Gets or sets a Boolean value that indicates whether User ID and Password are specified in the connection (when false) or whether the current Windows account credentials are used for authentication (when true).

IsFixedSize

Získá hodnotu, která označuje, zda SqlConnectionStringBuilder má pevnou velikost.Gets a value that indicates whether the SqlConnectionStringBuilder has a fixed size.

IsFixedSize

Získá hodnotu, která označuje, zda DbConnectionStringBuilder má pevnou velikost.Gets a value that indicates whether the DbConnectionStringBuilder has a fixed size.

(Zděděno od DbConnectionStringBuilder)
IsReadOnly

Získá hodnotu, která označuje, zda DbConnectionStringBuilder je pouze pro čtení.Gets a value that indicates whether the DbConnectionStringBuilder is read-only.

(Zděděno od DbConnectionStringBuilder)
Item[String]

Získá nebo nastaví hodnotu přidruženou k zadanému klíči.Gets or sets the value associated with the specified key. V jazyce C# je tato vlastnost indexerem.In C#, this property is the indexer.

Keys

Získá ICollection , který obsahuje klíče v SqlConnectionStringBuilder .Gets an ICollection that contains the keys in the SqlConnectionStringBuilder.

LoadBalanceTimeout

Získá nebo nastaví minimální dobu (v sekundách), po jejímž uplynutí je připojení aktivní ve fondu připojení před zničením.Gets or sets the minimum time, in seconds, for the connection to live in the connection pool before being destroyed.

MaxPoolSize

Získá nebo nastaví maximální počet připojení povolených ve fondu připojení pro tento konkrétní připojovací řetězec.Gets or sets the maximum number of connections allowed in the connection pool for this specific connection string.

MinPoolSize

Získá nebo nastaví minimální počet připojení povolených ve fondu připojení pro tento konkrétní připojovací řetězec.Gets or sets the minimum number of connections allowed in the connection pool for this specific connection string.

MultipleActiveResultSets

V případě hodnoty true může aplikace spravovat několik aktivních sad výsledků dotazu (MARS).When true, an application can maintain multiple active result sets (MARS). V případě hodnoty false musí aplikace zpracovat nebo zrušit všechny sady výsledků z jedné dávky předtím, než může spustit jakoukoli jinou dávku v tomto připojení.When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.

Další informace najdete v tématu několik aktivních sad výsledků dotazu (MARS).For more information, see Multiple Active Result Sets (MARS).

MultiSubnetFailover

Pokud se vaše aplikace připojuje ke skupině dostupnosti Always On (AG) nebo k instanci clusteru s podporou převzetí služeb při selhání (FCI) v různých podsítích, nastavení MultiSubnetFailover = true nabízí rychlejší zjišťování a připojení k aktivnímu serveru (aktuálně).If your application is connecting to an Always On availability group (AG) or Always On Failover Cluster Instance (FCI) on different subnets, setting MultiSubnetFailover=true provides faster detection of and connection to the (currently) active server. Další informace o podpoře SqlClient pro funkce Always On najdete v článku Podpora SqlClient pro vysokou dostupnost a zotavení po havárii.For more information about SqlClient support for the Always On features, see SqlClient Support for High Availability, Disaster Recovery.

NetworkLibrary

Získá nebo nastaví řetězec, který obsahuje název síťové knihovny používané k navázání připojení k SQL Server.Gets or sets a string that contains the name of the network library used to establish a connection to the SQL Server.

PacketSize

Získá nebo nastaví velikost síťových paketů používaných ke komunikaci s instancí SQL Server v bajtech.Gets or sets the size in bytes of the network packets used to communicate with an instance of SQL Server.

Password

Získá nebo nastaví heslo pro účet SQL Server.Gets or sets the password for the SQL Server account.

PersistSecurityInfo

Získá nebo nastaví logickou hodnotu, která indikuje, jestli se informace citlivé na zabezpečení, jako je třeba heslo, nevrátí jako součást připojení, pokud je připojení otevřené nebo bylo v otevřeném stavu.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.

PoolBlockingPeriod

Chování doby blokování pro fond připojení.The blocking period behavior for a connection pool.

Pooling

Získá nebo nastaví logickou hodnotu, která indikuje, jestli se připojení vytvoří ve fondu, nebo se explicitně otevře při každém vyžádání připojení.Gets or sets a Boolean value that indicates whether the connection will be pooled or explicitly opened every time that the connection is requested.

Replication

Získá nebo nastaví logickou hodnotu, která indikuje, jestli je replikace podporovaná pomocí připojení.Gets or sets a Boolean value that indicates whether replication is supported using the connection.

TransactionBinding

Získává nebo nastavuje řetězcovou hodnotu, která indikuje, jak připojení udržuje své přidružení k zařazené System.Transactions transakci.Gets or sets a string value that indicates how the connection maintains its association with an enlisted System.Transactions transaction.

TransparentNetworkIPResolution

Pokud je hodnota tohoto klíče nastavena na true , aplikace je vyžadována pro načtení všech IP adres pro konkrétní položku DNS a pokus o připojení k prvnímu z nich v seznamu.When the value of this key is set to true, the application is required to retrieve all IP addresses for a particular DNS entry and attempt to connect with the first one in the list. Pokud připojení není během 0,5 sekund navázáno, aplikace se pokusí připojit ke všem ostatním paralelně.If the connection is not established within 0.5 seconds, the application will try to connect to all others in parallel. Při prvním odpovědi aplikace naváže spojení s IP adresou respondentů.When the first answers, the application will establish the connection with the respondent IP address.

TrustServerCertificate

Získává nebo nastavuje hodnotu, která indikuje, jestli se kanál bude šifrovat při obnechání procházení řetězu certifikátů pro ověření důvěryhodnosti.Gets or sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.

TypeSystemVersion

Získává nebo nastavuje řetězcovou hodnotu, která označuje systém typů, který aplikace očekává.Gets or sets a string value that indicates the type system the application expects.

UserID

Získá nebo nastaví ID uživatele, které se má použít při připojování k SQL Server.Gets or sets the user ID to be used when connecting to SQL Server.

UserInstance

Získává nebo nastavuje hodnotu, která indikuje, jestli se má přesměrování připojení z výchozí instance SQL Server Express do instance inicializované modulem runtime, která běží pod účtem volajícího.Gets or sets a value that indicates whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller.

Values

Získá ICollection , který obsahuje hodnoty v SqlConnectionStringBuilder .Gets an ICollection that contains the values in the SqlConnectionStringBuilder.

WorkstationID

Získá nebo nastaví název pracovní stanice připojující se k SQL Server.Gets or sets the name of the workstation connecting to SQL Server.

Metody

Add(String, Object)

Přidá položku se zadaným klíčem a hodnotou do DbConnectionStringBuilder .Adds an entry with the specified key and value into the DbConnectionStringBuilder.

(Zděděno od DbConnectionStringBuilder)
Clear()

Vymaže obsah SqlConnectionStringBuilder instance.Clears the contents of the SqlConnectionStringBuilder instance.

ClearPropertyDescriptors()

Vymaže kolekci PropertyDescriptor objektů na přidruženém objektu DbConnectionStringBuilder .Clears the collection of PropertyDescriptor objects on the associated DbConnectionStringBuilder.

(Zděděno od DbConnectionStringBuilder)
ContainsKey(String)

Určuje, zda SqlConnectionStringBuilder obsahuje konkrétní klíč.Determines whether the SqlConnectionStringBuilder contains a specific key.

Equals(Object)

Určí, zda se zadaný objekt rovná aktuálnímu objektu.Determines whether the specified object is equal to the current object.

(Zděděno od Object)
EquivalentTo(DbConnectionStringBuilder)

Porovná informace o připojení v tomto DbConnectionStringBuilder objektu s informacemi o připojení v zadaném objektu.Compares the connection information in this DbConnectionStringBuilder object with the connection information in the supplied object.

(Zděděno od DbConnectionStringBuilder)
GetHashCode()

Slouží jako výchozí funkce hash.Serves as the default hash function.

(Zděděno od Object)
GetProperties(Hashtable)

Vyplní Hashtable informace o všech vlastnostech tohoto typu DbConnectionStringBuilder .Fills a supplied Hashtable with information about all the properties of this DbConnectionStringBuilder.

(Zděděno od DbConnectionStringBuilder)
GetType()

Získá Type aktuální instanci.Gets the Type of the current instance.

(Zděděno od Object)
MemberwiseClone()

Vytvoří kopii aktuálního seznamu Object .Creates a shallow copy of the current Object.

(Zděděno od Object)
Remove(String)

Odstraní položku se zadaným klíčem z SqlConnectionStringBuilder instance.Removes the entry with the specified key from the SqlConnectionStringBuilder instance.

ShouldSerialize(String)

Určuje, zda zadaný klíč v této SqlConnectionStringBuilder instanci existuje.Indicates whether the specified key exists in this SqlConnectionStringBuilder instance.

ToString()

Vrátí připojovací řetězec přidružený k tomuto DbConnectionStringBuilder .Returns the connection string associated with this DbConnectionStringBuilder.

(Zděděno od DbConnectionStringBuilder)
TryGetValue(String, Object)

Načte hodnotu odpovídající zadanému klíči z tohoto SqlConnectionStringBuilder .Retrieves a value corresponding to the supplied key from this SqlConnectionStringBuilder.

Explicitní implementace rozhraní

ICollection.CopyTo(Array, Int32)

Zkopíruje prvky ICollection do a Array počínaje konkrétním Array indexem.Copies the elements of the ICollection to an Array, starting at a particular Array index.

(Zděděno od DbConnectionStringBuilder)
ICollection.IsSynchronized

Načte hodnotu, která označuje, jestli se má synchronizovat přístup k aplikaci (bezpečné pro přístup z ICollection více vláken).Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(Zděděno od DbConnectionStringBuilder)
ICollection.SyncRoot

Získává objekt, který lze použít k synchronizaci přístupu k ICollection .Gets an object that can be used to synchronize access to the ICollection.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetAttributes()

Vrátí kolekci uživatelských atributů pro tuto instanci komponenty.Returns a collection of custom attributes for this instance of a component.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetClassName()

Vrátí název třídy této instance komponenty.Returns the class name of this instance of a component.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetComponentName()

Vrátí název této instance komponenty.Returns the name of this instance of a component.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetConverter()

Vrátí konvertor typu pro tuto instanci komponenty.Returns a type converter for this instance of a component.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetDefaultEvent()

Vrátí výchozí událost pro tuto instanci komponenty.Returns the default event for this instance of a component.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetDefaultProperty()

Vrátí výchozí vlastnost této instance komponenty.Returns the default property for this instance of a component.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetEditor(Type)

Vrátí Editor zadaného typu pro tuto instanci komponenty.Returns an editor of the specified type for this instance of a component.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetEvents()

Vrátí události pro tuto instanci komponenty.Returns the events for this instance of a component.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetEvents(Attribute[])

Vrátí události pro tuto instanci komponenty pomocí zadaného pole atributu jako filtru.Returns the events for this instance of a component using the specified attribute array as a filter.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetProperties()

Vrátí vlastnosti pro tuto instanci komponenty.Returns the properties for this instance of a component.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetProperties(Attribute[])

Vrátí vlastnosti této instance komponenty pomocí pole atributu jako filtru.Returns the properties for this instance of a component using the attribute array as a filter.

(Zděděno od DbConnectionStringBuilder)
ICustomTypeDescriptor.GetPropertyOwner(PropertyDescriptor)

Vrátí objekt, který obsahuje vlastnost popsanou zadaným popisovačem vlastnosti.Returns an object that contains the property described by the specified property descriptor.

(Zděděno od DbConnectionStringBuilder)
IDictionary.Add(Object, Object)

Přidá prvek se zadaným klíčem a hodnotou do IDictionary objektu.Adds an element with the provided key and value to the IDictionary object.

(Zděděno od DbConnectionStringBuilder)
IDictionary.Contains(Object)

Určuje, zda IDictionary objekt obsahuje prvek se zadaným klíčem.Determines whether the IDictionary object contains an element with the specified key.

(Zděděno od DbConnectionStringBuilder)
IDictionary.GetEnumerator()

Vrátí IDictionaryEnumerator objekt pro IDictionary objekt.Returns an IDictionaryEnumerator object for the IDictionary object.

(Zděděno od DbConnectionStringBuilder)
IDictionary.IsFixedSize

Načte hodnotu, která označuje, zda IDictionary má objekt pevnou velikost.Gets a value indicating whether the IDictionary object has a fixed size.

(Zděděno od DbConnectionStringBuilder)
IDictionary.IsReadOnly

Získá hodnotu, která určuje, zda je IDictionary určena jen pro čtení.Gets a value indicating whether the IDictionary is read-only.

(Zděděno od DbConnectionStringBuilder)
IDictionary.Item[Object]

Získá nebo nastaví prvek se zadaným klíčem.Gets or sets the element with the specified key.

(Zděděno od DbConnectionStringBuilder)
IDictionary.Remove(Object)

Odebere prvek se zadaným klíčem z IDictionary objektu.Removes the element with the specified key from the IDictionary object.

(Zděděno od DbConnectionStringBuilder)
IEnumerable.GetEnumerator()

Vrací enumerátor procházející kolekci.Returns an enumerator that iterates through a collection.

(Zděděno od DbConnectionStringBuilder)

Metody rozšíření

Cast<TResult>(IEnumerable)

Přetypování prvky IEnumerable na zadaný typ.Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filtruje prvky IEnumerable založené na zadaném typu.Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Povoluje paralelní zpracování dotazu.Enables parallelization of a query.

AsQueryable(IEnumerable)

Převede IEnumerable na IQueryable .Converts an IEnumerable to an IQueryable.

Platí pro