@@ -24,9 +24,9 @@ public class WorkflowQueryDefinition
2424 private static readonly ConcurrentDictionary < MethodInfo , WorkflowQueryDefinition > MethodDefinitions = new ( ) ;
2525 private static readonly ConcurrentDictionary < PropertyInfo , WorkflowQueryDefinition > PropertyDefinitions = new ( ) ;
2626
27- private WorkflowQueryDefinition ( string ? name , string ? description , MethodInfo ? method , Delegate ? del )
27+ private WorkflowQueryDefinition ( string ? name , string ? description , MethodInfo ? method , Delegate ? del , bool bypassReserved = false )
2828 {
29- if ( name != null )
29+ if ( ! bypassReserved && name != null )
3030 {
3131 foreach ( var reservedQ in ReservedQueryHandlerPrefixes )
3232 {
@@ -127,6 +127,21 @@ public static WorkflowQueryDefinition CreateWithoutAttribute(
127127 return new ( name , description , null , del ) ;
128128 }
129129
130+ /// <summary>
131+ /// Internal version of <see cref="CreateWithoutAttribute" /> that bypasses reserved name checks.
132+ /// </summary>
133+ /// <param name="name">Query name. Null for dynamic query.</param>
134+ /// <param name="del">Query delegate.</param>
135+ /// <param name="description">Optional description. WARNING: This setting is experimental.
136+ /// </param>
137+ /// <returns>Query definition.</returns>
138+ internal static WorkflowQueryDefinition CreateWithoutAttributeReservedName (
139+ string name , Delegate del , string ? description = null )
140+ {
141+ AssertValid ( del . Method , dynamic : name == null ) ;
142+ return new ( name , description , null , del , bypassReserved : true ) ;
143+ }
144+
130145 /// <summary>
131146 /// Gets the query name for calling or fail if no attribute or if dynamic.
132147 /// </summary>
0 commit comments