<PackageReference Include="NUnit" Version="3.0.0-beta-2" />

AttributeHelper

public static class AttributeHelper
Provides extension methods on portable platforms to simplify working with Attributes
using System; using System.Reflection; namespace NUnit.Framework.Compatibility { public static class AttributeHelper { public static Attribute[] GetCustomAttributes(object actual, Type attributeType, bool inherit) { ICustomAttributeProvider customAttributeProvider = actual as ICustomAttributeProvider; if (customAttributeProvider != null) return (Attribute[])customAttributeProvider.GetCustomAttributes(attributeType, inherit); throw new ArgumentException($"""{actual}""", "actual"); } } }