随笔分类 -  C#

摘要:基本规范 (全局)Global variables: ‘_rule’ or ‘_globalRule’; (局部)Local variables: ‘rule’ or ‘globalRule’; (局部自定义)Custom variables: ‘rule’ or ‘global_rule’; (私 阅读全文
posted @ 2021-04-12 10:32 一直傲娇的鲨鱼 阅读(53) 评论(0) 推荐(0)
摘要:T4模板基于DbFirst生成实体Model 依赖项 核心依赖项:SqlSugar.dll 1 <#@ template debug="true" hostspecific="true" language="C#" #> 2 <#@ import namespace="System.Collecti 阅读全文
posted @ 2021-04-01 10:24 一直傲娇的鲨鱼 阅读(221) 评论(2) 推荐(0)
摘要:使用Supervisor进行进程守护 ##Supervisor配置sudo supervisorctl -c /usr/supervisor/supervisord.conf##进程管理##supervisorctl start programxxx,启动某个进程supervisorctl rest 阅读全文
posted @ 2020-09-07 15:50 一直傲娇的鲨鱼 阅读(287) 评论(0) 推荐(0)
摘要:创建ConfigHelper.cs 1、ConfigHelper.cs 代码如下 配置ConfigHelper引用 1、在Startup.cs 构造函数,新增如下 测试调用 ps:如下只是将Config 静态化,方便取存。有更好的方式可以留言。。 阅读全文
posted @ 2019-12-10 18:02 一直傲娇的鲨鱼 阅读(722) 评论(0) 推荐(0)
摘要:无意中发现TimeZone的相关方法已经被弃用,因此记录一下,相关的代码转换。 目前DateTime 1.获取当前时间戳: a.获取10位时间戳 1 var UninTimeStamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); b.获取13位时间戳 1 阅读全文
posted @ 2019-11-13 09:21 一直傲娇的鲨鱼 阅读(10979) 评论(1) 推荐(3)