XML エンコーディングから、指定した状態のセキュリティ オブジェクトを再構築します。
Public Overridable Sub FromXml( _
ByVal et As SecurityElement _) Implements ISecurityEncodable.FromXml
[C#]
public virtual void FromXml(SecurityElementet);
[C++]
public: virtual void FromXml(SecurityElement* et);
[JScript]
public function FromXml(
et : SecurityElement);
パラメータ
- et
セキュリティ オブジェクトの再構築に使用する XML エンコーディング。
実装
例外
例外の種類 | 条件 |
---|---|
ArgumentNullException | et パラメータが null 参照 (Visual Basic では Nothing) です。 |
ArgumentException | et パラメータが有効なアクセス許可要素ではありません。
または et パラメータのバージョン番号がサポートされていません。 |
使用例
' Display result of ToXml and FromXml operations.
Dim ps6 As New PermissionSet(PermissionState.None)
ps6.FromXml(ps5.ToXml())
Console.WriteLine("Result of ToFromXml = " & ps6.ToString() & ControlChars.Lf)
[C#]
// Display result of ToXml and FromXml operations.
PermissionSet ps6 = new PermissionSet(PermissionState.None);
ps6.FromXml(ps5.ToXml());
Console.WriteLine("Result of ToFromXml = " +ps6.ToString() + "\n");
[C++]
// Display result of ToXml and FromXml operations.
PermissionSet* ps6 = new PermissionSet(PermissionState::None);
ps6->FromXml(ps5->ToXml());
Console::WriteLine(S"Result of ToFromXml = {0}\n", ps6);
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, Common Language Infrastructure (CLI) Standard
参照
PermissionSet クラス | PermissionSet メンバ | System.Security 名前空間