Skip to content

Commit d83dd67

Browse files
committed
refactor(REWRITE): adjust scope in RouteExecutorFactory
1 parent 8306645 commit d83dd67

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/SimpleW/RouteExecutorFactory.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public static HttpRouteExecutor Create(Delegate handler) {
325325
/// <param name="controllerType"></param>
326326
/// <param name="method"></param>
327327
/// <returns></returns>
328-
public static HttpRouteExecutor Create(Type controllerType, MethodInfo method) {
328+
private static HttpRouteExecutor Create(Type controllerType, MethodInfo method) {
329329
ArgumentNullException.ThrowIfNull(controllerType);
330330
ArgumentNullException.ThrowIfNull(method);
331331

@@ -738,7 +738,7 @@ private static HandlerReturnKind GetReturnKind(Type returnType) {
738738
/// </summary>
739739
/// <param name="p"></param>
740740
/// <returns></returns>
741-
public static object? GetDefaultValueForParameter(ParameterInfo p) {
741+
private static object? GetDefaultValueForParameter(ParameterInfo p) {
742742
if (p.HasDefaultValue) {
743743
return p.DefaultValue;
744744
}
@@ -759,7 +759,7 @@ private static HandlerReturnKind GetReturnKind(Type returnType) {
759759
/// <param name="raw"></param>
760760
/// <param name="defaultValue"></param>
761761
/// <returns></returns>
762-
public static T ConvertFromStringOrDefault<T>(string raw, T defaultValue) {
762+
private static T ConvertFromStringOrDefault<T>(string raw, T defaultValue) {
763763
if (TryConvertFromString(raw, typeof(T), out object? value)) {
764764
return (T)value!;
765765
}
@@ -774,7 +774,7 @@ public static T ConvertFromStringOrDefault<T>(string raw, T defaultValue) {
774774
/// <param name="targetType"></param>
775775
/// <param name="value"></param>
776776
/// <returns></returns>
777-
public static bool TryConvertFromString(string raw, Type targetType, out object? value) {
777+
private static bool TryConvertFromString(string raw, Type targetType, out object? value) {
778778
value = null;
779779

780780
Type? underlying = Nullable.GetUnderlyingType(targetType);
@@ -942,7 +942,7 @@ public static bool TryConvertFromString(string raw, Type targetType, out object?
942942
/// </summary>
943943
/// <param name="handler"></param>
944944
/// <returns></returns>
945-
internal static HandlerMetadataCollection GetMetadata(Delegate handler) {
945+
public static HandlerMetadataCollection GetMetadata(Delegate handler) {
946946
ArgumentNullException.ThrowIfNull(handler);
947947

948948
Type? declaringType = handler.Target?.GetType() ?? handler.Method.DeclaringType;

0 commit comments

Comments
 (0)