master
xiaochanghai 2 weeks ago
parent 6caeda7651
commit 75351ca06c
  1. 11
      Ocelot.Provider.Nacos/Nacos.cs
  2. 5
      Ocelot.Provider.Nacos/NacosClient/LoadBalance/ILBStrategy.cs
  3. 5
      Ocelot.Provider.Nacos/NacosClient/LoadBalance/LBStrategyName.cs
  4. 5
      Ocelot.Provider.Nacos/NacosClient/LoadBalance/LbKv.cs
  5. 11
      Ocelot.Provider.Nacos/NacosClient/LoadBalance/WeightRandomLBStrategy.cs
  6. 10
      Ocelot.Provider.Nacos/NacosClient/LoadBalance/WeightRoundRobinLBStrategy.cs
  7. 10
      Ocelot.Provider.Nacos/NacosClient/UriTool.cs
  8. 6
      Ocelot.Provider.Nacos/NacosClient/V2/NacosAspNetOptions.cs
  9. 10
      Ocelot.Provider.Nacos/NacosClient/V2/RegSvcBgTask.cs
  10. 7
      Ocelot.Provider.Nacos/NacosClient/V2/ServiceCollectionExtensions.cs
  11. 11
      Ocelot.Provider.Nacos/NacosMiddlewareConfigurationProvider.cs
  12. 12
      Ocelot.Provider.Nacos/NacosProviderFactory.cs
  13. 8
      Ocelot.Provider.Nacos/OcelotBuilderExtensions.cs
  14. 8
      Tiobon.Core.Common/Helper/ExtensionHelper.cs
  15. 5
      Tiobon.Core.EventBus/EventBusKafka/EventBusKafka.cs
  16. 6
      Tiobon.Core.EventBus/EventBusKafka/IKafkaConnectionPool.cs
  17. 7
      Tiobon.Core.EventBus/EventBusKafka/KafkaConnectionPool.cs
  18. 9
      Tiobon.Core.EventBus/EventBusKafka/KafkaConsumerHostService.cs
  19. 5
      Tiobon.Core.EventBus/EventBusKafka/KafkaOptions.cs
  20. 7
      Tiobon.Core.EventBus/EventBusKafka/ProtobufTransfer.cs
  21. 8
      Tiobon.Core.EventBus/EventBusSubscriptions/InMemoryEventBusSubscriptionsManager.cs
  22. 6
      Tiobon.Core.EventBus/EventBusSubscriptions/SubscriptionInfo.cs
  23. 5
      Tiobon.Core.EventBus/Eventbus/IDynamicIntegrationEventHandler.cs
  24. 5
      Tiobon.Core.EventBus/Eventbus/IEventBus.cs
  25. 7
      Tiobon.Core.EventBus/Eventbus/IEventBusSubscriptionsManager.cs
  26. 5
      Tiobon.Core.EventBus/Eventbus/IIntegrationEventHandler.cs
  27. 6
      Tiobon.Core.EventBus/Eventbus/IntegrationEvent.cs
  28. 5
      Tiobon.Core.EventBus/RabbitMQPersistent/EventBusRabbitMQ.cs
  29. 6
      Tiobon.Core.EventBus/RabbitMQPersistent/IRabbitMQPersistentConnection.cs
  30. 7
      Tiobon.Core.EventBus/RabbitMQPersistent/RabbitMQPersistentConnection.cs
  31. 5
      Tiobon.Core.Gateway/Controllers/UserController.cs
  32. 9
      Tiobon.Core.Gateway/Extensions/CustomAuthenticationHandler.cs
  33. 13
      Tiobon.Core.Gateway/Extensions/CustomOcelotSetup.cs
  34. 9
      Tiobon.Core.Gateway/Extensions/CustomResultHandler.cs
  35. 19
      Tiobon.Core.Gateway/Extensions/CustomSwaggerSetup.cs
  36. 5
      Tiobon.Core.Gateway/Helper/CustomJwtTokenAuthMiddleware.cs
  37. 7
      Tiobon.Core.Gateway/Program.cs
  38. 7
      Tiobon.Core.Model/HttpEnum.cs
  39. 16
      Tiobon.Core.Model/ViewModels/EnumDemoDto.cs
  40. 22
      Tiobon.Core.Model/ViewModels/TopgbViewModels.cs
  41. 18
      Tiobon.Core.Model/ViewModels/UploadFileDto.cs
  42. 5
      Tiobon.Core.Tasks/GlobalUsings.cs
  43. 7
      Tiobon.Core.Tasks/QuartzNet/ISchedulerCenter.cs
  44. 5
      Tiobon.Core.Tasks/QuartzNet/Jobs/JobBase.cs
  45. 4
      Tiobon.Core.Tasks/QuartzNet/Jobs/Job_AutoClearLog_Quartz.cs
  46. 4
      Tiobon.Core.Tasks/QuartzNet/Jobs/Job_AutoIssueCertificate_Quartz.cs
  47. 3
      Tiobon.Core.Tasks/QuartzNet/Jobs/Job_AutoIssueCredit_Quartz.cs
  48. 4
      Tiobon.Core.Tasks/QuartzNet/Jobs/Job_AutoMarkCompleteStatus_Quartz.cs
  49. 1
      Tiobon.Core.Tasks/QuartzNet/Jobs/Job_OperateLog_Quartz.cs
  50. 4
      Tiobon.Core.Tasks/QuartzNet/Jobs/Job_URL_Quartz.cs
  51. 3
      Tiobon.Core.Tasks/QuartzNet/SchedulerCenterServer.cs
  52. 6
      Tiobon.Core.Tests/Common_Test/DbAccess_Should.cs
  53. 5
      Tiobon.Core.Tests/Common_Test/HttpHelper_Should.cs
  54. 9
      Tiobon.Core.Tests/Common_Test/SM4Helper_Should.cs
  55. 5
      Tiobon.Core.Tests/Controller_Test/LoginController_Should.cs
  56. 5
      Tiobon.Core.Tests/DependencyInjection/DI_Test.cs
  57. 5
      Tiobon.Core.Tests/Redis_Test/Redis_Should.cs
  58. 17
      Tiobon.Core.Tests/Repository_Test/MongoRepository_Base_Should.cs
  59. 13
      Tiobon.Core.Tests/Repository_Test/Repository_Base_Should.cs
  60. 9
      Tiobon.Core.sln
  61. 25
      Tiobon.Core/Tiobon.Core.Model.xml

@ -1,12 +1,12 @@
using Ocelot.ServiceDiscovery.Providers;
using Ocelot.Values;
using Microsoft.Extensions.Options;
using Nacos.V2;
using Microsoft.Extensions.Options;
using Ocelot.Provider.Nacos.NacosClient.V2;
using Ocelot.ServiceDiscovery.Providers;
using Ocelot.Values;
using NacosConstants = Nacos.V2.Common.Constants;
namespace Ocelot.Provider.Nacos
{
namespace Ocelot.Provider.Nacos;
public class Nacos : IServiceDiscoveryProvider
{
private readonly INacosNamingService _client;
@ -54,4 +54,3 @@ namespace Ocelot.Provider.Nacos
throw new NotImplementedException();
}
}
}

@ -2,8 +2,8 @@
using Nacos.V2.Naming.Dtos;
using System.Collections.Generic;
namespace Ocelot.Provider.Nacos.NacosClient
{
namespace Ocelot.Provider.Nacos.NacosClient;
public interface ILBStrategy
{
/// <summary>
@ -23,4 +23,3 @@ namespace Ocelot.Provider.Nacos.NacosClient
}

@ -1,5 +1,5 @@
namespace Ocelot.Provider.Nacos.NacosClient
{
namespace Ocelot.Provider.Nacos.NacosClient;
public enum LBStrategyName
{
/// <summary>
@ -17,4 +17,3 @@
/// </summary>
Ext1
}
}

@ -1,9 +1,8 @@
namespace Ocelot.Provider.Nacos.NacosClient
{
namespace Ocelot.Provider.Nacos.NacosClient;
public class LbKv
{
public string InstanceId { get; set; }
public double Weight { get; set; }
}
}

@ -1,11 +1,7 @@
using Nacos;
using Nacos.V2.Naming.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using Nacos.V2.Naming.Dtos;
namespace Ocelot.Provider.Nacos.NacosClient;
namespace Ocelot.Provider.Nacos.NacosClient
{
public class WeightRandomLBStrategy : ILBStrategy
{
public LBStrategyName Name => LBStrategyName.WeightRandom;
@ -71,4 +67,3 @@ namespace Ocelot.Provider.Nacos.NacosClient
return dict;
}
}
}

@ -1,9 +1,6 @@
using Nacos;
using System.Collections.Generic;
using System.Linq;
using Nacos.V2.Naming.Dtos;
namespace Ocelot.Provider.Nacos.NacosClient
{
using Nacos.V2.Naming.Dtos;
namespace Ocelot.Provider.Nacos.NacosClient;
public class WeightRoundRobinLBStrategy : ILBStrategy
{
public LBStrategyName Name => LBStrategyName.WeightRoundRobin;
@ -68,4 +65,3 @@ namespace Ocelot.Provider.Nacos.NacosClient
return instance;
}
}
}

@ -1,13 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.AspNetCore.Hosting.Server.Features;
using Microsoft.AspNetCore.Http.Features;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
namespace Ocelot.Provider.Nacos.NacosClient
{
namespace Ocelot.Provider.Nacos.NacosClient;
internal static class UriTool
{
public static IEnumerable<Uri> GetUri(IFeatureCollection features, string ip, int port, string preferredNetworks)
@ -141,5 +138,4 @@ namespace Ocelot.Provider.Nacos.NacosClient
return instanceIp;
}
}
}

@ -1,9 +1,8 @@
using Nacos.V2;
using Nacos.V2.Common;
using System.Collections.Generic;
namespace Ocelot.Provider.Nacos.NacosClient.V2
{
namespace Ocelot.Provider.Nacos.NacosClient.V2;
public class NacosAspNetOptions : NacosSdkOptions
{
/// <summary>
@ -93,4 +92,3 @@ namespace Ocelot.Provider.Nacos.NacosClient.V2
};
}
}
}

@ -1,18 +1,13 @@
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Nacos.V2;
using Nacos.V2.Naming.Core;
using Nacos.V2.Naming.Dtos;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Ocelot.Provider.Nacos.NacosClient.V2
{
namespace Ocelot.Provider.Nacos.NacosClient.V2;
public class RegSvcBgTask
{
private static readonly string MetadataNetVersion = "DOTNET_VERSION";
@ -124,4 +119,3 @@ namespace Ocelot.Provider.Nacos.NacosClient.V2
}
}
}
}

@ -3,11 +3,9 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Nacos.V2.DependencyInjection;
using System;
using System.Threading.Tasks;
namespace Ocelot.Provider.Nacos.NacosClient.V2
{
namespace Ocelot.Provider.Nacos.NacosClient.V2;
public static class ServiceCollectionExtensions
{
/// <summary>
@ -56,4 +54,3 @@ namespace Ocelot.Provider.Nacos.NacosClient.V2
return app;
}
}
}

@ -1,14 +1,12 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Ocelot.Configuration;
using Ocelot.Configuration.Repository;
using Ocelot.Middleware;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Ocelot.Provider.Nacos.NacosClient.V2;
namespace Ocelot.Provider.Nacos
{
namespace Ocelot.Provider.Nacos;
public class NacosMiddlewareConfigurationProvider
{
public static OcelotMiddlewareConfigurationDelegate Get = builder =>
@ -31,4 +29,3 @@ namespace Ocelot.Provider.Nacos
return configuration?.ServiceProviderConfiguration != null && configuration.ServiceProviderConfiguration.Type?.ToLower() == "nacos";
}
}
}

@ -1,12 +1,11 @@
using System;
using Ocelot.ServiceDiscovery;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Nacos.V2;
using Ocelot.Provider.Nacos.NacosClient.V2;
using Microsoft.Extensions.Options;
using Ocelot.ServiceDiscovery;
namespace Ocelot.Provider.Nacos;
namespace Ocelot.Provider.Nacos
{
public static class NacosProviderFactory
{
public static ServiceDiscoveryFinderDelegate Get = (provider, config, route) =>
@ -20,4 +19,3 @@ namespace Ocelot.Provider.Nacos
return null;
};
}
}

@ -1,12 +1,11 @@
using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Ocelot.DependencyInjection;
using Ocelot.Middleware;
using Ocelot.Provider.Nacos.NacosClient.V2;
using Ocelot.ServiceDiscovery;
namespace Ocelot.Provider.Nacos
{
namespace Ocelot.Provider.Nacos;
public static class OcelotBuilderExtensions
{
public static IOcelotBuilder AddNacosDiscovery(this IOcelotBuilder builder)
@ -17,4 +16,3 @@ namespace Ocelot.Provider.Nacos
return builder;
}
}
}

@ -1,4 +1,10 @@
namespace Tiobon.Core.Common.Helper;
using SqlSugar;
using System.Data;
using Tiobon.Core.Helper;
using Tiobon.Core.Model.Entity;
using Tiobon.Core.Model.ViewModels.Extend;
namespace Tiobon.Core.Common.Helper;
public class ExtensionHelper
{

@ -4,8 +4,8 @@ using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using Tiobon.Core.Extensions;
namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
/// <summary>
/// 基于Kafka的事件总线
/// </summary>
@ -114,4 +114,3 @@ namespace Tiobon.Core.EventBus
}
}
}

@ -1,9 +1,8 @@
using Confluent.Kafka;
using System;
namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
/// <summary>
/// Kafka连接池
/// </summary>
@ -22,4 +21,3 @@ namespace Tiobon.Core.EventBus
/// <returns></returns>
bool Return(IProducer<string, byte[]> producer);
}
}

@ -1,12 +1,10 @@
using Confluent.Kafka;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System.Collections.Concurrent;
using System.Threading;
namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
/// <summary>
/// Kafka producer 连接池管理
/// 可以使用微软官方的对象池进行构造ObjectPool
@ -76,4 +74,3 @@ namespace Tiobon.Core.EventBus
}
}
}

@ -6,13 +6,9 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
/// <summary>
/// Kafka consumer 监听服务
/// </summary>
@ -159,4 +155,3 @@ namespace Tiobon.Core.EventBus
_logger.LogError("An error occurred during connect kafka:" + e.Reason);
}
}
}

@ -1,7 +1,7 @@

namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
/// <summary>
/// Kafka 配置项
/// </summary>
@ -25,4 +25,3 @@ namespace Tiobon.Core.EventBus
/// </summary>
public int NumPartitions { get; set; }
}
}

@ -1,7 +1,5 @@
using System;
using System.IO;
namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
public class Protobuf
{
/// <summary>
@ -29,4 +27,3 @@ namespace Tiobon.Core.EventBus
}
}
}

@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Tiobon.Core.EventBus;
namespace Tiobon.Core.EventBus
{
/// <summary>
/// 基于内存
/// 事件总线订阅管理器
@ -179,5 +175,3 @@ namespace Tiobon.Core.EventBus
return typeof(T).Name;
}
}
}

@ -1,7 +1,5 @@
using System;
namespace Tiobon.Core.EventBus;
namespace Tiobon.Core.EventBus
{
/// <summary>
/// 订阅信息模型
/// </summary>
@ -25,5 +23,3 @@ namespace Tiobon.Core.EventBus
return new SubscriptionInfo(false, handlerType);
}
}
}

@ -1,7 +1,5 @@
using System.Threading.Tasks;
namespace Tiobon.Core.EventBus;
namespace Tiobon.Core.EventBus
{
/// <summary>
/// 动态集成事件处理程序
/// 接口
@ -10,4 +8,3 @@ namespace Tiobon.Core.EventBus
{
Task Handle(dynamic eventData);
}
}

@ -1,5 +1,5 @@
namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
/// <summary>
/// 事件总线
/// 接口
@ -46,4 +46,3 @@
void UnsubscribeDynamic<TH>(string eventName)
where TH : IDynamicIntegrationEventHandler;
}
}

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
namespace Tiobon.Core.EventBus;
namespace Tiobon.Core.EventBus
{
/// <summary>
/// 事件总线订阅管理器
/// 接口
@ -32,5 +29,3 @@ namespace Tiobon.Core.EventBus
IEnumerable<SubscriptionInfo> GetHandlersForEvent(string eventName);
string GetEventKey<T>();
}
}

@ -1,7 +1,5 @@
using System.Threading.Tasks;
namespace Tiobon.Core.EventBus;
namespace Tiobon.Core.EventBus
{
/// <summary>
/// 集成事件处理程序
/// 泛型接口
@ -20,4 +18,3 @@ namespace Tiobon.Core.EventBus
public interface IIntegrationEventHandler
{
}
}

@ -1,8 +1,7 @@
using Newtonsoft.Json;
using System;
namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
/// <summary>
/// 事件模型
/// 基类
@ -28,4 +27,3 @@ namespace Tiobon.Core.EventBus
[JsonProperty]
public DateTime CreationDate { get; private set; }
}
}

@ -11,8 +11,8 @@ using System.Net.Sockets;
using System.Text;
using Tiobon.Core.Extensions;
namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
/// <summary>
/// 基于RabbitMQ的事件总线
/// </summary>
@ -348,4 +348,3 @@ namespace Tiobon.Core.EventBus
}
}
}
}

@ -1,8 +1,7 @@
using RabbitMQ.Client;
using System;
namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
/// <summary>
/// RabbitMQ持久连接
/// 接口
@ -41,4 +40,3 @@ namespace Tiobon.Core.EventBus
/// <param name="queueName"></param>
void StartConsuming(string queueName);
}
}

@ -4,13 +4,11 @@ using Polly.Retry;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using RabbitMQ.Client.Exceptions;
using System;
using System.IO;
using System.Net.Sockets;
using System.Text;
namespace Tiobon.Core.EventBus
{
namespace Tiobon.Core.EventBus;
/// <summary>
/// RabbitMQ持久连接
/// </summary>
@ -208,4 +206,3 @@ namespace Tiobon.Core.EventBus
Console.WriteLine("Consuming messages...");
}
}
}

@ -3,8 +3,8 @@ using Microsoft.AspNetCore.Mvc;
using Tiobon.Core.HttpContextUser;
using Tiobon.Core.Model.Entity;
namespace Tiobon.Core.Gateway.Controllers
{
namespace Tiobon.Core.Gateway.Controllers;
[Authorize(AuthenticationSchemes = Permissions.GWName)]
[Route("/gateway/[controller]/[action]")]
public class UserController : ControllerBase
@ -37,4 +37,3 @@ namespace Tiobon.Core.Gateway.Controllers
public string Type { get; set; }
public string Value { get; set; }
}
}

@ -1,15 +1,11 @@
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Microsoft.Net.Http.Headers;
using System;
using System.Collections.Generic;
using System.Security.Claims;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
namespace Tiobon.Core.Gateway.Extensions
{
namespace Tiobon.Core.Gateway.Extensions;
public class CustomAuthenticationHandler : AuthenticationHandler<AuthenticationSchemeOptions>
{
public CustomAuthenticationHandler(IOptionsMonitor<AuthenticationSchemeOptions> options,
@ -50,4 +46,3 @@ namespace Tiobon.Core.Gateway.Extensions
return token;
}
}
}

@ -1,15 +1,11 @@
using Tiobon.Core.Extensions;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Ocelot.DependencyInjection;
using Ocelot.DependencyInjection;
using Ocelot.Middleware;
//using Ocelot.Provider.Nacos;
using Ocelot.Provider.Polly;
using System;
using System.Threading.Tasks;
using Tiobon.Core.Extensions;
namespace Tiobon.Core.Gateway.Extensions;
namespace Tiobon.Core.Gateway.Extensions
{
public static class CustomOcelotSetup
{
public static void AddCustomOcelotSetup(this IServiceCollection services)
@ -31,4 +27,3 @@ namespace Tiobon.Core.Gateway.Extensions
}
}
}

@ -1,14 +1,10 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Tiobon.Core.Gateway.Extensions
{
namespace Tiobon.Core.Gateway.Extensions;
public class CustomResultHandler : DelegatingHandler
{
JsonSerializerSettings _camelSettings = new JsonSerializerSettings() { ContractResolver = new CamelCasePropertyNamesContractResolver() };
@ -59,4 +55,3 @@ namespace Tiobon.Core.Gateway.Extensions
return response;
}
}
}

@ -1,18 +1,8 @@
using Tiobon.Core.Common;
using Tiobon.Core.Extensions.Middlewares;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Filters;
using Swashbuckle.AspNetCore.SwaggerUI;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using static Tiobon.Core.Extensions.CustomApiVersion;
namespace Tiobon.Core.Gateway.Extensions
{
namespace Tiobon.Core.Gateway.Extensions;
public static class CustomSwaggerSetup
{
public static void AddCustomSwaggerSetup(this IServiceCollection services)
@ -78,4 +68,3 @@ namespace Tiobon.Core.Gateway.Extensions
}
}

@ -4,8 +4,8 @@ using System.Text.RegularExpressions;
using Tiobon.Core.Caches;
using Tiobon.Core.Helper;
namespace Tiobon.Core.AuthHelper
{
namespace Tiobon.Core.AuthHelper;
/// <summary>
/// 中间件
/// 原做为自定义授权中间件
@ -181,5 +181,4 @@ namespace Tiobon.Core.AuthHelper
{
public string url { get; set; }
}
}

@ -1,9 +1,5 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
namespace Tiobon.Core.AdminMvc;
namespace Tiobon.Core.AdminMvc
{
public class Program
{
public static void Main(string[] args)
@ -25,4 +21,3 @@ namespace Tiobon.Core.AdminMvc
webBuilder.UseStartup<Startup>().UseUrls("http://*:9000");
});
}
}

@ -1,7 +0,0 @@
namespace Tiobon.Core.Model;
public enum HttpEnum
{
Common,
LocalHost
}

@ -1,16 +0,0 @@
namespace Tiobon.Core.Model.ViewModels;
public class EnumDemoDto
{
public int Id { get; set; }
/// <summary>
/// Type Description balabala
/// </summary>
public EnumType Type { get; set; }
}
public enum EnumType
{
foo, bar, baz
}

@ -1,22 +0,0 @@
namespace Tiobon.Core.Model.ViewModels;
/// <summary>
/// 留言排名展示类
/// </summary>
public class TopgbViewModels
{
/// <summary>博客ID
///
/// </summary>
public int? TiobonId { get; set; }
/// <summary>
/// 评论数量
/// </summary>
public int counts { get; set; }
/// <summary>博客标题
///
/// </summary>
public string btitle { get; set; }
}

@ -1,18 +0,0 @@
using Microsoft.AspNetCore.Http;
namespace Tiobon.Core.Model.ViewModels;
public class UploadFileDto
{
//多文件
[Required]
public IFormFileCollection file { get; set; }
//单文件
//public IFormFile File { get; set; }
//其他数据
public string Foo { get; set; }
}

@ -1,2 +1,7 @@
global using Tiobon.Core.IServices;
global using Quartz;
global using Microsoft.Extensions.Logging;
global using Tiobon.Core.Model.Entity;
global using Tiobon.Core.Model.Models;
global using Tiobon.Core.Model.ViewModels;
global using Tiobon.Core.Helper;

@ -1,9 +1,4 @@
using Tiobon.Core.Model;
using Tiobon.Core.Model.Entity;
using Tiobon.Core.Model.Models;
using Tiobon.Core.Model.ViewModels;
namespace Tiobon.Core.Tasks;
namespace Tiobon.Core.Tasks;
/// <summary>
/// 服务调度接口

@ -1,7 +1,4 @@
using Tiobon.Core.Helper;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.Tasks;
namespace Tiobon.Core.Tasks;
public class JobBase
{

@ -1,6 +1,4 @@
using Microsoft.Extensions.Logging;
/// <summary>
/// <summary>
/// 这里要注意下,命名空间和程序集是一样的,不然反射不到(任务类要去JobSetup添加注入)
/// </summary>
namespace Tiobon.Core.Tasks;

@ -1,6 +1,4 @@
using Microsoft.Extensions.Logging;
/// <summary>
/// <summary>
/// 这里要注意下,命名空间和程序集是一样的,不然反射不到(任务类要去JobSetup添加注入)
/// </summary>
namespace Tiobon.Core.Tasks;

@ -1,5 +1,4 @@
using Microsoft.Extensions.Logging;

/// <summary>
/// 这里要注意下,命名空间和程序集是一样的,不然反射不到(任务类要去JobSetup添加注入)
/// </summary>

@ -1,6 +1,4 @@
using Microsoft.Extensions.Logging;
/// <summary>
/// <summary>
/// 这里要注意下,命名空间和程序集是一样的,不然反射不到(任务类要去JobSetup添加注入)
/// </summary>
namespace Tiobon.Core.Tasks;

@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Hosting;
using System.Text;
using Tiobon.Core.LogHelper;
using Tiobon.Core.Model.Models;
/// <summary>
/// 这里要注意下,命名空间和程序集是一样的,不然反射不到

@ -1,6 +1,4 @@
using Microsoft.Extensions.Logging;
using Tiobon.Core.Helper;

/// <summary>
/// 这里要注意下,命名空间和程序集是一样的,不然反射不到(任务类要去JobSetup添加注入)
/// </summary>

@ -4,9 +4,6 @@ using Quartz.Spi;
using System.Collections.Specialized;
using System.Reflection;
using Tiobon.Core.DB.Dapper;
using Tiobon.Core.Model.Entity;
using Tiobon.Core.Model.Models;
using Tiobon.Core.Model.ViewModels;
namespace Tiobon.Core.Tasks;

@ -1,10 +1,9 @@
using System.Data;
using Tiobon.Core.DB.Dapper;
using Tiobon.Core.Model.Models;
using Xunit;
namespace Tiobon.Core.Tests.Common_Test
{
namespace Tiobon.Core.Tests.Common_Test;
public class DbAccess_Should
{
@ -24,4 +23,3 @@ namespace Tiobon.Core.Tests.Common_Test
}
}
}

@ -1,8 +1,8 @@
using Tiobon.Core.Helper;
using Xunit;
namespace Tiobon.Core.Tests.Common_Test
{
namespace Tiobon.Core.Tests.Common_Test;
public class HttpHelper_Should
{
@ -23,4 +23,3 @@ namespace Tiobon.Core.Tests.Common_Test
}
}
}

@ -1,10 +1,8 @@
using Tiobon.Core.Common.Helper;
using Tiobon.Core.Common.Helper.SM;
using System;
using Tiobon.Core.Common.Helper.SM;
using Xunit;
namespace Tiobon.Core.Tests.Common_Test
{
namespace Tiobon.Core.Tests.Common_Test;
public class SM4Helper_Should
{
@ -39,4 +37,3 @@ namespace Tiobon.Core.Tests.Common_Test
}
}
}

@ -5,8 +5,8 @@ using Autofac;
using Tiobon.Core.AuthHelper;
using Microsoft.Extensions.Logging;
namespace Tiobon.Core.Tests
{
namespace Tiobon.Core.Tests;
public class LoginController_Should
{
LoginController loginController;
@ -75,4 +75,3 @@ namespace Tiobon.Core.Tests
Assert.NotNull(res);
}
}
}

@ -19,8 +19,8 @@ using Tiobon.Core.IRepository.Base;
using Tiobon.Core.Repository.Base;
using Tiobon.Core.Repository.MongoRepository;
namespace Tiobon.Core.Tests
{
namespace Tiobon.Core.Tests;
public class DI_Test
{
/// <summary>
@ -140,4 +140,3 @@ namespace Tiobon.Core.Tests
return ApplicationContainer;
}
}
}

@ -1,7 +1,7 @@
using Xunit;
namespace Tiobon.Core.Tests
{
namespace Tiobon.Core.Tests;
public class Redis_Should
{
DI_Test dI_Test = new DI_Test();
@ -23,4 +23,3 @@ namespace Tiobon.Core.Tests
}
}
}

@ -1,16 +1,12 @@
using Tiobon.Core.Model.Models;
using Xunit;
using System;
using System.Linq;
using Autofac;
using Tiobon.Core.IRepository.Base;
using Tiobon.Core.Repository.MongoRepository;
using MongoDB.Bson.Serialization.Attributes;
using Autofac;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Driver;
using Tiobon.Core.Repository.MongoRepository;
using Xunit;
namespace Tiobon.Core.Tests;
namespace Tiobon.Core.Tests
{
public class MongoRepository_Base_Should
{
public class MongoTest
@ -57,4 +53,3 @@ namespace Tiobon.Core.Tests
Assert.NotNull(data);
}
}
}

@ -1,12 +1,10 @@
using Tiobon.Core.Model.Models;
using Xunit;
using System;
using System.Linq;
using Autofac;
using Autofac;
using Tiobon.Core.IRepository.Base;
using Tiobon.Core.Model.Models;
using Xunit;
namespace Tiobon.Core.Tests;
namespace Tiobon.Core.Tests
{
public class Repository_Base_Should
{
private IBaseRepository<TiobonArticle> baseRepository;
@ -78,4 +76,3 @@ namespace Tiobon.Core.Tests
Assert.True(IsDel);
}
}
}

@ -8,16 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionIt
.dockerignore = .dockerignore
.editorconfig = .editorconfig
.gitignore = .gitignore
Blog.Core.Build.bat = Blog.Core.Build.bat
Blog.Core.Publish.bat = Blog.Core.Publish.bat
Blog.Core.Publish.Docker.Jenkins.sh = Blog.Core.Publish.Docker.Jenkins.sh
Blog.Core.Publish.Docker.sh = Blog.Core.Publish.Docker.sh
Blog.Core.Publish.Linux.sh = Blog.Core.Publish.Linux.sh
codecov.yml = codecov.yml
build\common.targets = build\common.targets
CreateYourProject.bat = CreateYourProject.bat
DockerBuild.bat = DockerBuild.bat
Dockerfile = Dockerfile
nuget.config = nuget.config
README.md = README.md
EndProjectSection

@ -42792,11 +42792,6 @@
</summary>
</member>
<member name="P:Tiobon.Core.Model.ViewModels.EnumDemoDto.Type">
<summary>
Type Description balabala
</summary>
</member>
<member name="P:Tiobon.Core.Model.ViewModels.Extend.CertificateDesignerData.bgColor">
<summary>
bgColor
@ -43662,26 +43657,6 @@
用来测试 RestSharp Post 请求
</summary>
</member>
<member name="T:Tiobon.Core.Model.ViewModels.TopgbViewModels">
<summary>
留言排名展示类
</summary>
</member>
<member name="P:Tiobon.Core.Model.ViewModels.TopgbViewModels.TiobonId">
<summary>博客ID
</summary>
</member>
<member name="P:Tiobon.Core.Model.ViewModels.TopgbViewModels.counts">
<summary>
评论数量
</summary>
</member>
<member name="P:Tiobon.Core.Model.ViewModels.TopgbViewModels.btitle">
<summary>博客标题
</summary>
</member>
<member name="P:Tiobon.Core.Model.CustomFieldView.GroupName">
<summary>
分组

Loading…
Cancel
Save