Конструктор 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
)
Параметры
- parent
Тип: Microsoft.SqlServer.Management.Dmf. . :: . .PolicyStore
A PolicyStore object value that specifies the policy store to which the policy belongs.
- name
Тип: System. . :: . .String
A String value that specifies the name of the 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();
См. также