Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
10bdd35
💾 ✔️ Feat, Test: 新增以 NTP 协议为基础的网络授时时间差异计算方法
Dynesshely Mar 23, 2023
49473dd
💾 ✔️ Feat, Test(StringHelper): New function `SeparateGroup`!
Dynesshely Mar 30, 2023
02b8948
📝 Chore: Nullable!
Dynesshely Mar 30, 2023
952fc33
🧩 Refactor: Nullable supports.
Dynesshely Mar 30, 2023
e6cfc02
🧩 Refactor: Nullable supports.
Dynesshely Mar 30, 2023
afe9753
🧩 Refactor: Apply pattern-matching and nullable supports.
Dynesshely Mar 30, 2023
7d4a8f0
🧩 Refactor: Apply pattern-matching and nullable supports.
Dynesshely Mar 30, 2023
9461fd8
💾 ✔️ Feat, Test: Password class with generator.
Dynesshely Apr 4, 2023
1a6e65c
📝 📦 Chore, Struct: Rename namespace and filename, to adapt for Visual…
Dynesshely Apr 4, 2023
171ed89
📄 Docs: Updated README for some usages.
Dynesshely Apr 4, 2023
50e094d
💾 📝 📦 Feat, Chore, Struct: New project with `Swagger` as interactive …
Dynesshely Apr 4, 2023
c7feb30
💾 ✔️ Feat, Test: Turn `IsNullOrEmpty` and `IsNullOrWhiteSpace` functi…
Dynesshely Apr 4, 2023
244a03b
💾 Feat: Added async way function for `ExecuteAsCommand`.
Dynesshely Apr 4, 2023
fe220e6
📦 ✔️ Struct, Test: Move extensions of `CommandsExecutor` into `String…
Dynesshely Apr 4, 2023
2daa5b9
📝 Chore: Disable launching browser settings.
Dynesshely Apr 4, 2023
025ca54
💾 ✔️ Feat, Test: Remove `WebConnectionError` function, updated unit t…
Dynesshely Apr 5, 2023
5675427
💾 ✔️ Feat, Test: More types supported to be `Close()`.
Dynesshely Apr 5, 2023
a262fe4
💾 📦 ✔️ Feat, Struct, Test: COID related changes.
Dynesshely Apr 5, 2023
26e92f5
📦 Struct: Add `_` to all unit tests file.
Dynesshely Apr 5, 2023
2628bb5
💾 📦 Feat, Struct: Rename `Net/BasicNet.cs` to `Network/NetUtils.cs` a…
Dynesshely Apr 5, 2023
6654887
📝 Chore(Actions): Update code coverage data.
Dynesshely Apr 5, 2023
f9a4356
📦 Struct: Rename `BasicNet_Tests.cs` to `NetUtils_Tests.cs`
Dynesshely Apr 5, 2023
3675bb7
💾 ✔️ 🎇 Feat, Test, Style(Resolution): Improved.
Dynesshely Apr 5, 2023
46bbc5b
🔧 ✔️ Fix, Test: Fixed error in `Tricks.cs` and wrote unit test.
Dynesshely Apr 6, 2023
985bb1e
🔧 ✔️ Fix, Test(Math Standard): Function of get position fixed and tes…
Dynesshely Apr 6, 2023
80ee91c
📝 ✔️ Struct, Test: Move special extensions back to mother class.
Dynesshely Apr 6, 2023
a59d5d9
💾 ✔️ Feat, Test: More functions for Dumpper, tested.
Dynesshely Apr 6, 2023
e8e2227
🧩 Refactor(FileHelper): Renamed one function and updated something.
Dynesshely Apr 7, 2023
ab86bd4
✔️ Test(FileHelper): Unit tests for `FileHelper` class.
Dynesshely Apr 7, 2023
1ed9483
📝 Chore: Support no net framework 4.6 now, unit tests project upgrade…
Dynesshely Apr 7, 2023
16560e1
💾 ✔️ Feat, Test(Dumpper): Upgraded functions and imported `Print` fun…
Dynesshely Apr 7, 2023
458126b
🔧 ✔️ Fix, Test: Fixed some problems, wrote units tests.
Dynesshely Apr 7, 2023
5f42ef4
✔️ Test: Wrote units tests for `Equation.cs`
Dynesshely Apr 7, 2023
0913daa
💾 ✔️ Feat, Test: Improved `FileHelper.cs` and wrote units tests fot it.
Dynesshely Apr 7, 2023
4f150a0
💾 Feat(Samples): APIs for `StringHelper.cs`
Dynesshely Apr 7, 2023
da06f5a
💾 ✔️ Feat, Test(ListHelper): Cut ending now available and init unit t…
Dynesshely Apr 8, 2023
517a9ce
✔️ Test: Update unit tests for `QueueHelper`
Dynesshely Apr 8, 2023
5d28a44
📦 Struct: Clean unnecessary files.
Dynesshely Apr 8, 2023
dca9065
🧩 📦 Refactor, Struct: Remove `Result` class.
Dynesshely Apr 8, 2023
a704bf4
📄 Docs(README): About Samples
Dynesshely Apr 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CodeCov

on:
push:
branches:
- "main"
paths-ignore:
- ".*/**"
- "**/*.md"
pull_request:
branches:
- "main"
paths-ignore:
- ".*/**"
- "**/*.md"

workflow_dispatch:

jobs:
codecov:
runs-on: ubuntu-latest

steps:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
18 changes: 18 additions & 0 deletions Common.BasicHelper.Samples/Common.BasicHelper.Samples.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Common.BasicHelper\Common.BasicHelper.csproj" />
</ItemGroup>

</Project>
41 changes: 41 additions & 0 deletions Common.BasicHelper.Samples/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using Common.BasicHelper.Core.Shell;
using Common.BasicHelper.Utils.Extensions;
using System.Web;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();

app.MapGet("/Utils/Extensions/StringHelper/ExecuteAsCommand/{cmd}.{args?}",
(string cmd, string? args) => cmd.ExecuteAsCommand(
args == "," || args == "{args}" || args.IsNullOrWhiteSpace()
? null : HttpUtility.UrlDecode(args)
)
)
.WithName("ExecuteAsCommand")
.WithOpenApi();

app.MapGet("/Utils/Extensions/StringHelper/ExecuteAsCommandAsync/{cmd}.{args?}",
async (string cmd, string? args) => await cmd.ExecuteAsCommandAsync(
args == "," || args == "{args}" || args.IsNullOrWhiteSpace()
? null : HttpUtility.UrlDecode(args)
)
)
.WithName("ExecuteAsCommandAsync")
.WithOpenApi();

app.Run();
41 changes: 41 additions & 0 deletions Common.BasicHelper.Samples/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:40529",
"sslPort": 44396
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5077",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7219;http://localhost:5077",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
7 changes: 7 additions & 0 deletions Common.BasicHelper.Samples/Utils/Extensions/StringHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Common.BasicHelper.Samples.Utils.Extensions;

public static class StringHelper
{


}
8 changes: 8 additions & 0 deletions Common.BasicHelper.Samples/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
9 changes: 9 additions & 0 deletions Common.BasicHelper.Samples/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
2 changes: 1 addition & 1 deletion Common.BasicHelper.Test/Common.BasicHelper.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
17 changes: 17 additions & 0 deletions Common.BasicHelper.Test/Core/Shell/CommandsExecutor_Tests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Common.BasicHelper.Core.Shell;

[TestClass]
public class CommandsExecutor_Tests
{
[TestMethod]
public void Test_ExecuteAsCommand()
{
Console.WriteLine("help".ExecuteAsCommand());
}

[TestMethod]
public async Task Test_ExecuteAsCommandAsync()
{
Console.WriteLine(await "help".ExecuteAsCommandAsync());
}
}
5 changes: 5 additions & 0 deletions Common.BasicHelper.Test/Core/Shell/EnvironmentHelper_Tests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace Common.BasicHelper.Core.Shell;

public class EnvironmentHelper_Tests
{
}
13 changes: 0 additions & 13 deletions Common.BasicHelper.Test/Core/Shell/Test_CommandsExecutor.cs

This file was deleted.

5 changes: 0 additions & 5 deletions Common.BasicHelper.Test/Core/Shell/Test_EnvironmentHelper.cs

This file was deleted.

24 changes: 24 additions & 0 deletions Common.BasicHelper.Test/Graphics/Screen/Resolution_Tests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace Common.BasicHelper.Graphics.Screen;

[TestClass]
public class Resolution_Tests
{
[TestMethod()]
public void Test_Suggest()
{
foreach (var item in Resolution.resolutions)
{
var tarRes = Resolution.Suggest(
Resolution.Parse("2560x1440"),
Resolution.Parse("1280x720"),
item
).Integerization();

Console.WriteLine(
"" +
$"{item} ({item.Description})\r\n" +
$"\t{tarRes}"
);
}
}
}
18 changes: 0 additions & 18 deletions Common.BasicHelper.Test/Graphics/Screen/Test_Resolution.cs

This file was deleted.

Loading