Konstruktor Policy (PolicyStore, String)
Inicjuje nowe wystąpienie Policy klasy
Przestrzeń nazw: Microsoft.SqlServer.Management.Dmf
Zestaw: Microsoft.SqlServer.Dmf (w Microsoft.SqlServer.Dmf.dll)
Syntax
'Deklaracja
Public Sub New ( _
parent As PolicyStore, _
name As String _
)
'Użycie
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
)
Parameters
- parent
Typ: Microsoft.SqlServer.Management.Dmf. . :: . .PolicyStore
A PolicyStore obiektu wartość określająca magazynu zasad, do której należy zasadę.
- name
Typ: System. . :: . .String
A String wartość, która określa nazwę zasady.
Przykłady
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();
Zobacz także