다음을 통해 공유


Policy 생성자 (PolicyStore, String)

Initializes a new instance of the Policy class.

네임스페이스:  Microsoft.SqlServer.Management.Dmf
어셈블리:  Microsoft.SqlServer.Dmf(Microsoft.SqlServer.Dmf.dll)

구문

‘선언
Public Sub New ( _
    parent As PolicyStore, _
    name As String _
)
‘사용 방법
Dim parent As PolicyStore
Dim name As String

Dim instance As New Policy(parent, _
    name)
public Policy(
    PolicyStore parent,
    string name
)
public:
Policy(
    PolicyStore^ parent, 
    String^ name
)
new : 
        parent:PolicyStore * 
        name:string -> Policy
public function Policy(
    parent : PolicyStore, 
    name : String
)

매개 변수

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