wwm.LeetCodeHelper 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package wwm.LeetCodeHelper --version 0.2.0                
NuGet\Install-Package wwm.LeetCodeHelper -Version 0.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="wwm.LeetCodeHelper" Version="0.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add wwm.LeetCodeHelper --version 0.2.0                
#r "nuget: wwm.LeetCodeHelper, 0.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install wwm.LeetCodeHelper as a Cake Addin
#addin nuget:?package=wwm.LeetCodeHelper&version=0.2.0

// Install wwm.LeetCodeHelper as a Cake Tool
#tool nuget:?package=wwm.LeetCodeHelper&version=0.2.0                

wwm.leetcode.helper.issue

介绍

wwm.leetcode.helper 是 C# 刷LeetCode帮助包 本仓库为wwm.leetcode.helper帮助包收集ISSUE仓库

wwm.leetcode.helper 特点:

  1. 自动下载原题
  2. 自动将原题测试案例生成测试数据
  3. 自动添加方法默认返回值
  4. 自动比较方法返回值,并输出正确与错误数据的对比
软件架构

.NET6 Playwright Roslyn

安装教程
  1. 从nuget上搜索wwm.leetcode.helper
使用说明

创建Console控制台应用程序,Program.cs 内容如下

List<string> problemUrls = new List<string>()
{
    "https://leetcode-cn.com/problems/two-sum/"
};

if (problemUrls.Count == 0)
{
    TestResultHelper.InvokeAllTest(typeof(Program).Assembly.GetName().Name);
    await Utils.ConsoleDelayExitAsync();
}
else
{
    await LeetCodeHelper.GetContentFromBrowserAsync(problemUrls, "content", SlowMo: 0, Headless: true);
    var enumerator = LeetCodeHelper.Data.GetEnumerator();
    while (enumerator.MoveNext()) LeetCodeHelper.GenerateFunctionFile(enumerator.Current, nameof(LeetCodeCSharp.Solutions), showContent: false);
}

具体使用可参照作者本人刷leetcode仓库地址 https://gitee.com/wwmin/LeetCodeCSharp.git

参与贡献
  1. 欢迎安装nuget包试用
  2. 欢迎积极提issue
  3. wwm.leetcode.helper暂时不开源
使用方法
  1. 输入leetcode url地址,运行可自动生成C#原题及测试数据文件,文件自动下载到指定文件夹路径下
  2. 测试代码前需要先注释掉 Program.cs 下的problemUrls url值,且需要在待测文件类上继承 OnlyTest 接口,不需要测试类要删除 OnlyTest
  3. 然后F5运行测试,自动比较结果,输出正确结果或错误结果比较
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.10.0 401 2/1/2023
0.9.5 332 12/29/2022
0.9.4 322 12/8/2022
0.9.3 338 12/5/2022
0.9.2 351 12/2/2022
0.9.1 342 12/2/2022
0.9.0 344 12/2/2022
0.8.12 339 12/1/2022
0.8.11 462 9/30/2022
0.8.10 431 9/29/2022
0.8.9 425 9/8/2022
0.8.8 462 8/30/2022
0.8.7 437 8/27/2022
0.8.6 436 8/24/2022
0.8.5 530 2/14/2022
0.8.4 464 2/6/2022
0.8.3 484 2/5/2022
0.8.2 472 2/4/2022
0.8.1 482 2/4/2022
0.8.0 478 2/4/2022
0.7.5 480 1/28/2022
0.7.4 537 1/26/2022
0.7.3 485 1/26/2022
0.7.2 492 1/26/2022
0.7.1 484 1/16/2022
0.7.0 475 1/16/2022
0.6.2 498 1/15/2022
0.6.1 485 1/15/2022
0.6.0 320 1/7/2022
0.5.2 327 12/28/2021
0.5.1 343 12/23/2021
0.5.0 281 12/23/2021
0.4.0 313 12/23/2021
0.3.0 318 12/22/2021
0.2.0 331 12/16/2021
0.1.0 423 9/10/2021