diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases.Expectations/Assertions/RecognizedReflectionAccessPatternAttribute.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases.Expectations/Assertions/RecognizedReflectionAccessPatternAttribute.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/RecognizedReflectionAccessPatternAttribute.cs b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/RecognizedReflectionAccessPatternAttribute.cs new file mode 100644 index 000000000..09d83aa65 --- /dev/null +++ b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/RecognizedReflectionAccessPatternAttribute.cs @@ -0,0 +1,24 @@ +using System; + +namespace Mono.Linker.Tests.Cases.Expectations.Assertions +{ + [AttributeUsage (AttributeTargets.Method, AllowMultiple = true, Inherited = false)] + public class RecognizedReflectionAccessPatternAttribute : BaseExpectedLinkedBehaviorAttribute + { + public RecognizedReflectionAccessPatternAttribute (Type reflectionMethodType, string reflectionMethodName, Type[] reflectionMethodParameters, + Type accessedItemType, string accessedItemName, Type[] accessedItemParameters) + { + if (reflectionMethodType == null) + throw new ArgumentException ("Value cannot be null or empty.", nameof (reflectionMethodType)); + if (reflectionMethodName == null) + throw new ArgumentException ("Value cannot be null or empty.", nameof (reflectionMethodName)); + if (reflectionMethodParameters == null) + throw new ArgumentException ("Value cannot be null or empty.", nameof (reflectionMethodParameters)); + + if (accessedItemType == null) + throw new ArgumentException ("Value cannot be null or empty.", nameof (accessedItemType)); + if (accessedItemName == null) + throw new ArgumentException ("Value cannot be null or empty.", nameof (accessedItemName)); + } + } +} |