@@ -9,38 +9,21 @@ internal static class BuildErrorEventArgsContext
99 {
1010 internal static string GetNoobFriendlyTip ( this BuildErrorEventArgs @this )
1111 {
12- switch ( @this . Code )
13- {
14- case "CS0103" :
15- return "Did you name your classes incorrectly or forget to add correct imports?" ;
16- case "CS1026" :
17- case "CS1513" :
18- return "Make sure all opening brackets have a corresponding closing bracket." ;
19- case "CS1003" :
20- return @this . Message . Contains ( "']'" )
21- ? "Make sure all opening brackets have a corresponding closing bracket."
22- : string . Empty ;
23- case "CS0116" :
24- return "Make sure your variables and methods are inside a class or struct." ;
25- case "CS0165" :
26- return "Make sure the variable is assigned a value." ;
27- case "CS0269" :
28- return "Make sure the parameter is assigned a value." ;
29- case "CS1001" :
30- return "Make sure your classes and variables have names." ;
31- case "CS1009" :
32- return "If you want to use the backslash (\\ ) character in a string, type '\\ \\ ' instead or precede the string with '@'." ;
33- case "CS1061" :
34- return "Make sure the method or class member exists." ;
35- case "CS1501" :
36- case "CS1502" :
37- case "CS1503" :
38- return "Make sure your arguments match the method definition." ;
39- case "CS1729" :
40- return "Make sure your parameters match the constructor definition." ;
41- default :
42- return string . Empty ;
43- } ;
12+ return @this . Code switch
13+ {
14+ "CS0103" => "Did you name your classes incorrectly or forget to add correct imports?" ,
15+ "CS1026" or "CS1513" => "Make sure all opening brackets have a corresponding closing bracket." ,
16+ "CS1003" => @this . Message . Contains ( "']'" ) ? "Make sure all opening brackets have a corresponding closing bracket." : string . Empty ,
17+ "CS0116" => "Make sure your variables and methods are inside a class or struct." ,
18+ "CS0165" => "Make sure the variable is assigned a value." ,
19+ "CS0269" => "Make sure the parameter is assigned a value." ,
20+ "CS1001" => "Make sure your classes and variables have names." ,
21+ "CS1009" => "If you want to use the backslash (\\ ) character in a string, type '\\ \\ ' instead or precede the string with '@'." ,
22+ "CS1061" => "Make sure the method or class member exists." ,
23+ "CS1501" or "CS1502" or "CS1503" => "Make sure your arguments match the method definition." ,
24+ "CS1729" => "Make sure your parameters match the constructor definition." ,
25+ _ => string . Empty ,
26+ } ;
4427 }
4528 }
4629}
0 commit comments