随笔分类 - c#
摘要:Binding and webContentTypeMapperType RawContentTypeMapper public class RawContentTypeMapper : WebContentTypeMapper { public override WebContentFormat
阅读全文
摘要:https://stackoverflow.com/questions/70755385/2d-segment-and-infinite-line-intersection-algorithm https://stackoverflow.com/questions/70755385/2d-segme
阅读全文
摘要:c# 调试时看不到变量值 表达式求值时 对类型xxx的引用声称该类型是在 xxxx 中定义的,但未能找到 Reference to type xxx claims it is defined in xxxx but it could not be found 原因程序加载了同名dll 一个类型中存在
阅读全文
摘要:The type initializer for 'Grpc.Core.Internal.PlatformApis' threw an exception. 原因重写了程序集加载 AppDomain.CurrentDomain.AssemblyResolve += delegate (object
阅读全文
摘要:找到exe的配置文件 app.config为开发时模板 appname.exe.config为实际运行配置 在appname.exe.config中</configuration>上面增加以下节点 <system.diagnostics> <trace autoflush="true" /> <so
阅读全文
摘要:数据结构 public enum AgvUpgradeStep { VersionCheck = 0, Downloading = 1, Updating = 2, Booting = 3 } public enum AgvUpgradeResult { Success = 0, Running =
阅读全文
摘要:c# 根据proto文件自动生成代码配置 选中proto文件 右键属性 设置编译动作 protobuf编译 grpc存根根据实现角色配置 生成时报错: File not found. Import "common.proto" was not found or had errors. 修改cspro
阅读全文
摘要:<?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc
阅读全文
摘要:1 根据ip替换 var OSInfo = Environment.OSVersion; string pathpart = "hosts"; if (OSInfo.Platform == PlatformID.Win32NT) { //is windows NT pathpart = "syste
阅读全文
摘要:private int Execute(string str, bool silence = false) { int result; try { Console.WriteLine("nuget " + str); Process process = this.ExecuteCMD(str); S
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; namespace xxx.Common { static class TypeUtilities { public static List ...
阅读全文
摘要:参考: https://itnext.io/delegates-anonymous-methods-and-lambda-expressions-5ea4e56bbd05
阅读全文