Compartir a través de


ImportPolicy Método

Imports a single policy and its associated condition from the given XML reader into the policy store.

Espacio de nombres:  Microsoft.SqlServer.Management.Dmf
Ensamblado:  Microsoft.SqlServer.Dmf (en Microsoft.SqlServer.Dmf.dll)

Sintaxis

'Declaración
Public Function ImportPolicy ( _
    xmlReader As XmlReader, _
    importEnabledState As ImportPolicyEnabledState, _
    overwriteExistingPolicy As Boolean, _
    overwriteExistingCondition As Boolean _
) As Policy
'Uso
Dim instance As PolicyStore
Dim xmlReader As XmlReader
Dim importEnabledState As ImportPolicyEnabledState
Dim overwriteExistingPolicy As Boolean
Dim overwriteExistingCondition As Boolean
Dim returnValue As Policy

returnValue = instance.ImportPolicy(xmlReader, _
    importEnabledState, overwriteExistingPolicy, _
    overwriteExistingCondition)
public Policy ImportPolicy(
    XmlReader xmlReader,
    ImportPolicyEnabledState importEnabledState,
    bool overwriteExistingPolicy,
    bool overwriteExistingCondition
)
public:
Policy^ ImportPolicy(
    XmlReader^ xmlReader, 
    ImportPolicyEnabledState importEnabledState, 
    bool overwriteExistingPolicy, 
    bool overwriteExistingCondition
)
member ImportPolicy : 
        xmlReader:XmlReader * 
        importEnabledState:ImportPolicyEnabledState * 
        overwriteExistingPolicy:bool * 
        overwriteExistingCondition:bool -> Policy 
public function ImportPolicy(
    xmlReader : XmlReader, 
    importEnabledState : ImportPolicyEnabledState, 
    overwriteExistingPolicy : boolean, 
    overwriteExistingCondition : boolean
) : Policy

Parámetros

Valor devuelto

Tipo: Microsoft.SqlServer.Management.Dmf. . :: . .Policy
A single Policy and its associated condition from the given XML reader.

Comentarios

This method throws an exception if a policy or a condition with the same name already exists.