Skip to content

Commit f0e61a7

Browse files
authored
include ExplicitConstructorAttribute's targets to constructor&method (#1982)
* add method target for explicitconstructor * add a noting comment (usage is limited with Dapper.AOT)
1 parent 2f56056 commit f0e61a7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dapper/ExplicitConstructorAttribute.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ namespace Dapper
55
/// <summary>
66
/// Tell Dapper to use an explicit constructor, passing nulls or 0s for all parameters
77
/// </summary>
8-
[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false)]
8+
/// <remarks>
9+
/// Usage on methods is limited to the usage with Dapper.AOT (https://github.com/DapperLib/DapperAOT)
10+
/// </remarks>
11+
[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = false)]
912
public sealed class ExplicitConstructorAttribute : Attribute
1013
{
1114
}

0 commit comments

Comments
 (0)