diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptSecurityAttribute.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptSecurityAttribute.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptSecurityAttribute.cs b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptSecurityAttribute.cs new file mode 100644 index 000000000..e25905630 --- /dev/null +++ b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptSecurityAttribute.cs @@ -0,0 +1,18 @@ +using System; + +namespace Mono.Linker.Tests.Cases.Expectations.Assertions { + [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly | AttributeTargets.Method, AllowMultiple = true, Inherited = false)] + public class KeptSecurityAttribute : KeptAttribute { + public KeptSecurityAttribute (string attributeName) + { + if (string.IsNullOrEmpty (attributeName)) + throw new ArgumentException ("Value cannot be null or empty.", nameof (attributeName)); + } + + public KeptSecurityAttribute (Type type) + { + if (type == null) + throw new ArgumentNullException (nameof (type)); + } + } +} |