共用方式為


DacPackage 類別

Representation of the artifact that contains the definition of a data-tier application.

繼承階層

System.Object
  Microsoft.SqlServer.Dac.DacPackage

命名空間:  Microsoft.SqlServer.Dac
組件:  Microsoft.SqlServer.Dac (在 Microsoft.SqlServer.Dac.dll 中)

語法

'宣告
Public NotInheritable Class DacPackage _
    Implements IDisposable
'用途
Dim instance As DacPackage
public sealed class DacPackage : IDisposable
public ref class DacPackage sealed : IDisposable
[<SealedAttribute>]
type DacPackage =  
    class 
        interface IDisposable 
    end
public final class DacPackage implements IDisposable

DacPackage 型別公開下列成員。

屬性

  名稱 說明
公用屬性 Description Get an optional summary of this package.
公用屬性 Name Get identifier for this package.
公用屬性 PostDeploymentScript Get stream used to read and write script executed after deploying schema contained in this package.
公用屬性 PreDeploymentScript Get stream used to read and write script executed prior to deploying schema contained in this package.
公用屬性 Version Get version information for this package.

上層

方法

  名稱 說明
公用方法 Dispose Release the resources held by this instance.
公用方法 Equals (繼承自 Object。)
公用方法 GetHashCode (繼承自 Object。)
公用方法 GetType (繼承自 Object。)
公用方法靜態成員 Load(Stream) Load a package from the specified Stream.
公用方法靜態成員 Load(String) Load a package file specified by fileName.
公用方法靜態成員 Load(Stream, DacSchemaModelStorageType) Loads a package from the specified Stream.
公用方法靜態成員 Load(String, DacSchemaModelStorageType) Loada a package file specified by fileName.
公用方法靜態成員 Load(Stream, DacSchemaModelStorageType, FileAccess) Load a package from the specified Stream.
公用方法靜態成員 Load(String, DacSchemaModelStorageType, FileAccess) Load a package file specified by fileName.
公用方法 ToString (繼承自 Object。)
公用方法 Unpack Place the contents of this package into the directory specified by directoryPath.

上層

擴充 方法

  名稱 說明
公用擴充方法 GetCollationString Gets the collation associated with the specified package. (由 DacExtensions 定義。)
公用擴充方法 UpdateModel 更新 DacPackage 中的模型,以新的模型取代目前的模型。在更新之前,此模型將會經過驗證,如果遇到錯誤則會擲回 DacServicesException。如果呼叫端想要封鎖警告和錯誤,他們必須藉由呼叫 Validate() 及檢查傳回的訊息中是否包含任何錯誤或警告來驗證此模型。注意:只有模型會被取代 - 所有其他成品 (例如重構記錄、預先部署指令碼、部署後指令碼和參與者成品) 都不會更動。如果這些成品中有任何一個依賴不再位於更新之模型中的元素,則部署可能會失敗。呼叫端必須負責確認這些成品與新的模型一致。Package API 可用來更新其他成品 (例如重構記錄和指令碼),並使其與更新的模型維持一致狀態。這些成品會儲存為封裝組件,並以其 URI 加以識別。封裝組件可以使用 GetParts() 加以檢查。請參閱 Package API,以取得有關更新封裝組件的進一步資訊。 (由 DacPackageExtensions 定義。)

上層

執行緒安全性

這個型別的任何公用 static (在 Visual Basic 中為 Shared) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。

請參閱

參考

Microsoft.SqlServer.Dac 命名空間