From 207bda601c5ca3d7cd36667d6504e3c098771dc5 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 5 Nov 2024 16:11:29 +0100 Subject: [PATCH] chore: remove unused StringExtensions.cs --- .../Playwright.Tooling/DriverDownloader.cs | 9 ++++- .../Extensions/StringExtensions.cs | 33 ------------------ .../Options/DownloadDriversOptions.cs | 34 ------------------- src/tools/Playwright.Tooling/Program.cs | 1 - 4 files changed, 8 insertions(+), 69 deletions(-) delete mode 100644 src/tools/Playwright.Tooling/Extensions/StringExtensions.cs delete mode 100644 src/tools/Playwright.Tooling/Options/DownloadDriversOptions.cs diff --git a/src/tools/Playwright.Tooling/DriverDownloader.cs b/src/tools/Playwright.Tooling/DriverDownloader.cs index a6cf4a692f..b204ec8068 100644 --- a/src/tools/Playwright.Tooling/DriverDownloader.cs +++ b/src/tools/Playwright.Tooling/DriverDownloader.cs @@ -30,7 +30,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Xml; -using Playwright.Tooling.Options; +using CommandLine; namespace Playwright.Tooling; @@ -186,3 +186,10 @@ private async Task ExecuteAsync() return true; } } + +[Verb("download-drivers")] +internal class DownloadDriversOptions +{ + [Option(Required = true, HelpText = "Solution path.")] + public string BasePath { get; set; } +} diff --git a/src/tools/Playwright.Tooling/Extensions/StringExtensions.cs b/src/tools/Playwright.Tooling/Extensions/StringExtensions.cs deleted file mode 100644 index 2f6e0456aa..0000000000 --- a/src/tools/Playwright.Tooling/Extensions/StringExtensions.cs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2020 DarĂ­o Kondratiuk - * Modifications copyright (c) Microsoft Corporation. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -using System.Net; - -namespace Playwright.Tooling.Extensions; - -internal static class StringExtensions -{ - public static string ToHtml(this string value) => WebUtility.HtmlEncode(value); -} diff --git a/src/tools/Playwright.Tooling/Options/DownloadDriversOptions.cs b/src/tools/Playwright.Tooling/Options/DownloadDriversOptions.cs deleted file mode 100644 index 7b473e1a5d..0000000000 --- a/src/tools/Playwright.Tooling/Options/DownloadDriversOptions.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * MIT License - * - * Copyright (c) Microsoft Corporation. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and / or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -using CommandLine; - -namespace Playwright.Tooling.Options; - -[Verb("download-drivers")] -internal class DownloadDriversOptions -{ - [Option(Required = true, HelpText = "Solution path.")] - public string BasePath { get; set; } -} diff --git a/src/tools/Playwright.Tooling/Program.cs b/src/tools/Playwright.Tooling/Program.cs index b0121c5b3d..67f5a3a1d3 100644 --- a/src/tools/Playwright.Tooling/Program.cs +++ b/src/tools/Playwright.Tooling/Program.cs @@ -24,7 +24,6 @@ using System.Threading.Tasks; using CommandLine; -using Playwright.Tooling.Options; namespace Playwright.Tooling;