include ExplicitConstructorAttribute's targets to constructor&method (#1982)

* add method target for explicitconstructor

* add a noting comment (usage is limited with Dapper.AOT)
This commit is contained in:
Korolev Dmitry
2023-10-22 09:54:13 +02:00
committed by GitHub
parent 2f56056a89
commit f0e61a740b
+4 -1
View File
@@ -5,7 +5,10 @@ namespace Dapper
/// <summary>
/// Tell Dapper to use an explicit constructor, passing nulls or 0s for all parameters
/// </summary>
[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false)]
/// <remarks>
/// Usage on methods is limited to the usage with Dapper.AOT (https://github.com/DapperLib/DapperAOT)
/// </remarks>
[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = false)]
public sealed class ExplicitConstructorAttribute : Attribute
{
}