在 .NET 官方的 Docker 镜像中,添加自定义工具链: FROM mcr.microsoft.com/dotnet/sdk:5.0 RUN apt-get update \ && apt-get install -y --no-install-recommends \[......]继续阅读
在 .NET 官方的 Docker 镜像中,添加自定义工具链: FROM mcr.microsoft.com/dotnet/sdk:5.0 RUN apt-get update \ && apt-get install -y --no-install-recommends \[......]继续阅读
在 .NET 官方的 Docker 镜像中,添加自定义工具链: FROM mcr.microsoft.com/dotnet/sdk:5.0 RUN apt-get update \ && apt-get install -y --no-install-recommends \[......]继续阅读
public async Task ExecuteAsync(HttpContext context) { Context = context; Request = Context.Request;[......]继续阅读
public async Task ExecuteAsync(HttpContext context) { Context = context; Request = Context.Request;[......]继续阅读
private static readonly Encoding UTF8NoBOM = new UTF8Encoding( encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true); [......] 继续阅读
private static readonly Encoding UTF8NoBOM = new UTF8Encoding( encoderShouldEmitUTF8Identifier: false, throwOnInvali[......]继续阅读
public async static Task (this IApplicationBuilder app) { app.ApplicationServices.GetRequiredService<ObjectAccessor<IApplicationBuilde[......]继续阅读
public async static Task (this IApplicationBuilder app) { app.ApplicationServices.GetRequiredService<ObjectAccessor<IApplicationBuilder[......]继续阅读
处理 Stream 的一些用法。 public static byte[] GetAllBytes(this Stream stream) { using (var memoryStream = new MemoryStream()) {[......]继续阅读
Handling some usages of Stream. public static byte[] GetAllBytes(this Stream stream) { using (var memoryStream = new MemoryStream())[......]继续阅读
1, IServiceCollection 可以被替换服务。 ServiceDescriptor 可以通过 .Scoped() 等生成要注入的自定义服务。 public static IServiceCollection AddAbpDynamicOptions<TOptions, T[......]继续阅读
IServiceCollection can replace services. ServiceDescriptor can generate custom services to be injected using methods like .Scoped(). public sta[......]继续阅读
主要特点: 1,根据当前环境加载 appsettings.xxx.json 文件,或者加载其它 .json 配置文件。 2,AddCommandLine、AddEnvironmentVariables 从程序启动命令行参数和环境变量中导入配置。命令行参数需要以键值的形式填入,如 key1=value[......] 继续阅读
主要特点: 1,根据当前环境加载 appsettings.xxx.json 文件,或者加载其它 .json 配置文件。 2,AddCommandLine、AddEnvironmentVariables 从程序启动命令行参数和环境变量中导入配置。命令行参数需要以键值的形式填入,如 key1=value[......] 继续阅读
第一种: private bool IsDefaultValue(T value) { Span<byte> valueBytes = MemoryMarshal.AsBytes<T>(new T []{ value }.AsSpan());[......]继续阅读
第一种: private bool IsDefaultValue(T value) { Span<byte> valueBytes = MemoryMarshal.AsBytes<T>(new T []{ value }.AsSpan());[......]继续阅读
<ItemGroup> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0-preview.2.22152.2" /> <Packag[......]继续阅读
<ItemGroup> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0-preview.2.22152.2"[......]继续阅读
Using interfaces has another benefit: it facilitates mocking. To evaluate whether your code is good, properly separated, or over-designed, write compr[......] 继续阅读