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

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

WebPermission.FromXml メソッド

XML エンコーディングから WebPermission再構築ます。

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

Public Overrides Sub FromXml
 ( _
    securityElement As SecurityElement _
)
Dim instance As WebPermission
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

WebPermission を再構築するための元となる XML エンコーディング

例外例外
例外種類条件

ArgumentNullException

securityElement パラメータnull. です。

ArgumentException

securityElement が、この種類アクセス許可要素ではありません。

解説解説

FromXml メソッドは、SecurityElement クラス定義される XML エンコーディングから WebPermission再構築ます。

ToXml メソッド使用してステータス情報を含む WebPermissionXMLエンコードます。

使用例使用例

System.Security.SecurityElement作成し、その属性設定しFromXml使用して、この情報WebPermissionインスタンス転送する例を次に示します

' Create  a WebPermission without permission on the protected resource.
Dim myWebPermission1 As New
 WebPermission(PermissionState.None)

' Create a SecurityElement by calling the ToXml method on the WebPermission
 
' instance and display its attributes (which hold the XML encoding of
 
' the WebPermission).
Console.WriteLine("Attributes and Values of the WebPermission
 are :")
myWebPermission1.ToXml().ToString()

' Create another WebPermission with no permission on the protected resource.
Dim myWebPermission2 As New
 WebPermission(PermissionState.None)

'Converts the new WebPermission from XML using myWebPermission1.
myWebPermission2.FromXml(myWebPermission1.ToXml())

// Create  a WebPermission without permission on the protected resource.
WebPermission myWebPermission1 = new WebPermission(PermissionState.None);

// Create a SecurityElement by calling the ToXml method on the WebPermission
 
// instance and display its attributes (which hold the XML encoding
 of 
// the WebPermission).
Console.WriteLine("Attributes and Values of the WebPermission are :");
myWebPermission1.ToXml().ToString();

// Create another WebPermission with no permission on the protected
 resource.
WebPermission myWebPermission2 = new WebPermission(PermissionState.None);

//Converts the new WebPermission from XML using myWebPermission1.
myWebPermission2.FromXml(myWebPermission1.ToXml());

// Create  a WebPermission without permission on the protected resource
WebPermission^ myWebPermission1 = gcnew WebPermission( PermissionState::None );

// Create a SecurityElement by calling the ToXml method on the WebPermission
// instance and display its attributes (which hold the XML encoding
 of
// the WebPermission).
Console::WriteLine( "Attributes and Values of the WebPermission are:" );
myWebPermission1->ToXml();

// Create another WebPermission with no permission on the protected
 resource
WebPermission^ myWebPermission2 = gcnew WebPermission( PermissionState::None );

//Converts the new WebPermission from XML using myWebPermission1.
myWebPermission2->FromXml( myWebPermission1->ToXml() );
// Create  a WebPermission without permission on the protected resource.
WebPermission myWebPermission1 = new WebPermission(PermissionState.None);
// Create a SecurityElement by calling the ToXml method on the 
// WebPermission instance and display its attributes (which hold the
// XML encoding of the WebPermission).
Console.WriteLine("Attributes and Values of the WebPermission are :");
myWebPermission1.ToXml().ToString();
// Create another WebPermission with no permission on the protected
// resource.
WebPermission myWebPermission2 = new WebPermission(PermissionState.None);
//Converts the new WebPermission from XML using myWebPermission1.
myWebPermission2.FromXml(myWebPermission1.ToXml());
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebPermission クラス
WebPermission メンバ
System.Net 名前空間
ToXml


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS