ObfuscateAssemblyAttribute クラス

定義

該当するアセンブリ型に対して標準の隠ぺい規則を使用するように、難読化ツールに指示します。

public ref class ObfuscateAssemblyAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
public sealed class ObfuscateAssemblyAttribute : Attribute
public sealed class ObfuscateAssemblyAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ObfuscateAssemblyAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)>]
type ObfuscateAssemblyAttribute = class
    inherit Attribute
type ObfuscateAssemblyAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type ObfuscateAssemblyAttribute = class
    inherit Attribute
Public NotInheritable Class ObfuscateAssemblyAttribute
Inherits Attribute
継承
ObfuscateAssemblyAttribute
属性

次のコード例は、 でマークされたプライベート アセンブリを ObfuscateAssemblyAttribute示しています。 処理 StripAfterObfuscation 後に難読化ツールによって属性が削除されないようにするために、 プロパティは falseです。

で を使用ObfuscateAssemblyAttributeObfuscationAttributeするコード例については、 クラスをObfuscationAttribute参照してください。

using System;
using System.Reflection;

[assembly: ObfuscateAssemblyAttribute(true,
    StripAfterObfuscation=false)]
Imports System.Reflection

<Assembly: ObfuscateAssemblyAttribute(False, _
    StripAfterObfuscation:=False)>

注釈

ObfuscationAttribute属性と ObfuscateAssemblyAttribute 属性は、アセンブリ作成者がバイナリに注釈を付け、難読化ツールが最小限の外部構成で正しく処理できるようにする方法を提供します。

この属性をアセンブリに適用すると、難読化ツールに対して、アセンブリ型の既定の規則を使用するように指示されます。

重要

この属性を適用しても、アセンブリが自動的に難読化されることはありません。 属性の適用は、難読化ツールの構成ファイルを作成する代わりに使用します。 つまり、難読化ツールの指示を提供するだけです。 Microsoftでは、難読化ツールのベンダーは、ここで説明するセマンティクスに従うことをお勧めします。 ただし、特定のツールがMicrosoft推奨事項に従う保証はありません。

アセンブリ内の型と、それらの型のメンバーに適用 ObfuscationAttribute できます。 最も内側の属性は、難読化ツールが特定のコード エンティティを処理する方法を制御します。

コンストラクター

ObfuscateAssemblyAttribute(Boolean)

隠ぺいするアセンブリがパブリックであるかプライベートであるかを指定して、ObfuscateAssemblyAttribute クラスの新しいインスタンスを初期化します。

プロパティ

AssemblyIsPrivate

アセンブリがプライベートとしてマークされているかどうかを示す Boolean 値を取得します。

StripAfterObfuscation

難読化ツールが処理後に属性を削除する必要があるかどうかを示す Boolean 値を取得または設定します。

TypeId

派生クラスで実装されると、この Attribute の一意の識別子を取得します。

(継承元 Attribute)

メソッド

Equals(Object)

このインスタンスが、指定されたオブジェクトと等価であるかどうかを示す値を返します。

(継承元 Attribute)
GetHashCode()

このインスタンスのハッシュ コードを返します。

(継承元 Attribute)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
IsDefaultAttribute()

派生クラスでオーバーライドされるとき、このインスタンスの値が派生クラスの既定値であるかどうかを示します。

(継承元 Attribute)
Match(Object)

派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。

(継承元 Attribute)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

一連の名前を対応する一連のディスパッチ識別子に割り当てます。

(継承元 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

オブジェクトの型情報を取得します。この情報はインターフェイスの型情報の取得に使用できます。

(継承元 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。

(継承元 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

オブジェクトによって公開されたプロパティおよびメソッドへのアクセスを提供します。

(継承元 Attribute)

適用対象

こちらもご覧ください