' The following code is distributed under the CC0 license whose text can be found at ' http://creativecommons.org/publicdomain/zero/1.0/ ' You are permitted to use this code in any way you like, including commercial use. ''' ''' Instructs Rummage to keep a specific type, method, constructor or field. ''' _ Public NotInheritable Class RummageNoRemoveAttribute Inherits Attribute End Class ''' ''' Instructs Rummage to keep the original name of a specific element. ''' _ Public NotInheritable Class RummageNoRenameAttribute Inherits Attribute End Class ''' ''' Instructs Rummage to keep the original name of a specific type, all of its members, and all the members ''' in all of its nested types. ''' _ Public NotInheritable Class RummageNoRenameAnythingAttribute Inherits Attribute End Class ''' ''' Instructs Rummage to avoid un-nesting the specified type. ''' _ Public NotInheritable Class RummageNoUnnestAttribute Inherits Attribute End Class ''' ''' Instructs Rummage to keep the original access modifier of a specific element. ''' _ Public NotInheritable Class RummageNoMarkPublicAttribute Inherits Attribute End Class ''' ''' Instructs Rummage not to inline a specific method or property that would otherwise be automatically inlined. ''' This attribute takes precedence over if both are specified on the ''' same method or property. ''' _ Public NotInheritable Class RummageNoInlineAttribute Inherits Attribute End Class ''' ''' Instructs Rummage to inline a specific method or property that would otherwise not be automatically inlined. ''' _ Public NotInheritable Class RummageInlineAttribute Inherits Attribute End Class ''' ''' Instructs Rummage to refrain from making any changes to a specific type. ''' _ Public NotInheritable Class RummageKeepReflectionSafeAttribute Inherits Attribute End Class ''' ''' Instructs Rummage to keep all the types reflection-safe which are passed in for the given generic parameter. ''' _ Public NotInheritable Class RummageKeepArgumentsReflectionSafeAttribute Inherits Attribute End Class ''' ''' Use only on custom-attribute class declarations. Instructs Rummage to keep everything reflection-safe that ''' uses the given custom attribute. ''' _ Public NotInheritable Class RummageKeepUsersReflectionSafeAttribute Inherits Attribute End Class ''' ''' Use on a method or constructor parameter of type "Type". Instructs Rummage that this method uses the Type ''' passed in in a way that is fully compatible with all obfuscations, including removing members not directly ''' referenced, renaming members, unnesting types and so on. ''' _ Public NotInheritable Class RummageAssumeTypeSafeAttribute Inherits Attribute End Class ''' Contains methods used to augment the program with Rummage-related information. Public NotInheritable Class Rummage ''' ''' Returns the type passed in. Use around a typeof(SomeType) to override Rummage's reflection safety ''' analysis and make Rummage believe that this particular use is entirely safe. ''' Public Shared Function Safe( type As Type) As Type Return type End Function End Class