CodeAccessPermission.FromXml メソッド
アセンブリ: mscorlib (mscorlib.dll 内)
構文
例外
解説セキュリティ オブジェクトを拡張するカスタム コードでは、ToXml メソッドと FromXml メソッドを実装し、オブジェクトをセキュリティのエンコードに対応させる必要があります。
継承時の注意 派生クラスでこのメソッドをオーバーライドする必要があります。
使用例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; }
プラットフォームWindows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照Weblioに収録されているすべての辞書からCodeAccessPermission.FromXml メソッドを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からCodeAccessPermission.FromXml メソッド
を検索
- CodeAccessPermission.FromXml メソッドのページへのリンク