Example #1
0
 public static bool IsPublic(this ObfuscationAttribute attribute, bool isPublicDefault)
 {
     if (attribute != null)
     {
         return(attribute.Exclude);
     }
     return(isPublicDefault);
 }
Example #2
0
        public void StripAfterObfuscation_Set_GetReturnsExpected(bool value)
        {
            var attribute = new ObfuscationAttribute
            {
                StripAfterObfuscation = value
            };

            Assert.Equal(value, attribute.StripAfterObfuscation);
        }
Example #3
0
        public void Feature_Set_GetReturnsExpected(string value)
        {
            var attribute = new ObfuscationAttribute
            {
                Feature = value
            };

            Assert.Equal(value, attribute.Feature);
        }
Example #4
0
        public void Exclude_Set_GetReturnsExpected(bool value)
        {
            var attribute = new ObfuscationAttribute
            {
                Exclude = value
            };

            Assert.Equal(value, attribute.Exclude);
        }
Example #5
0
        public void ApplyToMembers_Set_GetReturnsExpected(bool value)
        {
            var attribute = new ObfuscationAttribute
            {
                ApplyToMembers = value
            };

            Assert.Equal(value, attribute.ApplyToMembers);
        }
Example #6
0
        public void Ctor_Default()
        {
            var attribute = new ObfuscationAttribute();

            Assert.True(attribute.ApplyToMembers);
            Assert.True(attribute.Exclude);
            Assert.Equal("all", attribute.Feature);
            Assert.True(attribute.StripAfterObfuscation);
        }
 private static void ShowObfuscation(
     ObfuscationAttribute ob, string target)
 {
     Console.WriteLine("\r\nObfuscationAttribute properties for: {0}",
                       target);
     Console.WriteLine("   Exclude: {0}", ob.Exclude);
     Console.WriteLine("   Feature: {0}", ob.Feature);
     Console.WriteLine("   StripAfterObfuscation: {0}",
                       ob.StripAfterObfuscation);
     Console.WriteLine("   ApplyToMembers: {0}", ob.ApplyToMembers);
 }