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

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

ISecurityEncodable.FromXml メソッド

XML エンコーディングから、指定した状態のセキュリティ オブジェクト再構築ます。

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

Sub FromXml ( _
    e As SecurityElement _
)
Dim instance As ISecurityEncodable
Dim e As SecurityElement

instance.FromXml(e)
void FromXml (
    SecurityElement e
)
void FromXml (
    SecurityElement^ e
)
void FromXml (
    SecurityElement e
)
function FromXml (
    e : SecurityElement
)

パラメータ

e

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

解説解説
使用例使用例

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

// Populate the permission's fields from XML.
public override void FromXml(SecurityElement
 e) 
{
    m_specifiedAsUnrestricted = false;
    m_flags = 0;

    // If XML indicates an unrestricted permission, make this permission
 unrestricted.
    String s = (String) e.Attributes["Unrestricted"];
    if (s != null) 
    {
        m_specifiedAsUnrestricted = Convert.ToBoolean(s);
        if (m_specifiedAsUnrestricted)
            m_flags = SoundPermissionState.PlayAnySound;
    }

    // If XML indicates a restricted permission, parse the flags.
    if (!m_specifiedAsUnrestricted) 
    {
        s = (String) e.Attributes["Flags"];
        if (s != null) 
        {
            m_flags = (SoundPermissionState)
            Convert.ToInt32(Enum.Parse(typeof(SoundPermission), s, true));
        }
    }
}
    // Populate the permission's fields from XML.
public:
    virtual void FromXml(SecurityElement^ element) override
    {
        specifiedAsUnrestricted = false;
        stateFlags = (SoundPermissionState)0;

        // If XML indicates an unrestricted permission, 
        // make this permission unrestricted.
        String^ attributeString = 
            (String^) element->Attributes["Unrestricted"];
        if (attributeString != nullptr)
        {
            specifiedAsUnrestricted = Convert::ToBoolean(attributeString);
            if (specifiedAsUnrestricted)
            {
                stateFlags = SoundPermissionState::PlayAnySound;
            }
        }

        // If XML indicates a restricted permission, parse the flags.
        if (!specifiedAsUnrestricted)
        {
            attributeString = (String^) element->Attributes["Flags"];
            if (attributeString != nullptr)
            {
                stateFlags = (SoundPermissionState) Convert::ToInt32(
                    Enum::Parse(SoundPermissionState::typeid, 
                    attributeString, true));
            }
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS