@@ -192,6 +192,15 @@ internal static class DefaultCommentParser
192192 "user-context" ,
193193 ] ;
194194
195+ private static readonly string [ ] userParemetersKey = [
196+ "userparameters" ,
197+ "userparams" ,
198+ "user_parameters" ,
199+ "user_params" ,
200+ "user-parameters" ,
201+ "user-params" ,
202+ ] ;
203+
195204 private const string UploadKey = "upload" ;
196205
197206 private static readonly string [ ] parameterKey = [
@@ -818,6 +827,21 @@ internal static class DefaultCommentParser
818827 }
819828 }
820829
830+ // userparameters
831+ // userparams
832+ // user_parameters
833+ // user_params
834+ // user-parameters
835+ // user-params
836+ else if ( haveTag is true && StrEqualsToArray ( words [ 0 ] , userParemetersKey ) )
837+ {
838+ routineEndpoint . UseUserParameters = true ;
839+ if ( options . LogAnnotationSetInfo )
840+ {
841+ logger ? . CommentUserParameters ( description ) ;
842+ }
843+ }
844+
821845 // cached
822846 // cached [ param1, param2, param3 [, ...] ]
823847 else if ( haveTag is true && StrEquals ( words [ 0 ] , CacheKey ) )
@@ -904,7 +928,7 @@ internal static class DefaultCommentParser
904928 // upload param_name as metadata
905929 else if ( haveTag is true && StrEquals ( words [ 0 ] , UploadKey ) )
906930 {
907- if ( options . UploadHandlers is null || options . UploadHandlers . Count == 0 )
931+ if ( options . UploadOptions . UploadHandlers is null || options . UploadOptions . UploadHandlers . Count == 0 )
908932 {
909933 logger ? . CommentUploadNoHandlers ( description ) ;
910934 }
@@ -928,7 +952,7 @@ internal static class DefaultCommentParser
928952 }
929953 if ( len >= 3 && StrEquals ( words [ 1 ] , "for" ) )
930954 {
931- HashSet < string > existingHandlers = options . UploadHandlers ? . Keys . ToHashSet ( ) ?? [ ] ;
955+ HashSet < string > existingHandlers = options . UploadOptions . UploadHandlers ? . Keys . ToHashSet ( ) ?? [ ] ;
932956 var handlers = words [ 2 ..]
933957 . Select ( w =>
934958 {
@@ -950,7 +974,7 @@ internal static class DefaultCommentParser
950974 {
951975 if ( handlers . Length == 0 )
952976 {
953- var first = options . UploadHandlers ? . Keys . FirstOrDefault ( ) ;
977+ var first = options . UploadOptions . UploadHandlers ? . Keys . FirstOrDefault ( ) ;
954978 logger ? . CommentUploadFirstAvaialbleHandler ( description , first ) ;
955979 }
956980 if ( handlers . Length == 1 )
@@ -976,7 +1000,7 @@ internal static class DefaultCommentParser
9761000 }
9771001 else
9781002 {
979- param . UploadMetadata = true ;
1003+ param . IsUploadMetadata = true ;
9801004 if ( options . LogAnnotationSetInfo )
9811005 {
9821006 logger ? . CommentUploadMetadataParam ( description , paramName ) ;
@@ -1075,7 +1099,7 @@ internal static class DefaultCommentParser
10751099 }
10761100 else
10771101 {
1078- param . UploadMetadata = true ;
1102+ param . IsUploadMetadata = true ;
10791103 if ( options . LogAnnotationSetInfo )
10801104 {
10811105 logger ? . CommentUploadMetadataParam ( description , paramName ) ;
@@ -1160,6 +1184,13 @@ public static void SetCustomParameter(RoutineEndpoint endpoint, string name, str
11601184 endpoint . UserContext = parserUserContext ;
11611185 }
11621186 }
1187+ else if ( StrEqualsToArray ( name , userParemetersKey ) )
1188+ {
1189+ if ( bool . TryParse ( value , out var parserUserParameters ) )
1190+ {
1191+ endpoint . UseUserParameters = parserUserParameters ;
1192+ }
1193+ }
11631194 }
11641195
11651196 private static bool StrEquals ( string str1 , string str2 ) => str1 . Equals ( str2 , StringComparison . OrdinalIgnoreCase ) ;
0 commit comments