File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -18,4 +18,6 @@ public static string FriendlyTypeName(this object obj)
1818 {
1919 return obj . GetType ( ) . FriendlyTypeName ( ) ;
2020 }
21+
22+ public static T WithCurrent < T > ( this T obj , Func < T , T > func ) => func ( obj ) ;
2123}
Original file line number Diff line number Diff line change 33using SER . Code . ArgumentSystem . BaseArguments ;
44using SER . Code . Helpers ;
55using SER . Code . Helpers . Exceptions ;
6+ using SER . Code . Helpers . Extensions ;
67using SER . Code . ScriptSystem ;
78
89namespace SER . Code . MethodSystem . BaseMethods ;
@@ -19,7 +20,12 @@ public abstract class Method
1920 protected Method ( )
2021 {
2122 var type = GetType ( ) ;
22- Subgroup = type . Namespace ? . Split ( '.' ) . LastOrDefault ( ) ? . Replace ( "Methods" , "" ) ?? "Unknown" ;
23+
24+ Subgroup = type . Namespace ?
25+ . Split ( '.' )
26+ . LastOrDefault ( ) ?
27+ . WithCurrent ( name => name . Substring ( 0 , name . Length - "Methods" . Length ) )
28+ ?? "Unknown" ;
2329
2430 var name = type . Name ;
2531 if ( ! name . EndsWith ( "Method" ) )
@@ -33,7 +39,7 @@ protected Method()
3339
3440 public readonly string Name ;
3541
36- public abstract string ? Description { get ; }
42+ public abstract string Description { get ; }
3743
3844 public abstract Argument [ ] ExpectedArguments { get ; }
3945
You can’t perform that action at this time.
0 commit comments