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

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

CodeAccessPermission.FromXml メソッド

派生クラスによってオーバーライドされるときに、XML エンコーディングから、指定した状態のセキュリティ オブジェクト再構築ます。

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

Public MustOverride Sub
 FromXml ( _
    elem As SecurityElement _
)
Dim instance As CodeAccessPermission
Dim elem As SecurityElement

instance.FromXml(elem)
public abstract void FromXml (
    SecurityElement elem
)
public:
virtual void FromXml (
    SecurityElement^ elem
) abstract
public abstract void FromXml (
    SecurityElement elem
)
public abstract function FromXml (
    elem : SecurityElement
)

パラメータ

elem

セキュリティ オブジェクト再構築使用する XML エンコーディング

例外例外
例外種類条件

ArgumentNullException

elem パラメータnull 参照 (Visual Basic では Nothing) です。

ArgumentException

elem パラメータに、現在のインスタンスと同じ型のインスタンスXML エンコーディング含まれていません。

または

elem パラメータバージョン番号サポートされていません。

解説解説
使用例使用例

FromXml メソッドオーバーライドする方法次のコード例示します。このコード例は、CodeAccessPermission クラストピック取り上げているコード例一部分です。

Public Overrides Sub FromXml(ByVal
 e As SecurityElement)
    ' The following code for unrestricted permission is only included
 as an example for
    ' permissions that allow the unrestricted state. It is of no value
 for this permission.
    Dim elUnrestricted As String
 = e.Attribute("Unrestricted")
    If Nothing <> elUnrestricted Then
        m_Unrestricted = Boolean.Parse(elUnrestricted)
        Return
    End If

    Dim elName As String
 = e.Attribute("Name")
    m_name = IIf(elName Is Nothing, Nothing,
 elName)
End Sub 'FromXml

public override void FromXml(SecurityElement
 e)
 {
     // The following code for unrestricted permission is only included
 as an example for
     // permissions that allow the unrestricted state. It is of no value
 for this permission.
     String elUnrestricted = e.Attribute("Unrestricted");
     if (null != elUnrestricted)
     {
         m_Unrestricted = bool.Parse(elUnrestricted);
         return;
     }

     String elName = e.Attribute( "Name" );
     m_Name = elName == null ? null : elName;
 }
public:
   virtual void FromXml( SecurityElement^ e ) override
   {
      // The following code for unrestricted permission is only included
 as an example for
      // permissions that allow the unrestricted state. It is of no value
 for this permission.
      String^ elUnrestricted = e->Attribute("Unrestricted");
      if ( nullptr != elUnrestricted )
      {
         m_Unrestricted = Boolean::Parse( elUnrestricted );
         return;
      }

      String^ elName = e->Attribute("Name");
      m_Name = elName == nullptr ? nullptr : elName;
   }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeAccessPermission クラス
CodeAccessPermission メンバ
System.Security 名前空間



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS