Policy 构造函数
Initializes a new instance of the Policy class.
命名空间: Microsoft.SqlServer.Management.Dmf
程序集: Microsoft.SqlServer.Dmf(在 Microsoft.SqlServer.Dmf.dll 中)
语法
声明
Public Sub New
用法
Dim instance As New Policy()
public Policy()
public:
Policy()
new : unit -> Policy
public function Policy()
注释
默认构造函数将所有字段初始化为默认值。
示例
C#
Policy p = new Policy(ps, policyName);
p.AutomatedPolicyEvaluationMode = execMode;
p.Condition = condition.Name;
p.ScheduleUid = schedule.ScheduleUid;
if (execMode != AutomatedPolicyEvaluationMode.None) p.Enabled = true;
p.Create();