共用方式為


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。 屬性 StripAfterObfuscationfalse,以防止混淆工具在處理後剝除該屬性。

若想看一個範例,說明 在 中 的使用ObfuscateAssemblyAttribute方式,請參見 classObfuscationAttributeObfuscationAttribute

using System;
using System.Reflection;

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

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

備註

ObfuscationAttributeObfuscateAssemblyAttribute屬性為組合語言作者提供了一種註解二進位的方式,使混淆工具能以最小的外部設定正確處理它們。

將此屬性套用於組裝體時,混淆工具會使用其預設的組合語言類型規則。

這很重要

套用此屬性並不會自動混淆組裝。 套用該屬性是建立混淆工具設定檔的替代方案。 也就是說,它僅提供混淆工具的指令。 Microsoft 建議混淆工具的廠商遵循此處描述的語意。 然而,無法保證某個工具一定遵循 Microsoft 的建議。

你可以套用到集會內的類型,也可以套用 ObfuscationAttribute 到這些類型的成員。 最內層屬性控制混淆工具如何處理特定程式碼實體。

建構函式

名稱 Description
ObfuscateAssemblyAttribute(Boolean)

初始化該類別的新實例 ObfuscateAssemblyAttribute ,指定要混淆的組合是公用還是私有。

屬性

名稱 Description
AssemblyIsPrivate

會獲得 Boolean 一個值,表示該組裝是否被標記為私人。

StripAfterObfuscation

取得或設定一個 Boolean 值,指示混淆工具在處理後是否應該移除該屬性。

TypeId

在衍生類別中實作時,取得這個 Attribute的唯一標識碼。

(繼承來源 Attribute)

方法

名稱 Description
Equals(Object)

傳回值,這個值表示這個實例是否等於指定的物件。

(繼承來源 Attribute)
GetHashCode()

傳回這個實例的哈希碼。

(繼承來源 Attribute)
GetType()

取得目前實例的 Type

(繼承來源 Object)
IsDefaultAttribute()

在衍生類別中覆寫時,指出這個實例的值是否為衍生類別的預設值。

(繼承來源 Attribute)
Match(Object)

在衍生類別中覆寫時,傳回值,指出這個實例是否等於指定的物件。

(繼承來源 Attribute)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

明確介面實作

名稱 Description
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。

(繼承來源 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

擷取 物件的型別資訊,可用來取得介面的類型資訊。

(繼承來源 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

擷取物件提供的類型資訊介面數目 (0 或 1)。

(繼承來源 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供物件所公開屬性和方法的存取權。

(繼承來源 Attribute)

適用於

另請參閱