Aracılığıyla paylaş


ObfuscationAttribute.StripAfterObfuscation Özellik

Tanım

Gizleme 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 bir gizleme 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, özelliğinin, gizleme aracının gizlemeden sonra özniteliğini kaldırmaması için olduğunu gösterir ObfuscationAttributeStripAfterObfuscationfalse . Özelliğin varsayılan değeri olduğu içinExclude, özelliğin karartma dışında kalmaması MethodA için Exclude belirtilmesi falsetruegerekir.

Bu kod, derlenip yürütülebilen daha büyük bir örneğin parçasıdır. ObfuscationAttribute sınıfına 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 gizlemez. özniteliğinin uygulanması, 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, gizleme 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