PolicyStore.ImportPolicy 메서드
Imports a single policy and its associated condition from the given XML reader into the policy store.
네임스페이스: Microsoft.SqlServer.Management.Dmf
어셈블리: Microsoft.SqlServer.Dmf(Microsoft.SqlServer.Dmf.dll)
구문
‘선언
Public Function ImportPolicy ( _
xmlReader As XmlReader, _
importEnabledState As ImportPolicyEnabledState, _
overwriteExistingPolicy As Boolean, _
overwriteExistingCondition As Boolean _
) As Policy
‘사용 방법
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
매개 변수
- xmlReader
유형: System.Xml.XmlReader
An XmlReader object that specifies the XML reader.
- importEnabledState
유형: Microsoft.SqlServer.Management.Dmf.ImportPolicyEnabledState
An ImportPolicyEnabledState value that specifies whether the import policy is enabled.
- overwriteExistingPolicy
유형: System.Boolean
A Boolean value that specifies whether the existing policy is overwritten.
- overwriteExistingCondition
유형: System.Boolean
A Boolean value that specifies whether the existing condition is overwritten.
반환 값
유형: Microsoft.SqlServer.Management.Dmf.Policy
A single Policy and its associated condition from the given XML reader.
주의
This method throws an exception if a policy or a condition with the same name already exists.