From cd5474fbe0ee56ca74cd0ee309a25fb5a77559c6 Mon Sep 17 00:00:00 2001 From: axeh Date: Thu, 7 Apr 2022 11:33:23 +0200 Subject: [PATCH 1/5] Fix --- MSBuildLaunchPad/ParserFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MSBuildLaunchPad/ParserFactory.cs b/MSBuildLaunchPad/ParserFactory.cs index a6c2dca..205efc0 100644 --- a/MSBuildLaunchPad/ParserFactory.cs +++ b/MSBuildLaunchPad/ParserFactory.cs @@ -7,7 +7,7 @@ public static class ParserFactory public static IParser Parse(string fileName) { string extension = Path.GetExtension(fileName); - if (extension == ".sln") + if (extension.Equals(".sln")) { return new SolutionParser(fileName); } From 8c52f425958c7734e7a931ae63a97e38fb055c2c Mon Sep 17 00:00:00 2001 From: axeh Date: Thu, 7 Apr 2022 11:36:20 +0200 Subject: [PATCH 2/5] Fix --- MSBuildLaunchPad/ParserFactory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MSBuildLaunchPad/ParserFactory.cs b/MSBuildLaunchPad/ParserFactory.cs index 205efc0..3fba109 100644 --- a/MSBuildLaunchPad/ParserFactory.cs +++ b/MSBuildLaunchPad/ParserFactory.cs @@ -7,12 +7,12 @@ public static class ParserFactory public static IParser Parse(string fileName) { string extension = Path.GetExtension(fileName); - if (extension.Equals(".sln")) + if (extension == ".sln") { return new SolutionParser(fileName); } - if (extension == ".csproj" || extension == ".vbproj" || extension == ".vcxproj" || extension == ".oxygene" || extension == ".shfbproj") + if (extension == ".csproj" || extension == ".vbproj" || extension == ".vcxproj" || extension == ".oxygene" || extension == ".shfbproj" || extension == ".asdasd") { return new MSBuildScriptParser(fileName); } From fc0fda75ab02b3aa884e221fe40a9761a23df040 Mon Sep 17 00:00:00 2001 From: axeh Date: Thu, 7 Apr 2022 11:43:33 +0200 Subject: [PATCH 3/5] Fix --- MSBuildLaunchPad/ParserFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MSBuildLaunchPad/ParserFactory.cs b/MSBuildLaunchPad/ParserFactory.cs index 3fba109..5ee74cc 100644 --- a/MSBuildLaunchPad/ParserFactory.cs +++ b/MSBuildLaunchPad/ParserFactory.cs @@ -4,7 +4,7 @@ namespace Lextm.MSBuildLaunchPad { public static class ParserFactory { - public static IParser Parse(string fileName) + public static IParser ParseFile(string fileName) { string extension = Path.GetExtension(fileName); if (extension == ".sln") From b8a582d585d777bbafefabc86c8e49f298252028 Mon Sep 17 00:00:00 2001 From: axeh Date: Thu, 7 Apr 2022 11:52:08 +0200 Subject: [PATCH 4/5] Naming --- MSBuildLaunchPad/ParserFactory.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MSBuildLaunchPad/ParserFactory.cs b/MSBuildLaunchPad/ParserFactory.cs index 5ee74cc..2b5bd71 100644 --- a/MSBuildLaunchPad/ParserFactory.cs +++ b/MSBuildLaunchPad/ParserFactory.cs @@ -6,13 +6,13 @@ public static class ParserFactory { public static IParser ParseFile(string fileName) { - string extension = Path.GetExtension(fileName); - if (extension == ".sln") + string ext = Path.GetExtension(fileName); + if (ext == ".sln") { return new SolutionParser(fileName); } - if (extension == ".csproj" || extension == ".vbproj" || extension == ".vcxproj" || extension == ".oxygene" || extension == ".shfbproj" || extension == ".asdasd") + if (ext == ".csproj" || ext == ".vbproj" || ext == ".vcxproj" || ext == ".oxygene" || ext == ".shfbproj" || ext == ".asdasd") { return new MSBuildScriptParser(fileName); } From 6787c10ea628e3a40ee8f813f194b8e4ed1c5dc9 Mon Sep 17 00:00:00 2001 From: axeh Date: Thu, 7 Apr 2022 11:53:39 +0200 Subject: [PATCH 5/5] Naming --- MSBuildLaunchPad/ParserFactory.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MSBuildLaunchPad/ParserFactory.cs b/MSBuildLaunchPad/ParserFactory.cs index 2b5bd71..4137445 100644 --- a/MSBuildLaunchPad/ParserFactory.cs +++ b/MSBuildLaunchPad/ParserFactory.cs @@ -4,15 +4,17 @@ namespace Lextm.MSBuildLaunchPad { public static class ParserFactory { - public static IParser ParseFile(string fileName) + public static IParser Parse(string fileName) { - string ext = Path.GetExtension(fileName); - if (ext == ".sln") + string extension = Path.GetExtension(fileName); + var n = extension.Length; + + if (extension == ".sln") { return new SolutionParser(fileName); } - if (ext == ".csproj" || ext == ".vbproj" || ext == ".vcxproj" || ext == ".oxygene" || ext == ".shfbproj" || ext == ".asdasd") + if (extension == ".csproj" || extension == ".vbproj" || extension == ".vcxproj" || extension == ".oxygene" || extension == ".shfbproj") { return new MSBuildScriptParser(fileName); }