public async Task ExecuteAsync(HttpContext context) { Context = context; Request = Context.Request; Response = Context.Response; var buffer = new MemoryStream(); Output = new StreamWriter(buffer, UTF8NoBOM, 4096, leaveOpen:[......]继续阅读

2022年7月5日 0条评论 2079点热度 2人点赞 痴者工良 阅读全文

private static readonly Encoding UTF8NoBOM = new UTF8Encoding( encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true); [......] 继续阅读

2022年7月5日 0条评论 922点热度 0人点赞 痴者工良 阅读全文

private static readonly Encoding UTF8NoBOM = new UTF8Encoding( encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true); [......] 继续阅读

2022年7月5日 0条评论 3190点热度 0人点赞 痴者工良 阅读全文

Overall Format General format definition pipeline { // Global environment variables // environment { // IMAGENAME = 'webdemo' // Image name // } // Parameters visible on Jenkins // parameters{ // string(name: 'REPO_NAME' ,defaultValue:'',description:'R[......]…

2022年6月29日 0条评论 3216点热度 2人点赞 痴者工良 阅读全文

整体格式 大体格式定义 pipeline { // 全局环境变量 // environment { // IMAGENAME = 'webdemo' // 镜像名称 // } // Jenkins 上可以看到的参数 // parameters{ // string(name: 'REPO_NAME' ,defaultValue:'',description:'仓库名称',trim:true) // } agent { // 如何启动构建环境,Linux、Window[......]继续阅读

2022年6月29日 0条评论 3002点热度 2人点赞 痴者工良 阅读全文

public class TestNoopHostLifetime : IHostLifetime { public Task StopAsync(CancellationToken cancellationToken) { Console.WriteLine("The program has stopped"); return Task.CompletedTask; } public Task WaitForStartAsync(Cancell[......]继续阅读

2022年6月24日 0条评论 1130点热度 2人点赞 痴者工良 阅读全文

public class TestNoopHostLifetime : IHostLifetime { public Task StopAsync(CancellationToken cancellationToken) { Console.WriteLine("程序停止"); return Task.CompletedTask; } public Task WaitForStartAsync(CancellationToken cancellationToken)[......]继续阅读

2022年6月24日 0条评论 3875点热度 2人点赞 痴者工良 阅读全文

public async static Task (this IApplicationBuilder app) { app.ApplicationServices.GetRequiredService<ObjectAccessor<IApplicationBuilder>>() } { public interface IApplicationBuilder { IFeatureCollection ServerFeatures { get; } IDictionary<string,…

2022年6月24日 0条评论 1018点热度 1人点赞 痴者工良 阅读全文

public async static Task (this IApplicationBuilder app) { app.ApplicationServices.GetRequiredService<ObjectAccessor<IApplicationBuilder>>() } { public interface IApplicationBuilder { IFeatureCollection ServerFeatures { get; } IDictionary<string,…

2022年6月24日 0条评论 3145点热度 1人点赞 痴者工良 阅读全文

Handling some usages of Stream. public static byte[] GetAllBytes(this Stream stream) { using (var memoryStream = new MemoryStream()) { if (stream.CanSeek) { stream.Position = 0; } stream.CopyTo(memoryStream);[......]继续阅读

2022年6月24日 0条评论 3342点热度 0人点赞 痴者工良 阅读全文

处理 Stream 的一些用法。 public static byte[] GetAllBytes(this Stream stream) { using (var memoryStream = new MemoryStream()) { if (stream.CanSeek) { stream.Position = 0; } stream.CopyTo(memoryStream); return[......]继续阅读

2022年6月24日 0条评论 3092点热度 0人点赞 痴者工良 阅读全文

IServiceCollection can replace services. ServiceDescriptor can generate custom services to be injected using methods like .Scoped(). public static IServiceCollection AddAbpDynamicOptions<TOptions, TManager>(this IServiceCollection services) where TOption…

2022年6月24日 0条评论 3684点热度 1人点赞 痴者工良 阅读全文

1, IServiceCollection 可以被替换服务。 ServiceDescriptor 可以通过 .Scoped() 等生成要注入的自定义服务。 public static IServiceCollection AddAbpDynamicOptions<TOptions, TManager>(this IServiceCollection services) where TOptions : class where TManager : AbpDynamicOptionsManager<…

2022年6月24日 0条评论 3334点热度 1人点赞 痴者工良 阅读全文

主要特点: 1,根据当前环境加载 appsettings.xxx.json 文件,或者加载其它 .json 配置文件。 2,AddCommandLine、AddEnvironmentVariables 从程序启动命令行参数和环境变量中导入配置。命令行参数需要以键值的形式填入,如 key1=value1 --key2=value2。 public static IConfigurationRoot BuildConfiguration( AbpConfigurationBuilderOptions options =…

2022年6月24日 0条评论 1074点热度 1人点赞 痴者工良 阅读全文

主要特点: 1,根据当前环境加载 appsettings.xxx.json 文件,或者加载其它 .json 配置文件。 2,AddCommandLine、AddEnvironmentVariables 从程序启动命令行参数和环境变量中导入配置。命令行参数需要以键值的形式填入,如 key1=value1 --key2=value2。 public static IConfigurationRoot BuildConfiguration( AbpConfigurationBuilderOptions options =…

2022年6月24日 0条评论 2964点热度 1人点赞 痴者工良 阅读全文

We have all reached a somewhat awkward age: we aren't so young anymore, yet we haven't matured enough; we want to rely on ourselves, but we realize we are still a bit short; we wish to move forward, yet we find the road ahead long and winding. There are mists …

2022年6月3日 0条评论 1026点热度 3人点赞 痴者工良 阅读全文

我们都到了略显尴尬的年纪:都不那么年轻了,却也没有足够的成长;都想依靠自己,却发现还差一点儿;都想往前走,却发现前路漫漫。前有迷雾,后有压力。可即便迷茫、尴尬,时间依旧拖着你。总有些时刻你不再相信了,可在心底你还是会有所追寻。我们都跑不过时间,只能跑过昨天的自己。 没有什么能一下子拯救你,也没有什么能一下子打垮你,就像我之前说过的一样。只是时间拖着你,把你变得越来越尴尬。明明不年轻了,又不甘心彻底变成大人;明明不那么年轻了,却又没有真正地老了;明明比什么时候都想靠自己,却又发现自己靠不住;明明想往前走,却不知道劲儿…

2022年6月3日 0条评论 3670点热度 3人点赞 痴者工良 阅读全文

You want to climb to the top of the mountain; you must put in the effort. You want to get home early; you must start your journey ahead of time. You have your ambitions, which certainly come with hard work. If you think carefully, you will understand that much…

2022年6月3日 0条评论 3451点热度 0人点赞 痴者工良 阅读全文

你想爬到山顶,必定得付出努力;你想早点儿回家,必定要提早赶路。你有你的野心,必定伴随着辛苦。仔细想想就会明白,很多苦从你一开始做选择、做决定时就注定了会存在。所以,既然决定是你自己做的,就要承担后果。任何得到都有代价,任何野心的实现都需要点滴的积累。你想看到更多,就得爬到高处。 前阵子读了一个渔夫和富翁的故事。大意是富翁决定放弃自己的财产回到渔村生活,有一天,从小就生活在渔村的渔夫看到富翁,笑他出去那么久,那么辛苦又能怎么样,最后不还是和他一样在海边捕鱼。富翁笑着说:“你是一辈子只能在这里,而我是选择回到这里。” …

2022年6月3日 0条评论 3635点热度 0人点赞 痴者工良 阅读全文

那时我常想,那些光芒万丈的人出现在我们的生命里,然后消失,有什么意义?后来我明白,喜欢一个光芒万丈的人一点儿都不可怕,不管遥不遥远。遇到能让你付出的事物或者人,是一种运气。能遇到,就该珍惜。在等待的同时,把那些想留下的品质都留下,把自己变成值得等待的人,就不会辜负这段相遇。 I used to think about the meaning of those brilliant people appearing in our lives and then disappearing. Later, I underst…

2022年6月3日 0条评论 1138点热度 0人点赞 痴者工良 阅读全文
1161718192054