Freigeben über


Policy-Konstruktor

Initializes a new instance of the Policy class.

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

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New Policy()
public Policy()
public:
Policy()
new : unit -> Policy
public function Policy()

Hinweise

Der Standardkonstruktor initialisiert alle Felder mit ihren Standardwerten.

Beispiele

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();