File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
tests/Rewrite.MSBuild.Tests Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,17 @@ public override required string Type
2323 init
2424 {
2525 _typeName = value ;
26- _type = System . Type . GetType ( value ) ?? throw new TypeLoadException ( $ "Type { value } cannot be loaded") ;
26+ var type = value switch
27+ {
28+ "string" => typeof ( string ) ,
29+ "int" => typeof ( int ) ,
30+ "long" => typeof ( long ) ,
31+ "bool" => typeof ( bool ) ,
32+ "float" => typeof ( float ) ,
33+ "double" => typeof ( double ) ,
34+ _ => System . Type . GetType ( value )
35+ } ?? throw new TypeLoadException ( $ "Type { value } cannot be loaded") ;
36+ _type = type ;
2737 }
2838 }
2939
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ namespace Rewrite.MSBuild.Tests;
1616public class RpcTests
1717{
1818 [ Test ]
19+ [ Explicit ]
1920 public void NewValue ( )
2021 {
2122 AnsiConsole . Reset ( ) ;
@@ -45,6 +46,7 @@ public class MyClass
4546 }
4647
4748 [ Test ]
49+ [ Explicit ]
4850 public void UpdatedValue ( )
4951 {
5052
You can’t perform that action at this time.
0 commit comments