ContributorArgumentConfiguration 類別

定義

此類別的實例由建置與部署貢獻者在設計時建立,用以初始化執行時傳遞給他們的參數。

在 SSDT 中,這些參數必須在 .sqlproj 檔案或參考的 .targets 檔案中,使用 ContributorArguments 屬性來指定。 例如,若要新增值為「true」的「RunMyContributor」參數,會加入以下參數: <PropertyGroup><ContributorArguments 條件=“'$(Configuration)' == 'Debug''”> $(ContributorArguments);RunMyContributor=True; </貢獻者論點><PropertyGroup>

此時參數僅用於除錯設定。 利用上述配置,可以從 MSBuild 環境中收集資訊並傳遞給貢獻者。

在建立套件時,也可以透過使用 BuildPackage(String, TSqlModel, PackageMetadata, PackageOptions) 並指定 PackageOptions來指定這些參數。

public sealed class ContributorArgumentConfiguration
type ContributorArgumentConfiguration = class
Public NotInheritable Class ContributorArgumentConfiguration
繼承
ContributorArgumentConfiguration

建構函式

名稱 Description
ContributorArgumentConfiguration()

初始化 ContributorArgumentConfiguration 類別的新執行個體。

ContributorArgumentConfiguration(String, String)

初始化 ContributorArgumentConfiguration 類別的新執行個體。

屬性

名稱 Description
Name

取得或設定參數名稱。

Value

取得或設定以字串表示的參數值。

適用於