Policy Constructor
Collapse the table of content
Expand the table of content

Policy Constructor ()

 

Initializes a new instance of the Policy class.

Namespace:   Microsoft.SqlServer.Management.Dmf
Assembly:  Microsoft.SqlServer.Dmf (in Microsoft.SqlServer.Dmf.dll)

public Policy()

The default constructor initializes any fields to their default values.

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();
Return to top
Show:
© 2016 Microsoft