Share via


ObfuscationAttribute.StripAfterObfuscation Özellik

Tanım

Karartma aracının işlendikten sonra bu özniteliği kaldırması gerekip gerekmediğini belirten bir Boolean değer alır veya ayarlar.

public:
 property bool StripAfterObfuscation { bool get(); void set(bool value); };
public bool StripAfterObfuscation { get; set; }
member this.StripAfterObfuscation : bool with get, set
Public Property StripAfterObfuscation As Boolean

Özellik Değeri

true karartma aracının işlendikten sonra özniteliği kaldırması gerekiyorsa; aksi takdirde , false. Varsayılan değer: true.

Örnekler

Aşağıdaki kod örneği, gizleme aracının gizlemeden sonra özniteliğini kaldırmaması için özelliğinin kim StripAfterObfuscation olduğunu false gösterirObfuscationAttribute. Özelliğin Exclude varsayılan değeri olduğundan, özelliğin karartma dışında kalmaması MethodA için özelliğinin Excludetruebelirtilmesi false gerekir.

Bu kod, derlenip yürütülebilen daha büyük bir örneğin parçasıdır. Sınıfına ObfuscationAttribute bakın.

[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(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

Açıklamalar

Kitaplığınız başka bir uygulamanın parçası olarak dahil edilecekse ve bu uygulamanın bir parçası olarak gizlenecekse öznitelikler kaldırılmamalıdır.

Önemli

Bu özniteliğin uygulanması, uyguladığınız kod varlığını otomatik olarak karartmaz. özniteliğini uygulamak, gizleme aracı için bir yapılandırma dosyası oluşturmaya alternatiftir. Yani, yalnızca bir gizleme aracı için yönergeler sağlar. Microsoft, karartma araçları satıcılarının burada açıklanan semantiği izlemesini önerir. Ancak, belirli bir aracın Microsoft önerilerine uyduğunun garantisi yoktur.

Şunlara uygulanır