ContributorArgumentConfiguration 类

定义

此类的实例由生成和部署参与者在设计时创建,以初始化在运行时传递给它们的参数。

在 SSDT 中,必须使用 .sqlproj 文件或引用的 .targets 文件中的 ContributorArguments 属性指定这些参数。 例如,若要添加值为“true”的“RunMyContributor”参数,将添加以下内容: <PropertyGroup><ContributorArguments Condition=“'$(Configuration)' == 'Debug''”> $(ContributorArguments):RunMyContributor=True; </ContributorArguments><PropertyGroup>

在这种情况下,只会为调试配置添加参数。 使用上述配置,可以从 MSBuild 环境中收集信息并将其传递给参与者。

也可以在使用 BuildPackage(String, TSqlModel, PackageMetadata, PackageOptions) 和指定 PackageOptions创建包时指定这些值。

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

构造函数

名称 说明
ContributorArgumentConfiguration()

初始化 ContributorArgumentConfiguration 类的新实例。

ContributorArgumentConfiguration(String, String)

初始化 ContributorArgumentConfiguration 类的新实例。

属性

名称 说明
Name

获取或设置参数的名称。

Value

获取或设置以字符串表示的参数的值。

适用于