共用方式為


IVsDataConnection 介面

表示資料連接的介面。

命名空間:  Microsoft.VisualStudio.Data.Services
組件:  Microsoft.VisualStudio.Data.Services (在 Microsoft.VisualStudio.Data.Services.dll 中)

語法

'宣告
Public Interface IVsDataConnection _
    Inherits IVsDataConnectionEvents, IServiceProvider, IDisposable
public interface IVsDataConnection : IVsDataConnectionEvents, 
    IServiceProvider, IDisposable
public interface class IVsDataConnection : IVsDataConnectionEvents, 
    IServiceProvider, IDisposable
type IVsDataConnection =  
    interface
        interface IVsDataConnectionEvents
        interface IServiceProvider
        interface IDisposable
    end
public interface IVsDataConnection extends IVsDataConnectionEvents, IServiceProvider, IDisposable

IVsDataConnection 型別會公開下列成員。

屬性

  名稱 說明
公用屬性 ConnectionTimeout 取得或設定的等待時間在終止嘗試並產生錯誤逾時之前先建立連接。
公用屬性 CurrentThreadHasLock 取得表示目前執行緒是否在資料連接物件的鎖定。
公用屬性 DisplayConnectionString 取得敏感資訊,如果存在,會依照顯示格式化的連接字串。
公用屬性 EncryptedConnectionString 取得連接字串的加密版本。
公用屬性 IsLocked 取得指示目前資料連接是否已被鎖定。
公用屬性 IsNonLocking 取得表示資料連接是否支援自動鎖定。
公用屬性 Provider 取得資料提供者的 GUID。
公用屬性 SafeConnectionString 取得連接字串,不包含機密資訊。
公用屬性 Source 取得資料來源的 GUID 目前資料連接的,,如果有的話。
公用屬性 State 取得資料連接的目前狀態。

回頁首

方法

  名稱 說明
公用方法 Clone() 建立目前資料連接的複本。
公用方法 Clone(Boolean) 建立目前資料連接的複本。
公用方法 Close 關閉目前的資料連接。
公用方法 Dispose 執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。 (繼承自 IDisposable)。
公用方法 EnsureConnected 判斷目前的資料連接是否連接,,,如果沒有,則會將它開啟。
公用方法 EquivalentTo 表示所提供的資料連接資訊,這表示提供者 GUID 和連接字串,是否與資料連接的目前執行個體相等。
公用方法 GetLockedProviderObject() 擷取支援目前資料連接的基礎鎖定的資料提供者。
公用方法 GetLockedProviderObject(Int32) 在鎖定目前資料連接之後擷取基礎資料提供者。
公用方法 GetService 取得指定型別的服務物件。 (繼承自 IServiceProvider)。
公用方法 Lock() 鎖定目前資料連接。
公用方法 Lock(Int32) 鎖定目前資料連接。
公用方法 Open 開啟目前的資料連接。
公用方法 ReleaseExclusiveAccessProxy 釋放現有獨佔存取 Proxy。
公用方法 Unlock 開啟目前的資料連接。
公用方法 UnlockProviderObject 開啟目前資料連接的基礎提供者物件。

回頁首

事件

  名稱 說明
公用事件 MessageReceived 當訊息從資料來源,接收時發生。 (繼承自 IVsDataConnectionEvents)。
公用事件 StateChanged 當變更時,會發生資料連接的狀態。 (繼承自 IVsDataConnectionEvents)。

回頁首

備註

這個介面會實作為內建 DDEX 服務。

請參閱

參考

Microsoft.VisualStudio.Data.Services 命名空間