Compare commits

...
4 Commits
Author SHA1 Message Date
xrain ef3f1bfa88 fix checkcell regex 2021-09-26 13:11:22 +08:00
xrain 01a2689549 fix ci 2021-07-10 18:39:32 +08:00
xrainandGitHub 916f046789 fix ci 2021-07-10 18:39:02 +08:00
xrain 51ac170a22 add logger 2021-06-28 05:45:29 +08:00
3 changed files with 7 additions and 12 deletions
@@ -1,6 +1,9 @@
name: PublishNugetPackage name: PublishNugetPackage
on: [create] on:
push:
tags:
- '*'
jobs: jobs:
publish: publish:
+2 -10
View File
@@ -1,5 +1,4 @@
using System; using System.Security.Cryptography;
using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
@@ -14,7 +13,7 @@ namespace SimApi.Helpers
/// <returns></returns> /// <returns></returns>
public static bool CheckCell(string cell) public static bool CheckCell(string cell)
{ {
var regex = new Regex("^1[34578]\\d{9}$"); var regex = new Regex("^1[3456789]\\d{9}$");
return regex.IsMatch(cell); return regex.IsMatch(cell);
} }
@@ -37,12 +36,5 @@ namespace SimApi.Helpers
return strbul.ToString(); return strbul.ToString();
} }
public static void Log(string message, string type = "Information")
{
Console.WriteLine($"[ SimApi ][ {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff")} ][ {type} ]");
Console.WriteLine(message);
Console.WriteLine("");
}
} }
} }
+1 -1
View File
@@ -175,7 +175,7 @@ namespace SimApi
builder.ApplicationServices.GetService<ILoggerFactory>().AddProvider(new SimApiLoggerProvider()); builder.ApplicationServices.GetService<ILoggerFactory>().AddProvider(new SimApiLoggerProvider());
} }
var logger = builder.ApplicationServices.GetService<ILogger>(); var logger = builder.ApplicationServices.GetService<ILogger<SimApiLogger>>();
if (options.EnableForwardHeaders) if (options.EnableForwardHeaders)
{ {