mirror of
https://github.com/xljiulang/KestrelApp.git
synced 2026-10-24 00:35:14 +08:00
21 lines
577 B
C#
21 lines
577 B
C#
using KestrelApp.Middleware.FlowAnalyze;
|
|
|
|
namespace Microsoft.Extensions.DependencyInjection
|
|
{
|
|
/// <summary>
|
|
/// ServiceCollection扩展
|
|
/// </summary>
|
|
public static partial class ServiceCollectionExtensions
|
|
{
|
|
/// <summary>
|
|
/// 添加流量分析
|
|
/// </summary>
|
|
/// <param name="services"></param>
|
|
/// <returns></returns>
|
|
public static IServiceCollection AddFlowAnalyze(this IServiceCollection services)
|
|
{
|
|
return services.AddSingleton<IFlowAnalyzer, FlowAnalyzer>();
|
|
}
|
|
}
|
|
}
|