SqlConnectionStringBuilder Sınıf

Tanım

Sınıfı tarafından kullanılan bağlantı dizelerinin içeriğini oluşturmak ve yönetmek için basit bir yol sağlar SqlConnection .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
Devralma
SqlConnectionStringBuilder
Öznitelikler

Örnekler

Aşağıdaki konsol uygulaması, bir SQL Server veritabanı için bağlantı dizeleri oluşturur.The following console application builds connection strings for a SQL Server database. Kod, SqlConnectionStringBuilder bağlantı dizesi oluşturmak için bir sınıf kullanır ve sonra ConnectionString SqlConnectionStringBuilder örnek özelliğini bağlantı sınıfının oluşturucusuna geçirir.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. Örnek ayrıca var olan bir bağlantı dizesini ayrıştırır ve bağlantı dizesinin içeriğini işlemek için çeşitli yollar gösterir.The example also parses an existing connection string and demonstrates various ways of manipulating the connection string's contents.

Not

Bu örnek SqlConnectionStringBuilder , bağlantı dizeleriyle nasıl çalıştığını göstermek için bir parola içerir.This example includes a password to demonstrate how SqlConnectionStringBuilder works with connection strings. Uygulamalarınızda Windows Kimlik Doğrulaması kullanmanızı öneririz.In your applications, we recommend that you use Windows Authentication. Bir parola kullanmanız gerekiyorsa, uygulamanıza sabit kodlanmış bir parola eklemeyin.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

Açıklamalar

Bağlantı dizesi Oluşturucusu, geliştiricilerin program aracılığıyla sözdizimsel olarak doğru bağlantı dizeleri oluşturmasını ve sınıfın özelliklerini ve yöntemlerini kullanarak var olan bağlantı dizelerini ayrıştırmasını ve yeniden oluşturmasını sağlar.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. Bağlantı dizesi Oluşturucusu SQL Server tarafından izin verilen bilinen anahtar/değer çiftlerine karşılık gelen kesin türü belirtilmiş özellikler sağlar.The connection string builder provides strongly typed properties corresponding to the known key/value pairs allowed by SQL Server. Uygulamaların bir parçası olarak bağlantı dizeleri oluşturması gereken geliştiriciler, SqlConnectionStringBuilder bağlantı dizelerini derlemek ve değiştirmek için sınıfını kullanabilir.Developers needing to create connection strings as part of applications can use the SqlConnectionStringBuilder class to build and modify connection strings. Sınıfı ayrıca bir uygulama yapılandırma dosyasında depolanan bağlantı dizelerini yönetmeyi kolaylaştırır.The class also makes it easy to manage connection strings stored in an application configuration file.

, SqlConnectionStringBuilder Geçerli anahtar/değer çiftleri için denetim gerçekleştirir.The SqlConnectionStringBuilder performs checks for valid key/value pairs. Bu nedenle, geçersiz bağlantı dizeleri oluşturmak için bu sınıfı kullanamazsınız; geçersiz çiftleri eklemeye çalışmak, bir özel durum oluşturur.Therefore, you cannot use this class to create invalid connection strings; trying to add invalid pairs will throw an exception. Sınıfı, sabit bir eş anlamlı koleksiyonu tutar ve bir eş anlamadan ilgili iyi bilinen anahtar adına çeviri yapabilir.The class maintains a fixed collection of synonyms and can translate from a synonym to the corresponding well-known key name.

Örneğin, bir değeri almak için Item özelliğini kullandığınızda, ihtiyacınız olan anahtar için herhangi bir eşanlamlı içeren bir dize belirtebilirsiniz.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. Örneğin, öğe özelliği veya yöntemi gibi anahtar adını içeren bir dize gerektiren herhangi bir üyeyi kullandığınızda bir bağlantı dizesi içinde bu anahtar Için "ağ adresi", "addr" veya herhangi bir kabul edilebilir eş anlamlı eşanlamlı belirtebilirsiniz Remove .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. ConnectionStringKabul edilebilir eş anlamlılar listesinin tam listesi için özelliğine bakın.See the ConnectionString property for a full list of acceptable synonyms.

Öğe özelliği işleyicileri kötü amaçlı girişler eklemeye çalışır.The Item property handles tries to insert malicious entries. Örneğin, varsayılan öğe özelliği (C# ' deki Dizin Oluşturucu) kullanılarak aşağıdaki kod, iç içe geçmiş anahtar/değer çiftinin doğru şekilde çıkar: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);

Sonuç, güvenli bir şekilde geçersiz değeri işleyen aşağıdaki bağlantı dizesidir: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

Oluşturucular

SqlConnectionStringBuilder()

SqlConnectionStringBuilder sınıfının yeni bir örneğini başlatır.Initializes a new instance of the SqlConnectionStringBuilder class.

SqlConnectionStringBuilder(String)

SqlConnectionStringBuilder sınıfının yeni bir örneğini başlatır.Initializes a new instance of the SqlConnectionStringBuilder class. Sağlanan bağlantı dizesi, örneğin iç bağlantı bilgileri için verileri sağlar.The provided connection string provides the data for the instance's internal connection information.

Özellikler

ApplicationIntent

SQL Server kullanılabilirlik grubundaki bir veritabanına bağlanırken uygulama iş yükü türünü bildirir.Declares the application workload type when connecting to a database in an SQL Server Availability Group. Bu özelliğin değerini ile ayarlayabilirsiniz ApplicationIntent .You can set the value of this property with ApplicationIntent. Always on kullanılabilirlik grupları için SqlClient desteği hakkında daha fazla bilgi için bkz. yüksek kullanılabilirlik Için SqlClient desteği, olağanüstü durum kurtarma.For more information about SqlClient support for Always On Availability Groups, see SqlClient Support for High Availability, Disaster Recovery.

ApplicationName

Bağlantı dizesiyle ilişkili uygulamanın adını alır veya ayarlar.Gets or sets the name of the application associated with the connection string.

AsynchronousProcessing

Bu bağlantı dizesi kullanılarak oluşturulan bağlantı tarafından zaman uyumsuz işleme izin verilip verilmeyeceğini gösteren bir Boole değeri alır veya ayarlar.Gets or sets a Boolean value that indicates whether asynchronous processing is allowed by the connection created by using this connection string.

AttachDBFilename

Birincil veri dosyasının adını içeren bir dize alır veya ayarlar.Gets or sets a string that contains the name of the primary data file. Bu, eklenebilir bir veritabanının tam yol adını içerir.This includes the full path name of an attachable database.

Authentication

Bağlantı dizesinin kimlik doğrulamasını alır.Gets the authentication of the connection string.

BrowsableConnectionString

ConnectionStringÖzelliğin Visual Studio tasarımcıları 'nda görünür olup olmadığını gösteren bir değer alır veya ayarlar.Gets or sets a value that indicates whether the ConnectionString property is visible in Visual Studio designers.

(Devralındığı yer: DbConnectionStringBuilder)
ColumnEncryptionSetting

Bağlantı dizesi oluşturucusunun sütun şifreleme ayarlarını alır veya ayarlar.Gets or sets the column encryption settings for the connection string builder.

ConnectionReset
Kullanımdan kalktı.

Kullanımdan kalktı.Obsolete. Bağlantı havuzundan çizildiğinde bağlantının sıfırlanıp sıfırlanmadığını gösteren bir Boole değeri alır veya ayarlar.Gets or sets a Boolean value that indicates whether the connection is reset when drawn from the connection pool.

ConnectionString

İle ilişkili bağlantı dizesini alır veya ayarlar DbConnectionStringBuilder .Gets or sets the connection string associated with the DbConnectionStringBuilder.

(Devralındığı yer: DbConnectionStringBuilder)
ConnectRetryCount

Boştaki bir bağlantı hatası olduğunu tanımladıktan sonra denenen yeniden bağlantı sayısı.The number of reconnections attempted after identifying that there was an idle connection failure. Bu, 0 ile 255 arasında bir tamsayı olmalıdır.This must be an integer between 0 and 255. Varsayılan değer 1 ' dir.Default is 1. Boştaki bağlantı hatalarıyla yeniden bağlamayı devre dışı bırakmak için 0 olarak ayarlayın.Set to 0 to disable reconnecting on idle connection failures. ArgumentExceptionİzin verilen aralığın dışında bir değere ayarlanırsa, oluşturulur.An ArgumentException will be thrown if set to a value outside of the allowed range.

ConnectRetryInterval

Bir boşta bağlantı hatası olduğunu tanımladıktan sonra her bir yeniden bağlantı girişimi arasındaki süre (saniye cinsinden).Amount of time (in seconds) between each reconnection attempt after identifying that there was an idle connection failure. Bu, 1 ile 60 arasında bir tamsayı olmalıdır.This must be an integer between 1 and 60. Varsayılan değer 10 saniyedir.The default is 10 seconds. ArgumentExceptionİzin verilen aralığın dışında bir değere ayarlanırsa, oluşturulur.An ArgumentException will be thrown if set to a value outside of the allowed range.

ConnectTimeout

Girişimi sonlandırıp bir hata oluşturmadan önce sunucuya bağlantı için beklenecek süreyi (saniye cinsinden) alır veya ayarlar.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

SQL Server istemci/sunucu veya işlem içi bağlantısının yapılıp yapılmayacağını gösteren bir değer alır veya ayarlar.Gets or sets a value that indicates whether a client/server or in-process connection to SQL Server should be made.

Count

Özelliği içinde yer alan anahtarların geçerli sayısını alır ConnectionString .Gets the current number of keys that are contained within the ConnectionString property.

(Devralındığı yer: DbConnectionStringBuilder)
CurrentLanguage

SQL Server dili kayıt adını alır veya ayarlar.Gets or sets the SQL Server Language record name.

DataSource

Bağlanılacak SQL Server örneğinin adını veya ağ adresini alır veya ayarlar.Gets or sets the name or network address of the instance of SQL Server to connect to.

EnclaveAttestationUrl

Şifreleme tabanlı Always Encrypted kullanılacak şifreleme kanıtlama URL 'sini alır veya ayarlar.Gets or sets the enclave attestation Url to be used with enclave based Always Encrypted.

Encrypt

Sunucuda bir sertifika yüklüyse, istemci ile sunucu arasında gönderilen tüm veriler için SQL Server SSL şifrelemesini kullanıp kullanmadığını gösteren bir Boole değeri alır veya ayarlar.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

SQL Server bağlantı havuzunun, oluşturma iş parçacığının geçerli işlem bağlamındaki bağlantıyı otomatik olarak listelemediğini belirten bir Boole değeri alır veya ayarlar.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

Birincil sunucu kapalıysa Bağlanılacak iş ortağı sunucusunun adını veya adresini alır veya ayarlar.Gets or sets the name or address of the partner server to connect to if the primary server is down.

InitialCatalog

Bağlantıyla ilişkili veritabanının adını alır veya ayarlar.Gets or sets the name of the database associated with the connection.

IntegratedSecurity

Kullanıcı KIMLIĞI ve parolanın bağlantıda (ne zaman false ) veya geçerli Windows hesabı kimlik bilgilerinin kimlik doğrulaması için kullanılıp kullanılmadığını (ne zaman) gösteren bir Boole değeri alır veya ayarlar 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

Değerinin sabit boyutta olup olmadığını gösteren bir değer alır SqlConnectionStringBuilder .Gets a value that indicates whether the SqlConnectionStringBuilder has a fixed size.

IsFixedSize

Değerinin sabit boyutta olup olmadığını gösteren bir değer alır DbConnectionStringBuilder .Gets a value that indicates whether the DbConnectionStringBuilder has a fixed size.

(Devralındığı yer: DbConnectionStringBuilder)
IsReadOnly

Salt okunurdur olduğunu gösteren bir değer alır DbConnectionStringBuilder .Gets a value that indicates whether the DbConnectionStringBuilder is read-only.

(Devralındığı yer: DbConnectionStringBuilder)
Item[String]

Belirtilen anahtarla ilişkili değeri alır veya ayarlar.Gets or sets the value associated with the specified key. C# ' de, bu özellik dizin oluşturucudır.In C#, this property is the indexer.

Keys

ICollectionİçindeki anahtarları içeren bir öğesini alır SqlConnectionStringBuilder .Gets an ICollection that contains the keys in the SqlConnectionStringBuilder.

LoadBalanceTimeout

Bağlantı havuzunda yok edilmeden önce bağlantı için en kısa süreyi saniye cinsinden alır veya ayarlar.Gets or sets the minimum time, in seconds, for the connection to live in the connection pool before being destroyed.

MaxPoolSize

Bu belirli bağlantı dizesinin bağlantı havuzunda izin verilen en fazla bağlantı sayısını alır veya ayarlar.Gets or sets the maximum number of connections allowed in the connection pool for this specific connection string.

MinPoolSize

Bu belirli bağlantı dizesinin bağlantı havuzunda izin verilen en az bağlantı sayısını alır veya ayarlar.Gets or sets the minimum number of connections allowed in the connection pool for this specific connection string.

MultipleActiveResultSets

Doğru olduğunda, bir uygulama birden çok etkin sonuç kümesi (MARS) tutabilir.When true, an application can maintain multiple active result sets (MARS). Yanlış olduğunda, bir uygulamanın bu bağlantı üzerinde başka bir toplu işi yürütebilmesi için bir toplu işlemin tüm sonuç kümelerini işlemesi veya iptal etmeniz gerekir.When false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.

Daha fazla bilgi için bkz. birden çok etkin sonuç kümesi (mars).For more information, see Multiple Active Result Sets (MARS).

MultiSubnetFailover

Uygulamanız, farklı alt ağlardaki her zaman açık kullanılabilirlik grubuna (AG) veya her zaman yük devretme kümesi örneğine (FCı) bağlanıyorsa, MultiSubnetFailover = true olarak ayarlanması, (Şu anda) etkin sunucu ile daha hızlı bir şekilde algılama ve bağlantı sağlar.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. Always on özellikleri için SqlClient desteği hakkında daha fazla bilgi için bkz. yüksek kullanılabilirlik Için SqlClient desteği, olağanüstü durum kurtarma.For more information about SqlClient support for the Always On features, see SqlClient Support for High Availability, Disaster Recovery.

NetworkLibrary

SQL Server bağlantı kurmak için kullanılan ağ kitaplığının adını içeren bir dize alır veya ayarlar.Gets or sets a string that contains the name of the network library used to establish a connection to the SQL Server.

PacketSize

Bir SQL Server örneğiyle iletişim kurmak için kullanılan ağ paketlerinin bayt cinsinden boyutunu alır veya ayarlar.Gets or sets the size in bytes of the network packets used to communicate with an instance of SQL Server.

Password

SQL Server hesabının parolasını alır veya ayarlar.Gets or sets the password for the SQL Server account.

PersistSecurityInfo

Bağlantı açıksa veya herhangi bir zaman açık durumdaysa, parola gibi güvenlik duyarlı bilgilerin bağlantının bir parçası olarak döndürülmeyeceğini belirten bir Boole değeri alır veya ayarlar.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

Bir bağlantı havuzu için engelleme dönemi davranışı.The blocking period behavior for a connection pool.

Pooling

Bağlantının istendiği her seferinde bağlantının havuza kaydedilip edilmeyeceğini veya açık olarak açılacağını belirten bir Boole değeri alır veya ayarlar.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

Çoğaltmanın, bağlantı kullanılarak desteklenip desteklenmediğini belirten bir Boole değeri alır veya ayarlar.Gets or sets a Boolean value that indicates whether replication is supported using the connection.

TransactionBinding

Bağlantının kayıtlı bir işlemle ilişkilendirmesini nasıl koruduğu gösteren bir dize değeri alır veya ayarlar System.Transactions .Gets or sets a string value that indicates how the connection maintains its association with an enlisted System.Transactions transaction.

TransparentNetworkIPResolution

Bu anahtarın değeri olarak ayarlandığında true , uygulamanın belirli BIR DNS girişi için tüm IP adreslerini alması ve listedeki ilk bir bağlantı ile bağlanmayı denemesi gerekir.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. Bağlantı, 0,5 saniye içinde oluşturulmazsa, uygulama tüm diğerlerine paralel olarak bağlanmaya çalışır.If the connection is not established within 0.5 seconds, the application will try to connect to all others in parallel. İlk yanıt olduğunda, uygulama yanıtlayanın IP adresiyle bağlantı kurar.When the first answers, the application will establish the connection with the respondent IP address.

TrustServerCertificate

Güven doğrulaması için sertifika zincirini atlayarak kanalın şifrelenip şifrelenmeyeceğini belirten bir değer alır veya ayarlar.Gets or sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to validate trust.

TypeSystemVersion

Uygulamanın beklediği tür sistemini gösteren bir dize değeri alır veya ayarlar.Gets or sets a string value that indicates the type system the application expects.

UserID

SQL Server bağlanırken kullanılacak kullanıcı KIMLIĞINI alır veya ayarlar.Gets or sets the user ID to be used when connecting to SQL Server.

UserInstance

Varsayılan SQL Server Express örneğinden bağlantının, çağıran hesabı altında çalışan bir çalışma zamanı tarafından başlatılan örneğe yönlendirilip yönlendirilmeyeceğini gösteren bir değer alır veya ayarlar.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

ICollectionİçindeki değerleri içeren bir öğesini alır SqlConnectionStringBuilder .Gets an ICollection that contains the values in the SqlConnectionStringBuilder.

WorkstationID

SQL Server bağlanan iş istasyonunun adını alır veya ayarlar.Gets or sets the name of the workstation connecting to SQL Server.

Yöntemler

Add(String, Object)

Belirtilen anahtar ve değere sahip bir giriş ekleyin DbConnectionStringBuilder .Adds an entry with the specified key and value into the DbConnectionStringBuilder.

(Devralındığı yer: DbConnectionStringBuilder)
Clear()

Örneğin içeriğini temizler SqlConnectionStringBuilder .Clears the contents of the SqlConnectionStringBuilder instance.

ClearPropertyDescriptors()

İlişkili nesne koleksiyonunu temizler PropertyDescriptor DbConnectionStringBuilder .Clears the collection of PropertyDescriptor objects on the associated DbConnectionStringBuilder.

(Devralındığı yer: DbConnectionStringBuilder)
ContainsKey(String)

' In SqlConnectionStringBuilder belirli bir anahtar içerip içermediğini belirler.Determines whether the SqlConnectionStringBuilder contains a specific key.

Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.Determines whether the specified object is equal to the current object.

(Devralındığı yer: Object)
EquivalentTo(DbConnectionStringBuilder)

Bu nesnedeki bağlantı bilgilerini, DbConnectionStringBuilder sağlanan nesnedeki bağlantı bilgileriyle karşılaştırır.Compares the connection information in this DbConnectionStringBuilder object with the connection information in the supplied object.

(Devralındığı yer: DbConnectionStringBuilder)
GetHashCode()

Varsayılan karma işlevi olarak işlev görür.Serves as the default hash function.

(Devralındığı yer: Object)
GetProperties(Hashtable)

HashtableBunun, belirtilen tüm özellikleri hakkında bilgi içeren bir örneği doldurur DbConnectionStringBuilder .Fills a supplied Hashtable with information about all the properties of this DbConnectionStringBuilder.

(Devralındığı yer: DbConnectionStringBuilder)
GetType()

TypeGeçerli örneği alır.Gets the Type of the current instance.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli bir basit kopyasını oluşturur Object .Creates a shallow copy of the current Object.

(Devralındığı yer: Object)
Remove(String)

Örnekten belirtilen anahtarla girdiyi kaldırır SqlConnectionStringBuilder .Removes the entry with the specified key from the SqlConnectionStringBuilder instance.

ShouldSerialize(String)

Belirtilen anahtarın bu örnekte bulunup bulunmadığını gösterir SqlConnectionStringBuilder .Indicates whether the specified key exists in this SqlConnectionStringBuilder instance.

ToString()

Bu ile ilişkili bağlantı dizesini döndürür DbConnectionStringBuilder .Returns the connection string associated with this DbConnectionStringBuilder.

(Devralındığı yer: DbConnectionStringBuilder)
TryGetValue(String, Object)

Bu değerden sağlanan anahtara karşılık gelen bir değer alır SqlConnectionStringBuilder .Retrieves a value corresponding to the supplied key from this SqlConnectionStringBuilder.

Belirtik Arabirim Kullanımları

ICollection.CopyTo(Array, Int32)

Öğesinin öğelerini ICollection Array belirli bir dizinden başlayarak öğesine kopyalar Array .Copies the elements of the ICollection to an Array, starting at a particular Array index.

(Devralındığı yer: DbConnectionStringBuilder)
ICollection.IsSynchronized

Erişiminin ICollection eşitlenip eşitlenmediğini (iş parçacığı güvenli) gösteren bir değer alır.Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(Devralındığı yer: DbConnectionStringBuilder)
ICollection.SyncRoot

Erişimini eşitlemede kullanılabilecek bir nesne alır ICollection .Gets an object that can be used to synchronize access to the ICollection.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetAttributes()

Bir bileşenin bu örneği için özel özniteliklerin bir koleksiyonunu döndürür.Returns a collection of custom attributes for this instance of a component.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetClassName()

Bir bileşenin bu örneğinin sınıf adını döndürür.Returns the class name of this instance of a component.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetComponentName()

Bir bileşenin bu örneğinin adını döndürür.Returns the name of this instance of a component.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetConverter()

Bir bileşenin bu örneği için tür dönüştürücüsü döndürür.Returns a type converter for this instance of a component.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetDefaultEvent()

Bir bileşenin bu örneği için varsayılan olayı döndürür.Returns the default event for this instance of a component.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetDefaultProperty()

Bir bileşenin bu örneği için varsayılan özelliği döndürür.Returns the default property for this instance of a component.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetEditor(Type)

Bir bileşenin bu örneği için belirtilen türün bir düzenleyicisini döndürür.Returns an editor of the specified type for this instance of a component.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetEvents()

Bir bileşenin bu örneği için olayları döndürür.Returns the events for this instance of a component.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetEvents(Attribute[])

Belirtilen öznitelik dizisini bir filtre olarak kullanarak bir bileşenin bu örneği için olayları döndürür.Returns the events for this instance of a component using the specified attribute array as a filter.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetProperties()

Bir bileşenin bu örneği için özellikleri döndürür.Returns the properties for this instance of a component.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetProperties(Attribute[])

Öznitelik dizisini filtre olarak kullanarak bir bileşenin bu örneği için özellikleri döndürür.Returns the properties for this instance of a component using the attribute array as a filter.

(Devralındığı yer: DbConnectionStringBuilder)
ICustomTypeDescriptor.GetPropertyOwner(PropertyDescriptor)

Belirtilen özellik tanımlayıcısı tarafından tanımlanan özelliği içeren bir nesne döndürür.Returns an object that contains the property described by the specified property descriptor.

(Devralındığı yer: DbConnectionStringBuilder)
IDictionary.Add(Object, Object)

Nesneye, girilen anahtar ve değeri içeren bir öğe ekler IDictionary .Adds an element with the provided key and value to the IDictionary object.

(Devralındığı yer: DbConnectionStringBuilder)
IDictionary.Contains(Object)

IDictionaryNesnenin belirtilen anahtara sahip bir öğe içerip içermediğini belirler.Determines whether the IDictionary object contains an element with the specified key.

(Devralındığı yer: DbConnectionStringBuilder)
IDictionary.GetEnumerator()

IDictionaryEnumeratorNesne için bir nesne döndürür IDictionary .Returns an IDictionaryEnumerator object for the IDictionary object.

(Devralındığı yer: DbConnectionStringBuilder)
IDictionary.IsFixedSize

Nesnenin sabit boyutta olup olmadığını gösteren bir değer alır IDictionary .Gets a value indicating whether the IDictionary object has a fixed size.

(Devralındığı yer: DbConnectionStringBuilder)
IDictionary.IsReadOnly

IDictionary öğesinin salt okunur olup olmadığını belirten bir değer alır.Gets a value indicating whether the IDictionary is read-only.

(Devralındığı yer: DbConnectionStringBuilder)
IDictionary.Item[Object]

Belirtilen anahtara sahip öğeyi alır veya ayarlar.Gets or sets the element with the specified key.

(Devralındığı yer: DbConnectionStringBuilder)
IDictionary.Remove(Object)

Nesnesinden belirtilen anahtara sahip öğeyi kaldırır IDictionary .Removes the element with the specified key from the IDictionary object.

(Devralındığı yer: DbConnectionStringBuilder)
IEnumerable.GetEnumerator()

Bir toplulukta tekrarlanan bir numaralandırıcı döndürür.Returns an enumerator that iterates through a collection.

(Devralındığı yer: DbConnectionStringBuilder)

Uzantı Metotları

Cast<TResult>(IEnumerable)

Öğesinin öğelerini IEnumerable belirtilen türe yayınlar.Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Öğesinin öğelerini IEnumerable belirtilen bir türe göre filtreler.Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Bir sorgunun paralelleştirilmesini mümkün hale getirme.Enables parallelization of a query.

AsQueryable(IEnumerable)

Bir IEnumerable öğesine dönüştürür IQueryable .Converts an IEnumerable to an IQueryable.

Şunlara uygulanır