mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-18 17:48:12 +08:00
style(wxapi): clean code
This commit is contained in:
@@ -14,7 +14,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Sample.Options
|
||||
public string CallbackToken { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
partial class WechatOptions
|
||||
public partial class WechatOptions
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
|
@@ -12,7 +12,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Sample.Services.BackgroundServices
|
||||
using SKIT.FlurlHttpClient.Wechat.Api;
|
||||
using SKIT.FlurlHttpClient.Wechat.Api.Models;
|
||||
|
||||
class WechatAccessTokenRefreshingBackgroundService : BackgroundService
|
||||
internal class WechatAccessTokenRefreshingBackgroundService : BackgroundService
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly Options.WechatOptions _wechatOptions;
|
||||
@@ -70,7 +70,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Sample.Services.BackgroundServices
|
||||
if (!response.IsSuccessful())
|
||||
{
|
||||
_logger.LogWarning(
|
||||
"刷新 AppId 为 {0} 微信 AccessToken 失败(状态码:{1},错误代码:{2},错误描述:{3})。",
|
||||
"刷新 AppId 为 {0} 微信 AccessToken 失败(状态码:{1},错误代码:{2},错误描述:{3})。",
|
||||
appId, response.RawStatus, response.ErrorCode, response.ErrorMessage
|
||||
);
|
||||
return; // 请求失败
|
||||
|
@@ -5,7 +5,7 @@ using Medallion.Threading.FileSystem;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Sample.Services.DistributedLock.Implements
|
||||
{
|
||||
class DistributedLockFactory : IDistributedLockFactory
|
||||
internal class DistributedLockFactory : IDistributedLockFactory
|
||||
{
|
||||
private readonly DirectoryInfo _lockFileDirectory = new DirectoryInfo(Environment.CurrentDirectory);
|
||||
|
||||
|
@@ -5,7 +5,7 @@ using Microsoft.Extensions.Options;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Sample.Services.HttpClients.Implements
|
||||
{
|
||||
partial class WechatApiHttpClientFactory : IWechatApiHttpClientFactory
|
||||
internal partial class WechatApiHttpClientFactory : IWechatApiHttpClientFactory
|
||||
{
|
||||
private readonly IHttpClientFactory _httpClientFactory;
|
||||
private readonly Options.WechatOptions _wechatOptions;
|
||||
@@ -40,7 +40,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Sample.Services.HttpClients.Implements
|
||||
}
|
||||
}
|
||||
|
||||
partial class WechatApiHttpClientFactory
|
||||
internal partial class WechatApiHttpClientFactory
|
||||
{
|
||||
internal class DelegatingFlurlClientFactory : Flurl.Http.Configuration.DefaultHttpClientFactory
|
||||
{
|
||||
|
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
|
Reference in New Issue
Block a user