ObfuscationAttribute.Exclude プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ObfuscationAttribute.Exclude プロパティの意味・解説 

ObfuscationAttribute.Exclude プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

隠ぺいツール隠ぺいから型やメンバ除外する必要があるかどうかを示す Boolean 値を取得または設定します

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

解説解説
使用例使用例

隠ぺいから除外されるようにマーク付けられている型のコード例次に示しますExclude プロパティ既定true設定されるため、特に指定する要はありませんが、明示的に指定する意図明確になります。ApplyToMembers が false指定されているため、隠ぺいからの除外クラスメンバ適用されません。つまり、クラス名表示されますが、メンバ隠ぺいされます

MethodA メソッドは、Feature プロパティの値 "default"マークされています。Exclude プロパティ既定値true であるため、Exclude プロパティfalse指定してMethodA隠ぺいから除外されないようにする必要があります。StripAfterObfuscation プロパティfalse であるため、隠ぺいツール隠ぺい後に属性削除しません。

このコードは、コンパイルして実行することのできる例の一部です。詳細については、ObfuscationAttribute クラストピック参照してください

<ObfuscationAttribute(Exclude:=True, ApplyToMembers:=False)> _
Public Class Type2

    ' The exclusion of the type is not applied to its members,
    ' however in order to mark the member with the "default"
 
    ' feature it is necessary to specify Exclude:=False,
    ' because the default value of Exclude is True. The tool
    ' should not strip this attribute after obfuscation.
    <ObfuscationAttribute(Exclude:=False, _
        Feature:="default", StripAfterObfuscation:=False)>
 _
    Public Sub MethodA()
    End Sub

    ' This member is marked for obfuscation, because the 
    ' exclusion of the type is not applied to its members.
    Public Sub MethodB()
    End Sub

End Class
[ObfuscationAttribute(Exclude=true, ApplyToMembers=false)]
public class Type2
{

    // The exclusion of the type is not applied to its members,
    // however in order to mark the member with the "default"
 
    // feature it is necessary to specify Exclude=false,
    // because the default value of Exclude is true. The tool
    // should not strip this attribute after obfuscation.
    [ObfuscationAttribute(Exclude=false, Feature="default",
 
        StripAfterObfuscation=false)]
    public void MethodA() {}

    // This member is marked for obfuscation, because the 
    // exclusion of the type is not applied to its members.
    public void MethodB() {}

}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ObfuscationAttribute クラス
ObfuscationAttribute メンバ
System.Reflection 名前空間



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

辞書ショートカット

すべての辞書の索引

「ObfuscationAttribute.Exclude プロパティ」の関連用語

ObfuscationAttribute.Exclude プロパティのお隣キーワード
検索ランキング

   

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



ObfuscationAttribute.Exclude プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS