DataProtectionPermission.FromXml(SecurityElement) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
XML 인코딩에서 특정 상태를 가진 사용 권한을 다시 생성합니다.
public:
override void FromXml(System::Security::SecurityElement ^ securityElement);
public:
override void FromXml(System::Security::SecurityElement ^ e);
public override void FromXml (System.Security.SecurityElement securityElement);
public override void FromXml (System.Security.SecurityElement e);
override this.FromXml : System.Security.SecurityElement -> unit
override this.FromXml : System.Security.SecurityElement -> unit
Public Overrides Sub FromXml (securityElement As SecurityElement)
Public Overrides Sub FromXml (e As SecurityElement)
매개 변수
- securityElemente
- SecurityElement
사용 권한을 다시 생성하는 데 사용된 XML 인코딩을 포함하는 SecurityElement 입니다.
예외
securityElement
이(가) null
인 경우
예제
다음 코드 예제에서는 메서드의 사용을 보여 있습니다 FromXml . 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 DataProtectionPermission 클래스입니다.
참고
코드 예제는 메서드의 사용을 보여 주는 것이 아니라 메서드의 동작을 표시하기 위한 것입니다. 으로 보안 인프라를 권한 클래스의 메서드를 사용 하는 일반적으로 애플리케이션에서 사용 되지 됩니다.
Console::WriteLine( "Using an XML round trip to reset the fourth "
"permission." );
sp4->FromXml( sp2->ToXml() );
rc = sp4->Equals( sp2 );
Console::WriteLine( "Does the XML round trip result equal the "
"original permission? {0}", (rc ? (String^)"Yes" : "No") );
Console.WriteLine("Using an XML round trip to reset the fourth " +
"permission.");
sp4.FromXml(sp2.ToXml());
rc = sp4.Equals(sp2);
Console.WriteLine("Does the XML round trip result equal the " +
"original permission? " + (rc ? "Yes" : "No"));
Console.WriteLine("Using an XML round trip to reset the fourth " + "permission.")
sp4.FromXml(sp2.ToXml())
rc = sp4.Equals(sp2)
Console.WriteLine("Does the XML round trip result equal the " + "original permission? " + IIf(rc, "Yes", "No")) 'TODO: For performance reasons this should be changed to nested IF statements
End Sub
설명
이 메서드는 FromXml 클래스에서 정의한 DataProtectionPermission XML 인코딩에서 개체를 다시 생성합니다 SecurityElement . 메서드를 ToXml 사용하여 상태 정보를 포함하여 XML로 인코딩합니다 DataProtectionPermission.