DataProtectionPermission.FromXml メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataProtectionPermission.FromXml メソッドの意味・解説 

DataProtectionPermission.FromXml メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

XML エンコーディングから、特定の状態のアクセス許可再構築ます。

名前空間: System.Security.Permissions
アセンブリ: System.Security (system.security.dll 内)
構文構文

Public Overrides Sub FromXml
 ( _
    securityElement As SecurityElement _
)
Dim instance As DataProtectionPermission
Dim securityElement As SecurityElement

instance.FromXml(securityElement)
public override void FromXml (
    SecurityElement securityElement
)
public:
virtual void FromXml (
    SecurityElement^ securityElement
) override
public void FromXml (
    SecurityElement securityElement
)
public override function FromXml (
    securityElement : SecurityElement
)

パラメータ

securityElement

アクセス許可再構築使用する XML エンコーディング格納している SecurityElement。

例外例外
例外種類条件

ArgumentNullException

securityElementnull 参照 (Visual Basic では Nothing) です。

ArgumentException

securityElement有効なアクセス許可要素ではありません。

または

securityElementバージョン番号サポートされていません。

解説解説

FromXml メソッドは、SecurityElement クラス定義される XML エンコーディングから DataProtectionPermission オブジェクト再構築ます。ToXml メソッド使用してステータス情報を含む DataProtectionPermissionXMLエンコードます。

使用例使用例

FromXml メソッド使用するコード例次に示します。このコード例は、DataProtectionPermission クラストピック取り上げているコード例一部分です。

WriteLine("Using an XML roundtrip to reset the fourth permission.")
sp4.FromXml(sp2.ToXml())
Write("Does the XML roundtrip result equal the original permission?
 ")
If (sp4.Equals(sp2)) Then
    WriteLine("Yes")
Else
    WriteLine("No")
End If
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? " 
    + ((rc) ? "Yes" : "No"));
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataProtectionPermission クラス
DataProtectionPermission メンバ
System.Security.Permissions 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からDataProtectionPermission.FromXml メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDataProtectionPermission.FromXml メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDataProtectionPermission.FromXml メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DataProtectionPermission.FromXml メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataProtectionPermission.FromXml メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS