Skip to content

Commit c5bde24

Browse files
committed
#3284: Make ITypeAwareDataAttribute public
1 parent 78d98a4 commit c5bde24

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
11
using System;
2+
using System.Reflection;
23

34
namespace Xunit.v3;
45

5-
// Used to tag data attributes that want to know the type they originated from
6-
internal interface ITypeAwareDataAttribute
6+
/// <summary>
7+
/// This interface supplements <see cref="IDataAttribute"/> for attributes that wish to be
8+
/// notified of the <see cref="MemberInfo.ReflectedType"/> of the method that was used during
9+
/// reflection that they were attached to.
10+
/// </summary>
11+
/// <remarks>
12+
/// By default, this is called by <see cref="ExtensibilityPointFactory.GetMethodDataAttributes"/>.
13+
/// If a third party test framework uses some other mechanism to discover data attributes that are
14+
/// attached to methods, it should conditionally populate the <see cref="MemberType"/> during its
15+
/// own discovery phase.
16+
/// </remarks>
17+
public interface ITypeAwareDataAttribute
718
{
19+
/// <summary>
20+
/// Gets or sets the reflected type of the method that this data attribute was attached to.
21+
/// </summary>
22+
/// <remarks>
23+
/// <see cref="ExtensibilityPointFactory"/> will not be overwrite this value if it's already non-<c>null</c>.
24+
/// </remarks>
825
Type? MemberType { get; set; }
926
}

0 commit comments

Comments
 (0)