代码改变世界

随笔分类 -  .Net Core

如何判断JWT是否到期?解决方案

2020-09-22 15:33 by Dorisoy, 4348 阅读, 收藏,
摘要: 首先,请注意,令牌过期和吊销是两个不同的过程。 到期仅发生在Web应用程序上,而不发生在本机移动应用程序上,因为本机应用程序永不到期。 仅当(1)使用单击网站或本机Apps上的注销按钮;(2)用户重设密码;以及 (3)用户在管理面板中明确撤销其令牌。 1.如何让JWT到期 如果JWT令牌被盗,那么永 阅读全文

使用DryIocZero进行低开销依赖注入

2020-09-05 15:47 by Dorisoy, 314 阅读, 收藏,
摘要: 转载:https://ryandavis.io/adventures-in-low-overhead-dependency-injection-using-dryioczero/ Dependency Injection (DI) might be one of the more polarisin 阅读全文

How to handle Appsettings for .net core 3.1 self contained single file publish

2020-05-06 11:09 by Dorisoy, 211 阅读, 收藏,
摘要: https://stackoverflow.com/questions/59366046/how-to-handle-appsettings-for-net-core-3-1-self-contained-single-file-publish 阅读全文

Docker Install error - The specified framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found

2020-03-21 18:51 by Dorisoy, 4051 阅读, 收藏,
摘要: https://github.com/dotnet/runtime/issues/721 https://github.com/dotnet/aspnetcore/issues/19467 C:\Users\Administrator>dotnet --info.NET Core SDK(反映任何 阅读全文

EF Core 多 DbContext 迁移

2020-03-19 15:17 by Dorisoy, 289 阅读, 收藏,
摘要: public class FirstDbContext : DbContext { public FirstDbContext(DbContextOptions<FirstDbContext> options) : base(options) { } public DbSet<xx> xxxs{ g 阅读全文

Handle navigation exceptions in Prism for Xamarin

2020-01-11 22:36 by Dorisoy, 223 阅读, 收藏,
摘要: If you're using the NavigationService in Prism, for Xamarin.Forms or simply Xamarin, like this : 1 you might notice native crashes with no information 阅读全文

Filters in ASP.NET Core

2019-12-17 09:42 by Dorisoy, 478 阅读, 收藏,
摘要: Filters in ASP.NET Core allow code to be run before or after specific stages in the request processing pipeline. Built-in filters handle tasks such as 阅读全文

.net core 从 ActionFilterAttribute 获取Request.Body 的正确方式

2019-12-17 09:37 by Dorisoy, 3187 阅读, 收藏,
摘要: 由于 ModelBinding在动作过滤器之前运行,直接使用 context.ActionArguments["parameter"] 获取模型对象 This article shows how to use an ActionFilter to validate the model from a 阅读全文

Getting A Mime Type From A File Name In .NET Core

2019-12-16 13:25 by Dorisoy, 410 阅读, 收藏,
摘要: Getting a mime type based on a file name (Or file extension), is one of those weird things you never really think about until you really, really need 阅读全文

.Net 下基于Redlock redis 分布式锁实现

2019-11-21 11:35 by Dorisoy, 664 阅读, 收藏,
摘要: Redlock-cs (C#/.NET implementation). RedLock.net (C#/.NET implementation). Includes async and lock extension support. ScarletLock (C# .NET implementat 阅读全文

EF core 性能调优

2019-11-06 14:36 by Dorisoy, 577 阅读, 收藏,
摘要: Entity Framework Core performance tuning – a worked example Last Updated: February 25, 2019 | Created: September 22, 2017 This is the first in a serie 阅读全文

Entity Framework Core Query Types

2019-11-01 10:26 by Dorisoy, 286 阅读, 收藏,
摘要: This feature was added in EF Core 2.1 Query types are non-entity types (classes) that form part of the conceptual model and can be mapped to tables an 阅读全文

Using the Repository and Unit Of Work Pattern in .net core

2019-10-27 16:25 by Dorisoy, 825 阅读, 收藏,
摘要: A typical software application will invariably need to access some kind of data store in order to carry typical CRUD (Create, Read Update, Delete) ope 阅读全文

Xamarin Forms 实现发送通知点击跳转

2019-08-23 13:59 by Dorisoy, 1203 阅读, 收藏,
摘要: 1. Ensure the you have set LaunchMode.SingleTop on your MainActivity: LaunchMode.SingleTop In your MainActivity (the FormsAppCompatActivity subclass) 阅读全文

推荐一款分布式微服务框架 Surging

2019-08-23 10:03 by Dorisoy, 818 阅读, 收藏,
摘要: surging surging 是一个分布式微服务框架,提供高性能RPC远程服务调用,采用Zookeeper、Consul作为surging服务的注册中心,集成了哈希,随机,轮询,压力最小优先作为负载均衡的算法,RPC集成采用的是netty框架,采用异步传输。 名字由来 英文名:surging 中文 阅读全文

.NET API Gateway Ocelot 介绍

2019-08-23 10:01 by Dorisoy, 566 阅读, 收藏,
摘要: 项目:https://github.com/ThreeMammals/Ocelot Windows (AppVeyor) Linux & OSX (Travis) Windows MacOS Linux Ocelot Ocelot is a .NET API Gateway. This projec 阅读全文

用于C#的极速序列化/反序列工具 MessagePack

2019-08-19 08:50 by Dorisoy, 1054 阅读, 收藏,
摘要: MessagePack 比MsgPack-Cli快10倍,并且优于其他C#序列化器。MessagePack for C#还内置了对LZ4压缩的支持 - 一种极快的压缩算法。对于性能追求很重要,特别是在游戏开发,分布式计算,微服务架构和缓存等应用程序中。 开源地址:https://github.com 阅读全文

Xamarin Forms 自定义 Switch 时 Toggled 不能被触发的问题解决方案

2019-07-23 17:45 by Dorisoy, 21 阅读, 收藏,
该文被密码保护。 阅读全文

xamarin.forms 动态条件更换数据模板

2019-02-27 14:30 by Dorisoy, 546 阅读, 收藏,
摘要: 解决方案1: https://oren.codes/2014/12/31/datatemplateselector-for-xamarin-forms/ 解决方案2: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundame 阅读全文

Xamarin.Forms 开发资源集合

2018-12-30 17:12 by Dorisoy, 1796 阅读, 收藏,
摘要: 收集整理了下 Xamarin.Forms 的学习参考资料,分享给大家,稍后会不断补充: Swapnil-Patil22/EasyTable kiwaa/Xamarin.Forms.GridView https://github.com/kiwaa/Xamarin.Forms.GridVie Dine 阅读全文