<?xml version="1.0" encoding="utf-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>码栈工坊_源代码分享,技术文章,精品素材,网站模板,网站源码,建站源码,模板下载</title><link>https://www.codepub.top/</link><description>代码分享的平台_开源项目_网站模板_网站源码资源下载</description><item><title>Codex保姆级教程（下载+安装+登录+使用，含所有版本，2026最新）</title><link>https://www.codepub.top/post/747.html</link><description>&lt;div class=&quot;article-desc&quot; data-ai-assistant-text-selection-tooltip=&quot;enabled&quot;&gt;&lt;strong data-spm-anchor-id=&quot;a2c6h.12873639.article-detail.i2.53c134a6IXnlaA&quot; data-ai-assistant-role=&quot;selection&quot;&gt;简介：&lt;/strong&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Codex是OpenAI推出的开源AI编程智能体，本地运行，可理解整个代码库，支持自然语言指令改代码、执行命令、跑测试、修Bug，兼容Win/macOS/Linux。（239字）
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div class=&quot;article-content&quot;&gt;&lt;div class=&quot;article-inner&quot; id=&quot;lark-content&quot; data-ai-assistant-text-selection-tooltip=&quot;enabled&quot;&gt;&lt;div class=&quot;yuque-sdk-doc-viewer&quot; style=&quot;width: 100%;&quot;&gt;&lt;div class=&quot;yuque-servicify-container yuquesdk&quot; data-yuque=&quot;sdk&quot;&gt;&lt;div class=&quot;yuque-servicify-wrap &quot;&gt;&lt;div class=&quot;yuque-servicify-content&quot;&gt;&lt;div class=&quot;lake-engine-view lake-typography-traditional&quot; tabindex=&quot;0&quot;&gt;&lt;p data-lake-id=&quot;a20d224c568e48b9d67847a2c66a8c01_p_0&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;Codex 是 OpenAI 推出的 AI 编程智能体，程序跑在本地终端里，能读当前项目的代码、按自然语言指令改文件、执行命令、跑测试、修 bug。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;966c3ef3e048a791a7cf25d52c45ad11&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;acd4a11f00f6f1ceec886125c5887a7a&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;Codex 能理解整个代码仓库，不只是当前打开的文件。给它一句“把这个项目的登录改成用环境变量读取密钥”，它会自己找相关文件、改代码、跑一遍构建，把结果和改动列出来。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;378bd585f5a2c5e6555b1b25b9b3bfc6&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;fef40e4a0caa7f1a6bac60a0ca95570c&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;Codex 开源免费，支持 Windows 10/11、macOS 和 Linux 三个平台。&lt;/span&gt;&lt;/p&gt;&lt;h2 data-lake-id=&quot;11575f19f39adfd9103c26fe051039ed&quot; id=&quot;slide-0&quot;&gt;Codex下载&lt;/h2&gt;&lt;p data-lake-id=&quot;c7de65d7fc6072d36c11dc8a21814b78&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;Codex安装包：&lt;/span&gt;&lt;a href=&quot;https://xiecoding.cn/drive.php?spm=a2c6h.12873639.article-detail.4.53c134a6IXnlaA&amp;id=289&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; data-spm-anchor-id=&quot;a2c6h.12873639.article-detail.4&quot;&gt;Codex安装包（Windows、macOS、Linux 三个平台都有）&lt;/a&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;e354098e3e6a91d1d26f70cf8ff344cf&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;div data-card-type=&quot;block&quot; data-lake-card=&quot;table&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22html%22%3A%22%3Ctable%20class%3D%5C%22lake-table%5C%22%3E%3Ccolgroup%3E%3Ccol%3E%3Ccol%3E%3Ccol%3E%3C%2Fcolgroup%3E%3Ctbody%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%20style%3D%5C%22background-color%3A%20%23EDEDED%3B%20color%3A%20%23444444%3B%5C%22%3E%E6%96%87%E4%BB%B6%3C%2Ftd%3E%3Ctd%20style%3D%5C%22background-color%3A%20%23EDEDED%3B%20color%3A%20%23444444%3B%5C%22%3E%E5%B9%B3%E5%8F%B0%3C%2Ftd%3E%3Ctd%20style%3D%5C%22background-color%3A%20%23EDEDED%3B%20color%3A%20%23444444%3B%5C%22%3E%E6%80%8E%E4%B9%88%E7%94%A8%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%3ECodex_26.1023.6621.0_x64%E3%80%90%E5%85%8D%E5%AE%89%E8%A3%85%E7%89%88%E3%80%91%E3%80%90%E9%80%82%E5%90%88%E5%A4%A7%E5%A4%9A%E6%95%B0%E7%94%B5%E8%84%91%E3%80%91.zip%3C%2Ftd%3E%3Ctd%3EWindows%20x64%20%E6%A1%8C%E9%9D%A2%E7%89%88%3C%2Ftd%3E%3Ctd%3E%E8%A7%A3%E5%8E%8B%E5%B0%B1%E8%83%BD%E8%BF%90%E8%A1%8C%EF%BC%8C%E5%A4%A7%E5%A4%9A%E6%95%B0%E4%BA%BA%E8%A3%85%E8%BF%99%E4%B8%AA%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%3ECodex_26.1023.6621.0_x64%E3%80%90%E9%80%82%E5%90%88%E5%A4%A7%E5%A4%9A%E6%95%B0%E7%94%B5%E8%84%91%E3%80%91.Msix%3C%2Ftd%3E%3Ctd%3EWindows%20x64%20%E6%A1%8C%E9%9D%A2%E7%89%88%3C%2Ftd%3E%3Ctd%3E%E5%8F%8C%E5%87%BB%E5%AE%89%E8%A3%85%EF%BC%8C%E8%BF%9B%E7%B3%BB%E7%BB%9F%E5%BA%94%E7%94%A8%E5%88%97%E8%A1%A8%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%3ECodex_26.1023.6621.0_arm64%E3%80%90%E5%85%8D%E5%AE%89%E8%A3%85%E7%89%88%E3%80%91%E3%80%90%E4%BB%85%E9%80%82%E5%90%88ARM%E6%9E%B6%E6%9E%84%E7%94%B5%E8%84%91%E3%80%91.zip%3C%2Ftd%3E%3Ctd%3EWindows%20arm64%20%E6%A1%8C%E9%9D%A2%E7%89%88%3C%2Ftd%3E%3Ctd%3E%E8%A7%A3%E5%8E%8B%E8%BF%90%E8%A1%8C%EF%BC%8CARM%20%E7%AC%94%E8%AE%B0%E6%9C%AC%E7%94%A8%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%3ECodex_26.1023.6621.0_arm64%E3%80%90%E4%BB%85%E9%80%82%E5%90%88ARM%E6%9E%B6%E6%9E%84%E7%94%B5%E8%84%91%E3%80%91.Msix%3C%2Ftd%3E%3Ctd%3EWindows%20arm64%20%E6%A1%8C%E9%9D%A2%E7%89%88%3C%2Ftd%3E%3Ctd%3E%E5%8F%8C%E5%87%BB%E5%AE%89%E8%A3%85%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%3Ecodex-x86_64-pc-windows-msvc.exe%3C%2Ftd%3E%3Ctd%3EWindows%20x64%20%E5%91%BD%E4%BB%A4%E8%A1%8C%E7%89%88%3C%2Ftd%3E%3Ctd%3E%E6%94%BE%E8%BF%9B%E5%9B%BA%E5%AE%9A%E7%9B%AE%E5%BD%95%E5%8A%A0%20PATH%EF%BC%8C%E7%BB%88%E7%AB%AF%E9%87%8C%E8%BF%90%E8%A1%8C%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%3Ecodex-x86_64-pc-windows-msvc.exe.zip%3C%2Ftd%3E%3Ctd%3EWindows%20x64%20%E5%91%BD%E4%BB%A4%E8%A1%8C%E7%89%88%3C%2Ftd%3E%3Ctd%3E%E8%A7%A3%E5%8E%8B%E5%BE%97%E5%88%B0%E4%B8%8A%E9%9D%A2%E7%9A%84%20exe%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%3Ecodex-aarch64-pc-windows-msvc.exe%3C%2Ftd%3E%3Ctd%3EWindows%20arm64%20%E5%91%BD%E4%BB%A4%E8%A1%8C%E7%89%88%3C%2Ftd%3E%3Ctd%3EARM%20%E7%94%B5%E8%84%91%E7%9A%84%E7%BB%88%E7%AB%AF%E9%87%8C%E7%94%A8%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%3ECodex-mac-x64.dmg%3C%2Ftd%3E%3Ctd%3EmacOS%20Intel%20%E6%A1%8C%E9%9D%A2%E7%89%88%3C%2Ftd%3E%3Ctd%3E%E6%8C%82%E8%BD%BD%E5%90%8E%E6%8B%96%E8%BF%9B%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E6%96%87%E4%BB%B6%E5%A4%B9%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%3ECodex-mac-arm64.dmg%3C%2Ftd%3E%3Ctd%3EmacOS%20Apple%20%E8%8A%AF%E7%89%87%E6%A1%8C%E9%9D%A2%E7%89%88%3C%2Ftd%3E%3Ctd%3E%E5%90%8C%E4%B8%8A%EF%BC%8CM%20%E7%B3%BB%E5%88%97%E8%8A%AF%E7%89%87%E7%94%A8%E8%BF%99%E4%B8%AA%3C%2Ftd%3E%3C%2Ftr%3E%3Ctr%20style%3D%5C%22height%3A%2033px%3B%5C%22%3E%3Ctd%3ECodex-linux-arm64-26.506.21252.zip%3C%2Ftd%3E%3Ctd%3ELinux%20arm64%20%E6%A1%8C%E9%9D%A2%E7%89%88%3C%2Ftd%3E%3Ctd%3E%E8%A7%A3%E5%8E%8B%E8%BF%90%E8%A1%8C%EF%BC%8C%E7%89%88%E6%9C%AC%E6%AF%94%20Windows%20%E7%89%88%E6%97%A7%3C%2Ftd%3E%3C%2Ftr%3E%3C%2Ftbody%3E%3C%2Ftable%3E%22%2C%22rows%22%3A11%2C%22cols%22%3A3%2C%22id%22%3A%22mBFYx%22%7D&quot; id=&quot;mBFYx&quot;&gt;&lt;div data-card-element=&quot;body&quot;&gt;&lt;div data-card-element=&quot;center&quot;&gt;&lt;div class=&quot;lake-table-reader&quot;&gt;&lt;table class=&quot;lake-table&quot;&gt;&lt;colgroup&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr style=&quot;height: 33px;&quot; class=&quot;firstRow&quot;&gt;&lt;td style=&quot;background-color: rgb(237, 237, 237); color: rgb(68, 68, 68);&quot;&gt;文件&lt;/td&gt;&lt;td style=&quot;background-color: rgb(237, 237, 237); color: rgb(68, 68, 68);&quot;&gt;平台&lt;/td&gt;&lt;td style=&quot;background-color: rgb(237, 237, 237); color: rgb(68, 68, 68);&quot;&gt;怎么用&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33px;&quot;&gt;&lt;td&gt;Codex_26.1023.6621.0_x64【免安装版】【适合大多数电脑】.zip&lt;/td&gt;&lt;td&gt;Windows x64 桌面版&lt;/td&gt;&lt;td&gt;解压就能运行，大多数人装这个&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33px;&quot;&gt;&lt;td&gt;Codex_26.1023.6621.0_x64【适合大多数电脑】.Msix&lt;/td&gt;&lt;td&gt;Windows x64 桌面版&lt;/td&gt;&lt;td&gt;双击安装，进系统应用列表&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33px;&quot;&gt;&lt;td&gt;Codex_26.1023.6621.0_arm64【免安装版】【仅适合ARM架构电脑】.zip&lt;/td&gt;&lt;td&gt;Windows arm64 桌面版&lt;/td&gt;&lt;td&gt;解压运行，ARM 笔记本用&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33px;&quot;&gt;&lt;td&gt;Codex_26.1023.6621.0_arm64【仅适合ARM架构电脑】.Msix&lt;/td&gt;&lt;td&gt;Windows arm64 桌面版&lt;/td&gt;&lt;td&gt;双击安装&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33px;&quot;&gt;&lt;td&gt;codex-x86_64-pc-windows-msvc.exe&lt;/td&gt;&lt;td&gt;Windows x64 命令行版&lt;/td&gt;&lt;td&gt;放进固定目录加 PATH，终端里运行&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33px;&quot;&gt;&lt;td&gt;codex-x86_64-pc-windows-msvc.exe.zip&lt;/td&gt;&lt;td&gt;Windows x64 命令行版&lt;/td&gt;&lt;td&gt;解压得到上面的 exe&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33px;&quot;&gt;&lt;td&gt;codex-aarch64-pc-windows-msvc.exe&lt;/td&gt;&lt;td&gt;Windows arm64 命令行版&lt;/td&gt;&lt;td&gt;ARM 电脑的终端里用&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33px;&quot;&gt;&lt;td&gt;Codex-mac-x64.dmg&lt;/td&gt;&lt;td&gt;macOS Intel 桌面版&lt;/td&gt;&lt;td&gt;挂载后拖进应用程序文件夹&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33px;&quot;&gt;&lt;td&gt;Codex-mac-arm64.dmg&lt;/td&gt;&lt;td&gt;macOS Apple 芯片桌面版&lt;/td&gt;&lt;td&gt;同上，M 系列芯片用这个&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;height: 33px;&quot;&gt;&lt;td&gt;Codex-linux-arm64-26.506.21252.zip&lt;/td&gt;&lt;td&gt;Linux arm64 桌面版&lt;/td&gt;&lt;td&gt;解压运行，版本比 Windows 版旧&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 data-lake-id=&quot;455443a7a8c9c0394e431b86657ce441&quot; id=&quot;slide-1&quot;&gt;Codex安装&lt;/h2&gt;&lt;h4 data-lake-id=&quot;7cd2ec22dc308a84bfb6c68afc3d45f3&quot; id=&quot;slide-2&quot;&gt;1）桌面版安装&lt;/h4&gt;&lt;p data-lake-id=&quot;67e9b6df809a5990123c9738bbe3e2f1&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;Mac 用户双击 dmg 安装包，把 Codex 图标拖进&amp;quot;应用程序&amp;quot;文件夹，再从启动台打开。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;f17bfbebbfe7a7c86055b8065168b01d&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;3b8f8e9440d551fd9559f6db543a324c&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;Windows 用户解压 zip 免安装版（OpenAI.Codex_x64免安装版.zip），在解压后的文件夹里找到下图的文件，以管理员身份运行它：&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;569ec4d86f1dda64682de0ddb89f587d&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;29bf3f6bfc52f8d1574170c199d9372e&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_1c142e9cbb494657bff89a4fe1548a86.jpeg%22%2C%22originWidth%22%3A449%2C%22originHeight%22%3A50%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A449%2C%22height%22%3A50%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;b68b6b727c878de690ea008a0dcf4adc&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;5859bae1b78a635c1e873d145f912327&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;Codex 就启动了：&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;5394d2bbefad0569a3d15e690aa04e51&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;92060e68a89a2df3a234007deb013397&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_af8b4a4831864ef59a15f8d7007256a8.jpeg%22%2C%22originWidth%22%3A731%2C%22originHeight%22%3A600%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A731%2C%22height%22%3A600%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;58f4605b4b71d69ceae92990eb51445e&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;10379776238b0910af0fb9dc7839e6f5&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;建议选择免安装版，选择 Msix 安装包的，双击启动它：&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;b3129b8de9a8821c321019bf9eb60871&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;78db3715e4cabc42adc9d49f05b45fab&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_ebf5b864c3f147a991ffa9e1caebd6b6.jpeg%22%2C%22originWidth%22%3A500%2C%22originHeight%22%3A361%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A500%2C%22height%22%3A361%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;5254d9424a7f17f4f9c4c86c74165092&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;7540d96190eb229bfc8015ac896dd198&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;顺序的话，安装程序会自动运行，等待安装完成即可，不需要手动点很多&amp;quot;下一步&amp;quot;。安装完成后在开始菜单搜索 Codex 就能打开。&lt;/span&gt;&lt;/p&gt;&lt;h4 data-lake-id=&quot;453bcb6fd443caccd559fdf818c0e166&quot; id=&quot;slide-3&quot;&gt;2）IDE 插件安装&lt;/h4&gt;&lt;p data-lake-id=&quot;0af571f365c2cccae0dafe702ec238b7&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;在 VS Code 或 &lt;/span&gt;Cursor&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt; 的插件市场搜索&amp;quot;Codex&amp;quot;，找到 OpenAI 官方发布的插件，点击安装即可。安装后在 IDE 右侧会多出一个 Codex 面板，登录账号就能直接使用了。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;716c882c12da8bb59ff3254936a6e665&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;3aa4d4ece3c0e132d87feccb24e4023c&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_10b2d7f5c4bc4272aaca08e59861f976.jpeg%22%2C%22originWidth%22%3A500%2C%22originHeight%22%3A314%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A500%2C%22height%22%3A314%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;、&lt;/p&gt;&lt;h4 data-lake-id=&quot;b7600cfd768985a3d8efc1e8b1c96b6f&quot; id=&quot;slide-4&quot;&gt;3）CLI 命令行安装（给开发者）&lt;/h4&gt;&lt;p data-lake-id=&quot;d6bd336f72d6f0f4f38634280a3867a6&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;CLI 版适合习惯在终端里操作的开发者，不需要图形界面，轻量快速，下面介绍三种安装方式。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;ff6295b311290c58d7f7bf8524f1b6bc&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;b5d3823817b5caa0f695446b6f715d99&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;① 直接双击 codex-x86_64-pc-windows-msvc.exe，启动它：&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;a5b16ee7d1e35b8c285f067dd151dd53&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;a150987e468df2d9ed9075f42d5b61fc&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_6dfc7ef25e864ae996a663c3255336c3.jpeg%22%2C%22originWidth%22%3A450%2C%22originHeight%22%3A250%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A450%2C%22height%22%3A250%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;a353131339d20b0001f8b8b8ccad9ce8&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;1fcd4fccc3cced38d4ab11ad4316fdf6&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;首次运行需要登录 OpenAI 账号，CLI 会在终端里给你一个链接，在浏览器里登录授权就行。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;bd9ba3f79004070819ccb97fbc1d9865&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;2c789ca3aea55e73ae5d7d59621ee9ca&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;② 通过 npm 安装。如果你的电脑上已经安装了 Node.js。打开终端（Windows 用户打开命令提示符或 PowerShell，Mac/Linux 用户打开终端），执行以下命令：&lt;/span&gt;&lt;/p&gt;&lt;div data-card-type=&quot;block&quot; data-lake-card=&quot;codeblock&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22mode%22%3A%22bash%22%2C%22code%22%3A%22npm%20install%20-g%20%40openai%2Fcodex%22%2C%22heightLimit%22%3Atrue%2C%22margin%22%3Atrue%2C%22id%22%3A%22klb1A%22%7D&quot; id=&quot;klb1A&quot; class=&quot;lake-card-margin&quot;&gt;&lt;div data-card-element=&quot;body&quot; class=&quot;overflow-visible&quot;&gt;&lt;div data-card-element=&quot;center&quot;&gt;&lt;div class=&quot;lake-codeblock lake-codeblock-bash height-limit&quot;&gt;&lt;div class=&quot;lake-codeblock-content&quot;&gt;&lt;div class=&quot;CodeMirror CodeMirror-sizer&quot;&gt;&lt;pre class=&quot;cm-s-default&quot; data-ai-assistant-role=&quot;code&quot;&gt;npm&amp;nbsp;install&amp;nbsp;-g&amp;nbsp;@openai/codex&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-tools&quot;&gt;&lt;div class=&quot;copy-code&quot;&gt;&lt;span class=&quot;copy-icon&quot;&gt;&lt;/span&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div class=&quot;ai-code&quot;&gt;&lt;div class=&quot;ai-img&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p data-lake-id=&quot;c5e29abf09d3ab184f6f44d6a3878422&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;-g 表示全局安装，装好后你在任意目录打开终端输入 codex 都能直接运行。如果安装过程中提示权限错误（Mac/Linux 常见），在前面加 sudo：&lt;/span&gt;&lt;/p&gt;&lt;div data-card-type=&quot;block&quot; data-lake-card=&quot;codeblock&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22mode%22%3A%22bash%22%2C%22code%22%3A%22sudo%20npm%20install%20-g%20%40openai%2Fcodex%22%2C%22heightLimit%22%3Atrue%2C%22margin%22%3Atrue%2C%22id%22%3A%22KAEY0%22%7D&quot; id=&quot;KAEY0&quot; class=&quot;lake-card-margin&quot;&gt;&lt;div data-card-element=&quot;body&quot; class=&quot;overflow-visible&quot;&gt;&lt;div data-card-element=&quot;center&quot;&gt;&lt;div class=&quot;lake-codeblock lake-codeblock-bash height-limit&quot;&gt;&lt;div class=&quot;lake-codeblock-content&quot;&gt;&lt;div class=&quot;CodeMirror CodeMirror-sizer&quot;&gt;&lt;pre class=&quot;cm-s-default&quot; data-ai-assistant-role=&quot;code&quot;&gt;sudo&amp;nbsp;npm&amp;nbsp;install&amp;nbsp;-g&amp;nbsp;@openai/codex&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-tools&quot;&gt;&lt;div class=&quot;copy-code&quot;&gt;&lt;span class=&quot;copy-icon&quot;&gt;&lt;/span&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div class=&quot;ai-code&quot;&gt;&lt;div class=&quot;ai-img&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p data-lake-id=&quot;73e56f2a69a9c39035396f187b79c337&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;国内用户下载 npm 包可能会比较慢，建议加上淘宝镜像源加速：&lt;/span&gt;&lt;/p&gt;&lt;div data-card-type=&quot;block&quot; data-lake-card=&quot;codeblock&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22mode%22%3A%22bash%22%2C%22code%22%3A%22npm%20install%20-g%20%40openai%2Fcodex%20--registry%3Dhttps%3A%2F%2Fregistry.npmmirror.com%22%2C%22heightLimit%22%3Atrue%2C%22margin%22%3Atrue%2C%22id%22%3A%22TlhF6%22%7D&quot; id=&quot;TlhF6&quot; class=&quot;lake-card-margin&quot;&gt;&lt;div data-card-element=&quot;body&quot; class=&quot;overflow-visible&quot;&gt;&lt;div data-card-element=&quot;center&quot;&gt;&lt;div class=&quot;lake-codeblock lake-codeblock-bash height-limit&quot;&gt;&lt;div class=&quot;lake-codeblock-content&quot;&gt;&lt;div class=&quot;CodeMirror CodeMirror-sizer&quot;&gt;&lt;pre class=&quot;cm-s-default&quot; data-ai-assistant-role=&quot;code&quot;&gt;npm&amp;nbsp;install&amp;nbsp;-g&amp;nbsp;@openai/codex&amp;nbsp;--registry=https://registry.npmmirror.com&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-tools&quot;&gt;&lt;div class=&quot;copy-code&quot;&gt;&lt;span class=&quot;copy-icon&quot;&gt;&lt;/span&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div class=&quot;ai-code&quot;&gt;&lt;div class=&quot;ai-img&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p data-lake-id=&quot;80c90263ced464f76c176132d43bd25f&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;安装完成后验证一下是否成功，执行 &lt;/span&gt;&lt;code&gt;codex --version&lt;/code&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;，如果显示版本号就说明装好了。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;adc09d26a57a54a87d57f22e797dd7c8&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;d2365deae7dd518a05d75b57819a4bb6&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;③ 通过 Homebrew 安装（仅限 macOS）。如果你用的是 Mac 而且装了 Homebrew，一行命令就能搞定：&lt;/span&gt;&lt;/p&gt;&lt;div data-card-type=&quot;block&quot; data-lake-card=&quot;codeblock&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22mode%22%3A%22bash%22%2C%22code%22%3A%22brew%20install%20--cask%20codex%22%2C%22heightLimit%22%3Atrue%2C%22margin%22%3Atrue%2C%22id%22%3A%22eC5Vg%22%7D&quot; id=&quot;eC5Vg&quot; class=&quot;lake-card-margin&quot;&gt;&lt;div data-card-element=&quot;body&quot; class=&quot;overflow-visible&quot;&gt;&lt;div data-card-element=&quot;center&quot;&gt;&lt;div class=&quot;lake-codeblock lake-codeblock-bash height-limit&quot;&gt;&lt;div class=&quot;lake-codeblock-content&quot;&gt;&lt;div class=&quot;CodeMirror CodeMirror-sizer&quot;&gt;&lt;pre class=&quot;cm-s-default&quot; data-ai-assistant-role=&quot;code&quot;&gt;brew&amp;nbsp;install&amp;nbsp;--cask&amp;nbsp;codex&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code-tools&quot;&gt;&lt;div class=&quot;copy-code&quot;&gt;&lt;span class=&quot;copy-icon&quot;&gt;&lt;/span&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div class=&quot;ai-code&quot;&gt;&lt;div class=&quot;ai-img&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p data-lake-id=&quot;b1eb84717f58dfcd4e61cb7185c472af&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;Homebrew 会自动下载 Codex 并安装到系统路径，装好后在终端输入 codex 即可启动。&lt;/span&gt;&lt;/p&gt;&lt;h2 data-lake-id=&quot;31b75099ce3a3d87d8931fdee660f40d&quot; id=&quot;slide-5&quot;&gt;Codex登录（2种方式）&lt;/h2&gt;&lt;p data-lake-id=&quot;e64e5f4141cf8a2fd3514034989fa794&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;三种形态的 Codex 首次启动都需要登录才能使用。如果只是轻度体验，用 OpenAI 账号即可，也可以用 GitHub 或 Google 账号登录。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;761552a983402f5dc2605b4d9803d107&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;db455bfd56389cb0d5351c24fd4c5709&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;Codex 还支持通过 API Key 来认证（申请通道：platform.openai.com/api-keys）：&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;a9fbf0707eee3a59c60f2987f681b8a0&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;c506c3a20922b2984a5213c50f260a74&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_fdcd8363cb8c4f149156f5c369f8aed7.jpeg%22%2C%22originWidth%22%3A600%2C%22originHeight%22%3A480%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A600%2C%22height%22%3A480%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;8da864061abeefa22660c16b21723e90&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;e3fdbf717d1555ff424d61cffecd4495&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;在登录界面选择其他登录方式，输入 Key 后点击 Continue 就可以正常使用了，按实际用量计费：&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;891913fd9c8d5773c8cf19658d880a49&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;2006f974adb78f77d9916e02c6931ff9&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_4a2775465bb74234a2cb4d05eaee0158.jpeg%22%2C%22originWidth%22%3A600%2C%22originHeight%22%3A492%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A600%2C%22height%22%3A492%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 data-lake-id=&quot;b60bee0fbfe60c20786de5e9dca321fb&quot; id=&quot;slide-6&quot;&gt;Codex汉化&lt;/h2&gt;&lt;p data-lake-id=&quot;58dcc6085d6bc7e905c7dbfffcc19bca&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;Codex 主界面默认是英文的，可以手动改成中文（实测只能部分汉化）：&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;2c65ac4d71dba7bd3fc9b159771b4526&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;1）左下角点击 Settings，进入 Settings 设置页面 ：&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;ed65d285fc64e6d580c80648ae8346f7&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_784683f8f87f49b2b840b0cc027d930e.jpeg%22%2C%22originWidth%22%3A600%2C%22originHeight%22%3A444%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A600%2C%22height%22%3A444%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;fdf5fd16e470018278622c47a1f2386d&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;16c2d4a8664de2583e5e4b0f96fbb453&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;2）按照下图所示将 Language 改成简体中文：&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;0b6b67c1de97fd61c57f804f20d77413&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_038acdf199734570807f5e7a89c9252e.jpeg%22%2C%22originWidth%22%3A500%2C%22originHeight%22%3A444%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A500%2C%22height%22%3A444%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 data-lake-id=&quot;ec18e619b3b1f9229fc41468d1205bf0&quot; id=&quot;slide-7&quot;&gt;Codex基础使用&lt;/h2&gt;&lt;h4 data-lake-id=&quot;306656c9eb8b10300ccd08a149d15bc1&quot; id=&quot;slide-8&quot;&gt;1）桌面版使用&lt;/h4&gt;&lt;p data-lake-id=&quot;9e4b5fdba7b1003ecd8e65fa499101a3&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;打开 Codex 桌面应用后，左侧是对话列表，中间是对话区域。点击界面上的&amp;quot;Choose project&amp;quot;，选择你的项目目录，Codex 就能读取项目结构和文件内容。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;370939ab80f33e6c8bb8c1a035b56aba&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;af1ff6125cb4e1a056e36d777eb250df&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_ce4daba73c5344d895e057b371d166ee.jpeg%22%2C%22originWidth%22%3A600%2C%22originHeight%22%3A426%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A600%2C%22height%22%3A426%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;8d6c0df43545bfa9604c9ae6e198a80d&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;ab1c88cc7c630f4bd0714ee588ffd0e8&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;之后你可以直接问它&amp;quot;这个项目是做什么的&amp;quot;、&amp;quot;帮我找到入口文件&amp;quot;、&amp;quot;这个报错是什么意思&amp;quot;，它会结合项目上下文回答你。需要修改代码时，它可以直接生成修改方案并应用到你的项目文件中。&lt;/span&gt;&lt;/p&gt;&lt;h4 data-lake-id=&quot;95ee5995d4753fe10c85f12896339d0e&quot; id=&quot;slide-9&quot;&gt;2）CLI 使用&lt;/h4&gt;&lt;p data-lake-id=&quot;bbf4914cef2f9d68447bb61cc501450b&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;进入你的项目目录，执行 codex 命令启动 CLI 模式。它会进入交互式对话界面，你可以像聊天一样描述需求。比如输入&amp;quot;帮我分析这个项目的结构&amp;quot;，Codex 会读取项目文件并给出分析；输入&amp;quot;这个函数有个 bug，帮我修复一下&amp;quot;，它会定位问题并给出修改。&lt;/span&gt;&lt;/p&gt;&lt;h4 data-lake-id=&quot;0de0078901296cc6f0a4bdcdd0ef5022&quot; id=&quot;slide-10&quot;&gt;3）IDE 插件使用&lt;/h4&gt;&lt;p data-lake-id=&quot;b408e8725ed83a469f8953843b1929d9&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;在 VS Code 的右上角找到 Codex 面板，或者在编辑器中选中代码后右键选择&amp;quot;Codex：解释这段代码&amp;quot;或&amp;quot;Codex：优化这段代码&amp;quot;。插件适合在写代码的过程中快速获得帮助，不用切换到其他窗口。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;8cb0a2544407639ca9650d62fc13b29d&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;e5267d398447e5ab16b24ba9a0528f87&quot; style=&quot;text-align: center;&quot;&gt;&lt;span data-card-type=&quot;inline&quot; data-lake-card=&quot;image&quot; contenteditable=&quot;false&quot; data-card-value=&quot;data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Fusiy5oatinu3g_dea1ea2f0ecf4b9988e13af6a9e06678.jpeg%22%2C%22originWidth%22%3A500%2C%22originHeight%22%3A313%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A500%2C%22height%22%3A313%7D&quot;&gt;&lt;span data-card-element=&quot;body&quot;&gt;&lt;span data-card-element=&quot;center&quot;&gt;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
 &amp;nbsp; &amp;nbsp;
 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 data-lake-id=&quot;d503f83cb425bfff9122cf14295bb061&quot; id=&quot;slide-11&quot;&gt;Codex新手常见问题&lt;/h2&gt;&lt;p data-lake-id=&quot;0e474e28f6333c355debd8ac265d52ec&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;1）桌面版、CLI、插件三种形态的核心 AI 能力是一样的，区别只在操作方式上。新手建议从桌面版开始，可视化界面更友好，能清楚看到 Codex 每一步做了什么修改。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;d4503e5fadd05405d8e3cb955f7133c9&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;0172c0373ba530d2778f7d5ef2c5bf77&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;2）首次启动需要登录账号才能使用。除了账号登录，Codex 也支持通过 API Key 认证，在登录界面选择其他登录方式，输入 Key 后直接使用。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;336969b0d9d92aa5917247d7662083df&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;9403a5b25efde0dbe21d79a108a1d1f4&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot;&gt;3）Codex 会真的改文件，用之前把项目提交到 Git。&lt;/span&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;c30c252e175ccef84f8de143dfdf68bb&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;p data-lake-id=&quot;1fe60d238a757eb7e99f02753c94ad5f&quot;&gt;&lt;span class=&quot;lake-fontsize-12&quot; style=&quot;color: #444444;&quot; data-spm-anchor-id=&quot;a2c6h.12873639.article-detail.i3.53c134a6IXnlaA&quot;&gt;4）Codex 第一次启动要加载配置、探测 Git 仓库、启动本地服务，可能慢一些，之后再打开会快很多。&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 25 Nov 2026 13:29:09 +0800</pubDate></item><item><title>PHP Agents 一个工具优先的多模型 Agent 框架</title><link>https://www.codepub.top/post/745.html</link><description>&lt;p style=&quot;margin:0 0 16px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__3&quot;&gt;&lt;span class=&quot;js_darkmode__text__4&quot;&gt;今天给大伙儿推荐一个开源项目 ——&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;color:#5C3C2A;&quot; class=&quot;js_darkmode__text__5&quot;&gt;&lt;span class=&quot;js_darkmode__text__6&quot;&gt;&lt;span class=&quot;&quot;&gt;PHP Agents&lt;/span&gt; 一个工具优先的多模型 Agent 框架&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;js_darkmode__text__7&quot;&gt;。工具使用 + 供应商抽象的 Agent 框架，多模型支持 想深入了解的同学，建议收藏这篇。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0 0 16px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__8&quot;&gt;&lt;span class=&quot;js_darkmode__text__9&quot;&gt;项目地址：&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color:#5C3C2A;font-weight:600;&quot; class=&quot;js_darkmode__text__10&quot;&gt;&lt;span class=&quot;js_darkmode__text__11&quot;&gt;https://github.com/carmelosantana/php-agents&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin-top:16px;margin-bottom:32px;padding:0;&quot; class=&quot;js_darkmode__text__12&quot;&gt;&lt;section style=&quot;display:flex;align-items:center;gap:16px;margin-bottom:24px;&quot; class=&quot;js_darkmode__text__13&quot;&gt;&lt;section style=&quot;text-align:center;flex-shrink:0;&quot; class=&quot;js_darkmode__text__14&quot;&gt;&lt;p style=&quot;margin:0;font-size:28px;font-weight:900;color:#5C3C2A;line-height:1;letter-spacing:-2px;&quot; class=&quot;js_darkmode__text__15&quot;&gt;&lt;span class=&quot;js_darkmode__text__16&quot;&gt;01&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:8px;font-weight:700;color:#D8C9B0;letter-spacing:2px;&quot; class=&quot;js_darkmode__2 js_darkmode__text__17&quot;&gt;&lt;span class=&quot;js_darkmode__text__18&quot;&gt;PART&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;span style=&quot;width:1px;height:36px;background:#E5DDCA;flex-shrink:0;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__19&quot;&gt;&lt;p style=&quot;margin:0 0 1px;font-size:17px;font-weight:900;color:#3A2E25;letter-spacing:0.3px;&quot; class=&quot;js_darkmode__text__20&quot;&gt;&lt;span class=&quot;js_darkmode__text__21&quot;&gt;项目是什么&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:11px;font-weight:600;color:#9E836C;letter-spacing:1.5px;&quot; class=&quot;js_darkmode__4 js_darkmode__text__22&quot;&gt;&lt;span class=&quot;js_darkmode__text__23&quot;&gt;项目是什么&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;p style=&quot;margin-bottom:16px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__24&quot;&gt;&lt;span class=&quot;js_darkmode__text__25&quot;&gt;工具优先设计的多模型 Agent 框架。它解决的是 PHP 开发者接 AI 时最常撞上的那类问题——接入繁琐、样板代码多、供应商绑定深。这个项目把这些脏活收敛成一个干净的 composer 包，几行代码就能把 AI 能力挂进你的应用。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-bottom:16px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__26&quot;&gt;&lt;span class=&quot;js_darkmode__text__27&quot;&gt;社区活跃维护，项目维护活跃，README 完整、示例齐全，从安装到跑通第一个调用的路径很短。&lt;/span&gt;&lt;/p&gt;&lt;section style=&quot;margin-top:48px;margin-bottom:32px;padding:0;&quot; class=&quot;js_darkmode__text__28&quot;&gt;&lt;section style=&quot;display:flex;align-items:center;gap:16px;margin-bottom:24px;&quot; class=&quot;js_darkmode__text__29&quot;&gt;&lt;section style=&quot;text-align:center;flex-shrink:0;&quot; class=&quot;js_darkmode__text__30&quot;&gt;&lt;p style=&quot;margin:0;font-size:28px;font-weight:900;color:#5C3C2A;line-height:1;letter-spacing:-2px;&quot; class=&quot;js_darkmode__text__31&quot;&gt;&lt;span class=&quot;js_darkmode__text__32&quot;&gt;02&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:8px;font-weight:700;color:#D8C9B0;letter-spacing:2px;&quot; class=&quot;js_darkmode__5 js_darkmode__text__33&quot;&gt;&lt;span class=&quot;js_darkmode__text__34&quot;&gt;PART&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;span style=&quot;width:1px;height:36px;background:#E5DDCA;flex-shrink:0;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__35&quot;&gt;&lt;p style=&quot;margin:0 0 1px;font-size:17px;font-weight:900;color:#3A2E25;letter-spacing:0.3px;&quot; class=&quot;js_darkmode__text__36&quot;&gt;&lt;span class=&quot;js_darkmode__text__37&quot;&gt;项目结构&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:11px;font-weight:600;color:#9E836C;letter-spacing:1.5px;&quot; class=&quot;js_darkmode__7 js_darkmode__text__38&quot;&gt;&lt;span class=&quot;js_darkmode__text__39&quot;&gt;STRUCTURE · 目录布局&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;p style=&quot;margin-bottom:16px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__40&quot;&gt;&lt;span class=&quot;js_darkmode__text__41&quot;&gt;下面用一张目录树，帮你快速摸清这个项目的代码组织方式：&lt;/span&gt;&lt;/p&gt;&lt;section style=&quot;margin:0 0 20px;text-align:center;&quot;&gt;&lt;img alt=&quot;项目目录 代码示例&quot; class=&quot;rich_pages wxw-img&quot; data-aistatus=&quot;1&quot; data-ratio=&quot;5.220370370370371&quot; data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/hwjzu06cGagasm3lD40LWvSYT0ciaxfTt4icka7skpS6m2QBibVnibJQDKqVib38AUX0U7lva4WU6JnWnR1U0BeZRIRqo55xLW7fvqTekRiae6pBk/640?wx_fmt=png&amp;amp;watermark=1#imgIndex=0&quot; data-w=&quot;1080&quot; style=&quot;width: 562px !important; height: auto !important; border-radius: 8px; display: block; visibility: visible !important;&quot; data-original-style=&quot;width:100%;height:auto;border-radius:8px;display:block;&quot; data-index=&quot;0&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/hwjzu06cGagasm3lD40LWvSYT0ciaxfTt4icka7skpS6m2QBibVnibJQDKqVib38AUX0U7lva4WU6JnWnR1U0BeZRIRqo55xLW7fvqTekRiae6pBk/640?wx_fmt=png&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=0&quot; _width=&quot;100%&quot; __sec_open_place_holder__=&quot;true&quot; data-before-load-time=&quot;1795567516204&quot; data-report-img-idx=&quot;0&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;section style=&quot;margin-top:48px;margin-bottom:32px;padding:0;&quot; class=&quot;js_darkmode__text__42&quot;&gt;&lt;section style=&quot;margin:0 0 24px;text-align:center;&quot; class=&quot;js_darkmode__text__43&quot;&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/hwjzu06cGahHasO0IpyBDctRrC7Ria1AXicL1IcKUWQ1tCPcSfLcZfZRR1rqtVeqibCWEonmdNSiadPD0QMhRWAdWvK5kNia19tdXm9cf3agejyY/640?wx_fmt=png&amp;amp;watermark=1#imgIndex=1&quot; alt=&quot;PHP Agents 项目接入图&quot; class=&quot;rich_pages wxw-img js_darkmode__8&quot; data-ratio=&quot;0.46444444444444444&quot; data-w=&quot;900&quot; style=&quot;width: 562px !important; height: auto !important; border-radius: 12px; display: block; box-shadow: rgba(15, 23, 42, 0.25) 0px 4px 16px -8px; visibility: visible !important;&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;width:100%;height:auto;border-radius:12px;display:block;box-shadow:0 4px 16px -8px rgba(15,23,42,0.25);&quot; data-index=&quot;1&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/hwjzu06cGahHasO0IpyBDctRrC7Ria1AXicL1IcKUWQ1tCPcSfLcZfZRR1rqtVeqibCWEonmdNSiadPD0QMhRWAdWvK5kNia19tdXm9cf3agejyY/640?wx_fmt=png&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=1&quot; _width=&quot;100%&quot; __sec_open_place_holder__=&quot;true&quot; data-before-load-time=&quot;1795571302600&quot; data-report-img-idx=&quot;1&quot; data-fail=&quot;0&quot;/&gt;&lt;p style=&quot;margin:10px 0 0;font-size:12px;color:#9CA3AF;text-align:center;&quot; class=&quot;js_darkmode__9 js_darkmode__text__44&quot;&gt;&lt;span class=&quot;js_darkmode__text__45&quot;&gt;PHP Agents 项目接入图&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;section style=&quot;display:flex;align-items:center;gap:16px;margin-bottom:24px;&quot; class=&quot;js_darkmode__text__46&quot;&gt;&lt;section style=&quot;text-align:center;flex-shrink:0;&quot; class=&quot;js_darkmode__text__47&quot;&gt;&lt;p style=&quot;margin:0;font-size:28px;font-weight:900;color:#5C3C2A;line-height:1;letter-spacing:-2px;&quot; class=&quot;js_darkmode__text__48&quot;&gt;&lt;span class=&quot;js_darkmode__text__49&quot;&gt;03&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:8px;font-weight:700;color:#D8C9B0;letter-spacing:2px;&quot; class=&quot;js_darkmode__10 js_darkmode__text__50&quot;&gt;&lt;span class=&quot;js_darkmode__text__51&quot;&gt;PART&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;span style=&quot;width:1px;height:36px;background:#E5DDCA;flex-shrink:0;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__52&quot;&gt;&lt;p style=&quot;margin:0 0 1px;font-size:17px;font-weight:900;color:#3A2E25;letter-spacing:0.3px;&quot; class=&quot;js_darkmode__text__53&quot;&gt;&lt;span class=&quot;js_darkmode__text__54&quot;&gt;核心功能&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:11px;font-weight:600;color:#9E836C;letter-spacing:1.5px;&quot; class=&quot;js_darkmode__12 js_darkmode__text__55&quot;&gt;&lt;span class=&quot;js_darkmode__text__56&quot;&gt;核心功能&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;p style=&quot;margin:0 0 8px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__57&quot;&gt;&lt;span style=&quot;color:#5C3C2A;font-weight:700;margin-right:6px;&quot; class=&quot;js_darkmode__text__58&quot;&gt;&lt;span class=&quot;js_darkmode__text__59&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;js_darkmode__text__60&quot;&gt;&lt;span style=&quot;color: #5C3C2A;font-weight: bold;&quot; class=&quot;js_darkmode__text__61&quot;&gt;工具使用循环&lt;/span&gt;&amp;nbsp;— Agent 自主推理 → 调用工具 → 根据结果继续迭代，直到完成任务&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0 0 8px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__62&quot;&gt;&lt;span style=&quot;color:#5C3C2A;font-weight:700;margin-right:6px;&quot; class=&quot;js_darkmode__text__63&quot;&gt;&lt;span class=&quot;js_darkmode__text__64&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;js_darkmode__text__65&quot;&gt;&lt;span style=&quot;color: #5C3C2A;font-weight: bold;&quot; class=&quot;js_darkmode__text__66&quot;&gt;供应商抽象&lt;/span&gt;&amp;nbsp;— OpenAI 兼容 API、&lt;span class=&quot;&quot;&gt;Anthropic&lt;/span&gt;、Ollama 本地模型、llama.cpp 原生支持&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0 0 8px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__67&quot;&gt;&lt;span style=&quot;color:#5C3C2A;font-weight:700;margin-right:6px;&quot; class=&quot;js_darkmode__text__68&quot;&gt;&lt;span class=&quot;js_darkmode__text__69&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;js_darkmode__text__70&quot;&gt;&lt;span style=&quot;color: #5C3C2A;font-weight: bold;&quot; class=&quot;js_darkmode__text__71&quot;&gt;可组合工具包&lt;/span&gt;&amp;nbsp;— Toolkit 机制把相关工具打包组合，按需挂载给不同 Agent&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0 0 8px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__72&quot;&gt;&lt;span style=&quot;color:#5C3C2A;font-weight:700;margin-right:6px;&quot; class=&quot;js_darkmode__text__73&quot;&gt;&lt;span class=&quot;js_darkmode__text__74&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;js_darkmode__text__75&quot;&gt;&lt;span style=&quot;color: #5C3C2A;font-weight: bold;&quot; class=&quot;js_darkmode__text__76&quot;&gt;PHP 8.4+&lt;/span&gt;&amp;nbsp;— 基于最新语言特性构建，代码干净现代&lt;/span&gt;&lt;/p&gt;&lt;section style=&quot;display:flex;align-items:center;gap:16px;margin-bottom:24px;&quot; class=&quot;js_darkmode__text__77&quot;&gt;&lt;section style=&quot;text-align:center;flex-shrink:0;&quot; class=&quot;js_darkmode__text__78&quot;&gt;&lt;p style=&quot;margin:0;font-size:28px;font-weight:900;color:#5C3C2A;line-height:1;letter-spacing:-2px;&quot; class=&quot;js_darkmode__text__79&quot;&gt;&lt;span class=&quot;js_darkmode__text__80&quot;&gt;04&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:8px;font-weight:700;color:#D8C9B0;letter-spacing:2px;&quot; class=&quot;js_darkmode__13 js_darkmode__text__81&quot;&gt;&lt;span class=&quot;js_darkmode__text__82&quot;&gt;PART&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;span style=&quot;width:1px;height:36px;background:#E5DDCA;flex-shrink:0;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__83&quot;&gt;&lt;p style=&quot;margin:0 0 1px;font-size:17px;font-weight:900;color:#3A2E25;letter-spacing:0.3px;&quot; class=&quot;js_darkmode__text__84&quot;&gt;&lt;span class=&quot;js_darkmode__text__85&quot;&gt;架构设计&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:11px;font-weight:600;color:#9E836C;letter-spacing:1.5px;&quot; class=&quot;js_darkmode__15 js_darkmode__text__86&quot;&gt;&lt;span class=&quot;js_darkmode__text__87&quot;&gt;架构设计&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;p style=&quot;margin-bottom:16px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__88&quot;&gt;&lt;span class=&quot;js_darkmode__text__89&quot;&gt;项目整体走&amp;quot;薄封装、强约定&amp;quot;的路线：对外暴露的 API 面很小，内部把协议细节、重试、序列化这些易错点全部兜住。你写的是业务意图，它负责把意图翻译成对模型的正确调用。这种设计的好处是升级模型供应商时业务代码几乎不动。&lt;/span&gt;&lt;/p&gt;&lt;section style=&quot;margin-top:48px;margin-bottom:32px;padding:0;&quot; class=&quot;js_darkmode__text__90&quot;&gt;&lt;section style=&quot;display:flex;align-items:center;gap:16px;margin-bottom:24px;&quot; class=&quot;js_darkmode__text__91&quot;&gt;&lt;section style=&quot;text-align:center;flex-shrink:0;&quot; class=&quot;js_darkmode__text__92&quot;&gt;&lt;p style=&quot;margin:0;font-size:28px;font-weight:900;color:#5C3C2A;line-height:1;letter-spacing:-2px;&quot; class=&quot;js_darkmode__text__93&quot;&gt;&lt;span class=&quot;js_darkmode__text__94&quot;&gt;05&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:8px;font-weight:700;color:#D8C9B0;letter-spacing:2px;&quot; class=&quot;js_darkmode__16 js_darkmode__text__95&quot;&gt;&lt;span class=&quot;js_darkmode__text__96&quot;&gt;PART&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;span style=&quot;width:1px;height:36px;background:#E5DDCA;flex-shrink:0;&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__97&quot;&gt;&lt;p style=&quot;margin:0 0 1px;font-size:17px;font-weight:900;color:#3A2E25;letter-spacing:0.3px;&quot; class=&quot;js_darkmode__text__98&quot;&gt;&lt;span class=&quot;js_darkmode__text__99&quot;&gt;快速开始&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:11px;font-weight:600;color:#9E836C;letter-spacing:1.5px;&quot; class=&quot;js_darkmode__18 js_darkmode__text__100&quot;&gt;&lt;span class=&quot;js_darkmode__text__101&quot;&gt;QUICK START · 快速上手&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;section style=&quot;margin:0 0 20px;text-align:center;&quot;&gt;&lt;img alt=&quot;bash 代码示例&quot; class=&quot;rich_pages wxw-img&quot; data-aistatus=&quot;1&quot; data-ratio=&quot;0.19537037037037036&quot; data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/hwjzu06cGajkYRZHTII8gbVrJdtkB1zUzNthRegPJZib3ElibnWWu6ibcktSibtEJJeicGRFzxg94F3p6Sa5Nia49SIqkxG04CN8R5B84OQRvJGHY/640?wx_fmt=png&amp;amp;watermark=1#imgIndex=2&quot; data-w=&quot;1080&quot; style=&quot;width: 655px !important; height: auto !important; border-radius: 8px; display: block; visibility: visible !important;&quot; data-original-style=&quot;width:100%;height:auto;border-radius:8px;display:block;&quot; data-index=&quot;2&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/hwjzu06cGajkYRZHTII8gbVrJdtkB1zUzNthRegPJZib3ElibnWWu6ibcktSibtEJJeicGRFzxg94F3p6Sa5Nia49SIqkxG04CN8R5B84OQRvJGHY/640?wx_fmt=png&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=2&quot; _width=&quot;100%&quot; __sec_open_place_holder__=&quot;true&quot; data-before-load-time=&quot;1795574031718&quot; data-report-img-idx=&quot;2&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;section style=&quot;margin-top:48px;margin-bottom:32px;padding:0;&quot; class=&quot;js_darkmode__text__102&quot;&gt;&lt;section style=&quot;display:flex;align-items:center;gap:16px;margin-bottom:24px;&quot; class=&quot;js_darkmode__text__103&quot;&gt;&lt;section style=&quot;text-align:center;flex-shrink:0;&quot; class=&quot;js_darkmode__text__104&quot;&gt;&lt;p style=&quot;margin:0;font-size:28px;font-weight:900;color:#5C3C2A;line-height:1;letter-spacing:-2px;&quot; class=&quot;js_darkmode__text__105&quot;&gt;&lt;span class=&quot;js_darkmode__text__106&quot;&gt;06&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:8px;font-weight:700;color:#D8C9B0;letter-spacing:2px;&quot; class=&quot;js_darkmode__19 js_darkmode__text__107&quot;&gt;&lt;span class=&quot;js_darkmode__text__108&quot;&gt;PART&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;span style=&quot;width:1px;height:36px;background:#E5DDCA;flex-shrink:0;&quot; class=&quot;js_darkmode__20&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__109&quot;&gt;&lt;p style=&quot;margin:0 0 1px;font-size:17px;font-weight:900;color:#3A2E25;letter-spacing:0.3px;&quot; class=&quot;js_darkmode__text__110&quot;&gt;&lt;span class=&quot;js_darkmode__text__111&quot;&gt;代码实战&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:11px;font-weight:600;color:#9E836C;letter-spacing:1.5px;&quot; class=&quot;js_darkmode__21 js_darkmode__text__112&quot;&gt;&lt;span class=&quot;js_darkmode__text__113&quot;&gt;代码实战&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;section style=&quot;margin:0 0 20px;text-align:center;&quot;&gt;&lt;img alt=&quot;php 代码示例&quot; class=&quot;rich_pages wxw-img&quot; data-aistatus=&quot;1&quot; data-ratio=&quot;0.8055555555555556&quot; data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/hwjzu06cGagLN5ebpFkPE5xS2hpibziaAickdVUjONbCK9JZuian8IyPJ7W8C5YTz940QKJrDe1ylsQ7NcbJ62rByYJWp4dl9xg7DISjc5f01vg/640?wx_fmt=png&amp;amp;watermark=1#imgIndex=3&quot; data-w=&quot;1080&quot; style=&quot;width: 655px !important; height: auto !important; border-radius: 8px; display: block; visibility: visible !important;&quot; data-original-style=&quot;width:100%;height:auto;border-radius:8px;display:block;&quot; data-index=&quot;3&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/hwjzu06cGagLN5ebpFkPE5xS2hpibziaAickdVUjONbCK9JZuian8IyPJ7W8C5YTz940QKJrDe1ylsQ7NcbJ62rByYJWp4dl9xg7DISjc5f01vg/640?wx_fmt=png&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=3&quot; _width=&quot;100%&quot; __sec_open_place_holder__=&quot;true&quot; data-before-load-time=&quot;1795574031772&quot; data-report-img-idx=&quot;3&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-bottom:16px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__114&quot;&gt;&lt;span class=&quot;js_darkmode__text__115&quot;&gt;上面的代码就是完整可跑的最小示例：配好环境变量里的 API key（或本地模型地址），直接 php 运行即可看到效果。在此基础上加自己的业务逻辑——工具、记忆、多轮对话——都沿着同一套 API 形状扩展。&lt;/span&gt;&lt;/p&gt;&lt;section style=&quot;margin-top:48px;margin-bottom:32px;padding:0;&quot; class=&quot;js_darkmode__text__116&quot;&gt;&lt;section style=&quot;display:flex;align-items:center;gap:16px;margin-bottom:24px;&quot; class=&quot;js_darkmode__text__117&quot;&gt;&lt;section style=&quot;text-align:center;flex-shrink:0;&quot; class=&quot;js_darkmode__text__118&quot;&gt;&lt;p style=&quot;margin:0;font-size:28px;font-weight:900;color:#5C3C2A;line-height:1;letter-spacing:-2px;&quot; class=&quot;js_darkmode__text__119&quot;&gt;&lt;span class=&quot;js_darkmode__text__120&quot;&gt;07&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:8px;font-weight:700;color:#D8C9B0;letter-spacing:2px;&quot; class=&quot;js_darkmode__22 js_darkmode__text__121&quot;&gt;&lt;span class=&quot;js_darkmode__text__122&quot;&gt;PART&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;span style=&quot;width:1px;height:36px;background:#E5DDCA;flex-shrink:0;&quot; class=&quot;js_darkmode__23&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__123&quot;&gt;&lt;p style=&quot;margin:0 0 1px;font-size:17px;font-weight:900;color:#3A2E25;letter-spacing:0.3px;&quot; class=&quot;js_darkmode__text__124&quot;&gt;&lt;span class=&quot;js_darkmode__text__125&quot;&gt;适用场景&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:11px;font-weight:600;color:#9E836C;letter-spacing:1.5px;&quot; class=&quot;js_darkmode__24 js_darkmode__text__126&quot;&gt;&lt;span class=&quot;js_darkmode__text__127&quot;&gt;适用场景&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;p style=&quot;margin:0 0 8px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__128&quot;&gt;&lt;span style=&quot;color:#5C3C2A;font-weight:700;margin-right:6px;&quot; class=&quot;js_darkmode__text__129&quot;&gt;&lt;span class=&quot;js_darkmode__text__130&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;js_darkmode__text__131&quot;&gt;想给现有 PHP 项目加 AI 能力，但不想引入重框架&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0 0 8px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__132&quot;&gt;&lt;span style=&quot;color:#5C3C2A;font-weight:700;margin-right:6px;&quot; class=&quot;js_darkmode__text__133&quot;&gt;&lt;span class=&quot;js_darkmode__text__134&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;js_darkmode__text__135&quot;&gt;需要快速验证一个 AI 功能的可行性（POC 友好）&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0 0 8px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__136&quot;&gt;&lt;span style=&quot;color:#5C3C2A;font-weight:700;margin-right:6px;&quot; class=&quot;js_darkmode__text__137&quot;&gt;&lt;span class=&quot;js_darkmode__text__138&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;js_darkmode__text__139&quot;&gt;学习 AI 应用开发的内部机制（代码量小，适合通读）&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0 0 8px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__140&quot;&gt;&lt;span style=&quot;color:#5C3C2A;font-weight:700;margin-right:6px;&quot; class=&quot;js_darkmode__text__141&quot;&gt;&lt;span class=&quot;js_darkmode__text__142&quot;&gt;•&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;js_darkmode__text__143&quot;&gt;生产环境中作为某一项能力的专用组件（职责单一）&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-bottom:16px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__144&quot;&gt;&lt;span class=&quot;js_darkmode__text__145&quot;&gt;如果你的场景需要更重的编排（多 Agent、工作流），可以结合本系列前面聊过的框架类项目一起用。&lt;/span&gt;&lt;/p&gt;&lt;section style=&quot;margin-top:48px;margin-bottom:32px;padding:0;&quot; class=&quot;js_darkmode__text__146&quot;&gt;&lt;section style=&quot;display:flex;align-items:center;gap:16px;margin-bottom:24px;&quot; class=&quot;js_darkmode__text__147&quot;&gt;&lt;section style=&quot;text-align:center;flex-shrink:0;&quot; class=&quot;js_darkmode__text__148&quot;&gt;&lt;p style=&quot;margin:0;font-size:28px;font-weight:900;color:#5C3C2A;line-height:1;letter-spacing:-2px;&quot; class=&quot;js_darkmode__text__149&quot;&gt;&lt;span class=&quot;js_darkmode__text__150&quot;&gt;08&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:8px;font-weight:700;color:#D8C9B0;letter-spacing:2px;&quot; class=&quot;js_darkmode__25 js_darkmode__text__151&quot;&gt;&lt;span class=&quot;js_darkmode__text__152&quot;&gt;PART&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;span style=&quot;width:1px;height:36px;background:#E5DDCA;flex-shrink:0;&quot; class=&quot;js_darkmode__26&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__153&quot;&gt;&lt;p style=&quot;margin:0 0 1px;font-size:17px;font-weight:900;color:#3A2E25;letter-spacing:0.3px;&quot; class=&quot;js_darkmode__text__154&quot;&gt;&lt;span class=&quot;js_darkmode__text__155&quot;&gt;项目地址&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:11px;font-weight:600;color:#9E836C;letter-spacing:1.5px;&quot; class=&quot;js_darkmode__27 js_darkmode__text__156&quot;&gt;&lt;span class=&quot;js_darkmode__text__157&quot;&gt;项目地址&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;p style=&quot;margin-bottom:16px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__158&quot;&gt;&lt;span style=&quot;background:#F1EADD;color:#5C3C2A;padding:2px 6px;border-radius:4px;font-family:&amp;#39;SF Mono&amp;#39;,Consolas,Monaco,monospace;font-size:13px;font-weight:600;&quot; class=&quot;js_darkmode__28 js_darkmode__text__159&quot;&gt;&lt;span class=&quot;js_darkmode__text__160&quot;&gt;https://github.com/carmelosantana/php-agents&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;section style=&quot;margin-top:48px;margin-bottom:32px;padding:0;&quot; class=&quot;js_darkmode__text__161&quot;&gt;&lt;section style=&quot;display:flex;align-items:center;gap:16px;margin-bottom:24px;&quot; class=&quot;js_darkmode__text__162&quot;&gt;&lt;section style=&quot;text-align:center;flex-shrink:0;&quot; class=&quot;js_darkmode__text__163&quot;&gt;&lt;p style=&quot;margin:0;font-size:28px;font-weight:900;color:#5C3C2A;line-height:1;letter-spacing:-2px;&quot; class=&quot;js_darkmode__text__164&quot;&gt;&lt;span class=&quot;js_darkmode__text__165&quot;&gt;///&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:8px;font-weight:700;color:#D8C9B0;letter-spacing:2px;&quot; class=&quot;js_darkmode__29 js_darkmode__text__166&quot;&gt;&lt;span class=&quot;js_darkmode__text__167&quot;&gt;LAST&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;span style=&quot;width:1px;height:36px;background:#E5DDCA;flex-shrink:0;&quot; class=&quot;js_darkmode__30&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__168&quot;&gt;&lt;p style=&quot;margin:0 0 1px;font-size:17px;font-weight:900;color:#3A2E25;letter-spacing:0.3px;&quot; class=&quot;js_darkmode__text__169&quot;&gt;&lt;span class=&quot;js_darkmode__text__170&quot;&gt;写在最后&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:0;font-size:11px;font-weight:600;color:#9E836C;letter-spacing:1.5px;&quot; class=&quot;js_darkmode__31 js_darkmode__text__171&quot;&gt;&lt;span class=&quot;js_darkmode__text__172&quot;&gt;SUMMARY · 个人观点&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;p style=&quot;margin-bottom:16px;font-size:14px;line-height:1.9;text-align:justify;padding:0;&quot; class=&quot;js_darkmode__text__173&quot;&gt;&lt;span class=&quot;js_darkmode__text__174&quot;&gt;感谢大家阅读，个人观点仅供参考，欢迎在评论区发表不同观点。&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;/section&gt;&lt;/section&gt;&lt;/section&gt;&lt;/section&gt;&lt;/section&gt;&lt;/section&gt;&lt;/section&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 25 Nov 2026 10:33:43 +0800</pubDate></item><item><title>[开源]一款开源主数据平台，让多个业务系统用好同一套主数据</title><link>https://www.codepub.top/post/744.html</link><description>&lt;h1 data-track=&quot;2&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__1 js_darkmode__text__3&quot;&gt;&lt;span class=&quot;js_darkmode__text__4&quot;&gt;一、开源项目简介&lt;/span&gt;&lt;/h1&gt;&lt;p&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzYyRpVC1Tyr9zic8XHWNcLFw1ks4KZ1Wj635Fczcp1ib1ib9oYIGnjLUC3IkLibBic6152YDZyh2aXFq9NnFD83RtgNhs2ichlGJvruU/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=0&quot; class=&quot;rich_pages wxw-img js_insertlocalimg&quot; data-ratio=&quot;0.15555555555555556&quot; data-s=&quot;300,640&quot; data-type=&quot;jpeg&quot; data-w=&quot;1080&quot; type=&quot;block&quot; data-imgfileid=&quot;100027000&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;null&quot; data-index=&quot;0&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzYyRpVC1Tyr9zic8XHWNcLFw1ks4KZ1Wj635Fczcp1ib1ib9oYIGnjLUC3IkLibBic6152YDZyh2aXFq9NnFD83RtgNhs2ichlGJvruU/640?wx_fmt=jpeg&amp;from=appmsg&amp;wxfrom=13&amp;tp=wxpic&amp;watermark=1#imgIndex=0&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; data-sec-load-status=&quot;2&quot; style=&quot;height: auto !important; visibility: visible !important; width: 583.984px !important;&quot; data-report-img-idx=&quot;0&quot; alt=&quot;图片&quot;/&gt;&lt;/section&gt;&lt;/p&gt;&lt;p data-track=&quot;3&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__2 js_darkmode__text__5&quot;&gt;&lt;strong style=&quot;margin: 0px;padding: 0px;border: 0px;font-weight: 700;&quot; class=&quot;js_darkmode__text__6&quot;&gt;&lt;span class=&quot;js_darkmode__text__7&quot;&gt;模型驱动，统一标准，质量治理，开放共享。让多个业务系统用好同一套主数据。&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p data-track=&quot;15&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__3 js_darkmode__text__8&quot;&gt;&lt;strong style=&quot;margin: 0px;padding: 0px;border: 0px;font-weight: 700;&quot; class=&quot;js_darkmode__text__9&quot;&gt;&lt;span class=&quot;js_darkmode__text__10&quot;&gt;qData 主数据平台（qData-mdm）&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;js_darkmode__text__11&quot;&gt;&amp;nbsp;是一款开源主数据平台。通过模型驱动、统一标准、质量治理与开放服务，将核心业务对象的数据定义、日常维护和共享使用集中起来，减少重复建档、编码差异与基础信息不一致带来的协作成本。&lt;/span&gt;&lt;/p&gt;&lt;p data-track=&quot;16&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__4 js_darkmode__text__12&quot;&gt;&lt;span class=&quot;js_darkmode__text__13&quot;&gt;你可以从供应商、物料、设备等一类业务对象开始，建立统一的维护入口、参考取值和编码规则，通过查询 API 与数据分发连接采购、仓储、财务等业务系统。开发团队可以复用已有的数据管理、权限和服务能力，并基于源码按项目需要扩展。&lt;/span&gt;&lt;/p&gt;&lt;h1 data-track=&quot;4&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__5 js_darkmode__text__14&quot;&gt;&lt;span class=&quot;js_darkmode__text__15&quot;&gt;二、开源协议&lt;/span&gt;&lt;/h1&gt;&lt;p data-track=&quot;5&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__6 js_darkmode__text__16&quot;&gt;&lt;span class=&quot;js_darkmode__text__17&quot;&gt;使用Apache-2.0开源协议&lt;/span&gt;&lt;/p&gt;&lt;h1 data-track=&quot;6&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__7 js_darkmode__text__18&quot;&gt;&lt;span class=&quot;js_darkmode__text__19&quot;&gt;三、界面展示&lt;/span&gt;&lt;/h1&gt;&lt;h1 data-track=&quot;7&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__8 js_darkmode__text__20&quot;&gt;&lt;span class=&quot;js_darkmode__text__21&quot;&gt;系统配图&lt;/span&gt;&lt;/h1&gt;&lt;table class=&quot;js_darkmode__9&quot;&gt;&lt;tbody&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;firstRow&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/rvbNscYfLzaxrLpG4XI8GqphibNT9dYsR4F2vTxTPIcleoCG5JbWnM1UoSe0X6fa8yTos1qlPfPz6C1Zt6vHibjeuGkku6U4XmMXl5z9C8jqU/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=1&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6277777777777778&quot; data-s=&quot;300,640&quot; data-type=&quot;png&quot; data-w=&quot;1080&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 266.484px !important;&quot; data-croporisrc=&quot;https://mmbiz.qpic.cn/mmbiz_png/rvbNscYfLzYBjPRZMiaHnjgHO4iaOicia9pEeOgPClDHmxXoib6xXgJQkVbyvLu73nlQ4BEVA3vYNibKQ8umoOxsytLfaDH6DvZuEQcp0LkSDXg04/0?wx_fmt=png&amp;amp;from=appmsg&quot; data-cropselx1=&quot;0&quot; data-cropselx2=&quot;263&quot; data-cropsely1=&quot;0&quot; data-cropsely2=&quot;165&quot; data-imgfileid=&quot;100027032&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;1&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/rvbNscYfLzaxrLpG4XI8GqphibNT9dYsR4F2vTxTPIcleoCG5JbWnM1UoSe0X6fa8yTos1qlPfPz6C1Zt6vHibjeuGkku6U4XmMXl5z9C8jqU/640?wx_fmt=png&amp;from=appmsg&amp;wxfrom=13&amp;tp=wxpic&amp;watermark=1#imgIndex=1&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; data-sec-load-status=&quot;2&quot; data-report-img-idx=&quot;2&quot; alt=&quot;图片&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/rvbNscYfLzYYYfGhSbibcr1M8rTKjEYtItSaf7sSJWkU0ic86YGv5iaeqWKoQmgUCL0qpNnwb0htwYb9iarRK9QzNnqic7r4YPvnNcgVPlcic8BHc/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=2&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6277777777777778&quot; data-s=&quot;300,640&quot; data-type=&quot;png&quot; data-w=&quot;1080&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 266.484px !important;&quot; data-croporisrc=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/rvbNscYfLzaAwpdLpwa8Eqnaicycibt5b46ia9WzV3kt3J4cic73rNJWjxliaUAVmXbh1icZicae7XwdIibCgw8jlmgYAAnsB9eJH5Q26rnxX3yjShc/0?wx_fmt=png&amp;amp;from=appmsg&quot; data-cropselx1=&quot;0&quot; data-cropselx2=&quot;263&quot; data-cropsely1=&quot;0&quot; data-cropsely2=&quot;165&quot; data-imgfileid=&quot;100027030&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;2&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/rvbNscYfLzYYYfGhSbibcr1M8rTKjEYtItSaf7sSJWkU0ic86YGv5iaeqWKoQmgUCL0qpNnwb0htwYb9iarRK9QzNnqic7r4YPvnNcgVPlcic8BHc/640?wx_fmt=png&amp;from=appmsg&amp;wxfrom=13&amp;tp=wxpic&amp;watermark=1#imgIndex=2&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; data-sec-load-status=&quot;2&quot; data-report-img-idx=&quot;1&quot; alt=&quot;图片&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/rvbNscYfLzZ4hDs7fKM6g0kCkhHaIqTDrGKkKkLaoewibzt4sK9EfvSVHaAdeicoa3nMibl4Cl9icp2CTlib9ENW3S44icM5X6oMicpG6FkyibfDdvo/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=3&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6277777777777778&quot; data-s=&quot;300,640&quot; data-type=&quot;png&quot; data-w=&quot;1080&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.969px !important;&quot; data-croporisrc=&quot;https://mmbiz.qpic.cn/mmbiz_png/rvbNscYfLzb5xzeK0uBezbeXpq4HyRu3S0dBtYYkLh24IPEdtNibbzK3k3yAuRpsYAMo45l4ly2czcPZNC5gC4UXOxXhRQdMug1M84BibC5t0/0?wx_fmt=png&amp;amp;from=appmsg&quot; data-cropselx1=&quot;0&quot; data-cropselx2=&quot;263&quot; data-cropsely1=&quot;0&quot; data-cropsely2=&quot;165&quot; data-imgfileid=&quot;100027031&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;3&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/rvbNscYfLzZ4hDs7fKM6g0kCkhHaIqTDrGKkKkLaoewibzt4sK9EfvSVHaAdeicoa3nMibl4Cl9icp2CTlib9ENW3S44icM5X6oMicpG6FkyibfDdvo/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=3&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795571353466&quot; data-report-img-idx=&quot;4&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__13&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzYVZTYOdqBdicWg3uDmwwYqIxG5aeEYIIHjgpxzPicrDGTBtL9xibdFhASUP4RmLsKSclLcKQ1f11V1nZxO3clR5GOxbuRCHFqoL4/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=4&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027004&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;4&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzYVZTYOdqBdicWg3uDmwwYqIxG5aeEYIIHjgpxzPicrDGTBtL9xibdFhASUP4RmLsKSclLcKQ1f11V1nZxO3clR5GOxbuRCHFqoL4/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=4&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795571353468&quot; data-report-img-idx=&quot;3&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzYBQ5z0KgwCiaSoUXoTZq3tD7UarbsSwKu7iaGXHp0J1mC6icmtxGI5t7GDSnIZNmsa2lZG4AcsIxe1IIphy1fLMyTUYsIt4CCmFY/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=5&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027007&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;5&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzYBQ5z0KgwCiaSoUXoTZq3tD7UarbsSwKu7iaGXHp0J1mC6icmtxGI5t7GDSnIZNmsa2lZG4AcsIxe1IIphy1fLMyTUYsIt4CCmFY/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=5&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573949184&quot; data-report-img-idx=&quot;6&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__15&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzYBXnxaLLRdcB8CLysAVuBeLIRYrVwvV80v4bMNhtCYkmR9DKkxkkwGC7M5xWKBv0dS31FsqPoicthI9ZDsT6vb2m4btd2up1po/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=6&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027012&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;1&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzYBXnxaLLRdcB8CLysAVuBeLIRYrVwvV80v4bMNhtCYkmR9DKkxkkwGC7M5xWKBv0dS31FsqPoicthI9ZDsT6vb2m4btd2up1po/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=6&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573949186&quot; data-report-img-idx=&quot;5&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzZugE5qib71Ut0VUTnQ0XLHz5W7AV7C7mLg382vhn1fgiaTs8BQs4733wSGXLwhmY12pSyRg2UDhm3tNBxPKq9sRd2kEeVdbYiczY/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=7&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027010&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;6&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzZugE5qib71Ut0VUTnQ0XLHz5W7AV7C7mLg382vhn1fgiaTs8BQs4733wSGXLwhmY12pSyRg2UDhm3tNBxPKq9sRd2kEeVdbYiczY/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=7&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573949269&quot; data-report-img-idx=&quot;7&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzZ8ZicVG5aib3KO5piaVaciaczge6iaP41K6bPicIgJxsVXJIIuM1ic33wNJDh77ywZRc6H7AFxzSyGZu7uogz1nZhNO087Yt97AKEa50/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=8&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027009&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;7&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzZ8ZicVG5aib3KO5piaVaciaczge6iaP41K6bPicIgJxsVXJIIuM1ic33wNJDh77ywZRc6H7AFxzSyGZu7uogz1nZhNO087Yt97AKEa50/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=8&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573949270&quot; data-report-img-idx=&quot;8&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__18&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzadIT0ibrS8CneWiaMs7jCdM37vgr31E0mj6RKFqffjoJJuVPYC1Sbc7PJKnTu6oiapbPVRaVmtgTJcZPbqaxLbE4POb4uXn1HFyM/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=9&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027011&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;8&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzadIT0ibrS8CneWiaMs7jCdM37vgr31E0mj6RKFqffjoJJuVPYC1Sbc7PJKnTu6oiapbPVRaVmtgTJcZPbqaxLbE4POb4uXn1HFyM/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=9&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573949625&quot; data-report-img-idx=&quot;10&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__19&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzYiaT4Ggpic71VpicFtCoJULREuia07B4BIWHJTYzUBQXvmUTibLNpHicJvIyhCEI8NUsKshHdH5B74yGiaOGokD3h5ibXeeMrTCBYgDWA/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=10&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027013&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;9&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzYiaT4Ggpic71VpicFtCoJULREuia07B4BIWHJTYzUBQXvmUTibLNpHicJvIyhCEI8NUsKshHdH5B74yGiaOGokD3h5ibXeeMrTCBYgDWA/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=10&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573949625&quot; data-report-img-idx=&quot;9&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__20&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzZiaZiaRmOCjTzf1mmfBIpAKGVqtfgkmhLaOjvDb2vTfCziamp0rEcX3a6ae7qy5B4PetvIALAOwOY08ztDuSwUWa5Iev8vo7QC7c/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=11&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027014&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;10&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzZiaZiaRmOCjTzf1mmfBIpAKGVqtfgkmhLaOjvDb2vTfCziamp0rEcX3a6ae7qy5B4PetvIALAOwOY08ztDuSwUWa5Iev8vo7QC7c/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=11&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573949697&quot; data-report-img-idx=&quot;12&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__21&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzaOnHJErvE7njy6AuqNXrxqvezzbgtHplLz0Kv21sccD0MtKewMUicKAy6TrMcRxKffIWw8rR6oiba8cWObqansS0qITJfNyM0LM/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=12&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027015&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;11&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzaOnHJErvE7njy6AuqNXrxqvezzbgtHplLz0Kv21sccD0MtKewMUicKAy6TrMcRxKffIWw8rR6oiba8cWObqansS0qITJfNyM0LM/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=12&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573949697&quot; data-report-img-idx=&quot;11&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__22&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzaEkJuaNqXRMf9sX6ROqia5icUE92RiazicHVAThb3IFopaC74HcWI5nGfnOsL5XraxVD71Ps09nlrSFUQIiaAWZpy7GKJMicaHOiaBsU/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=13&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027017&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;12&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzaEkJuaNqXRMf9sX6ROqia5icUE92RiazicHVAThb3IFopaC74HcWI5nGfnOsL5XraxVD71Ps09nlrSFUQIiaAWZpy7GKJMicaHOiaBsU/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=13&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573950092&quot; data-report-img-idx=&quot;13&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__23&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzaVNBa0Xq4PA0zC35zYWcibD3UZtQibMkhlwOkmCfXrpdsRroOhrz52jOT48pn7N5ibzTZ5V0AdQsG58zuF7KplD98CHdAzlXs6vo/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=14&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027016&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;13&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzaVNBa0Xq4PA0zC35zYWcibD3UZtQibMkhlwOkmCfXrpdsRroOhrz52jOT48pn7N5ibzTZ5V0AdQsG58zuF7KplD98CHdAzlXs6vo/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=14&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573950092&quot; data-report-img-idx=&quot;14&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__24&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzZWqiaFtZY7ibAJnYuibTPh7HsJtxuicDQewAwr42oex7rqGZibekdCYgFrKV4WSzlBU78TRFJ90ibOYu6CKRPKn2Cr86kDicLT8YYnTU/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=15&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027018&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;14&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzZWqiaFtZY7ibAJnYuibTPh7HsJtxuicDQewAwr42oex7rqGZibekdCYgFrKV4WSzlBU78TRFJ90ibOYu6CKRPKn2Cr86kDicLT8YYnTU/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=15&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573950161&quot; data-report-img-idx=&quot;16&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__25&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzZnjXnhoWTAOQy8HDQFibg4ic82icJWvuljzolJXylUiaTlMevlUITHoxBbFib5vR6icmBcdFibYoJcmVxfiaTaicSO5lEOBmGpSNbIw94A/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=16&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027019&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;15&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzZnjXnhoWTAOQy8HDQFibg4ic82icJWvuljzolJXylUiaTlMevlUITHoxBbFib5vR6icmBcdFibYoJcmVxfiaTaicSO5lEOBmGpSNbIw94A/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=16&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573950161&quot; data-report-img-idx=&quot;15&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__26&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzaf6d6mPCn1iausLfyF1ynIDYCG2PyZ0J5jAVKLFoJQG2RndARZfJ6uiboK3D08DAnDYBzHV2xbtXa8cKh4SHibHnnGSrHib1lrAY8/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=17&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027020&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;16&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzaf6d6mPCn1iausLfyF1ynIDYCG2PyZ0J5jAVKLFoJQG2RndARZfJ6uiboK3D08DAnDYBzHV2xbtXa8cKh4SHibHnnGSrHib1lrAY8/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=17&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573950205&quot; data-report-img-idx=&quot;17&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__27&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/rvbNscYfLzY36bjU0t5UBqLULGnJheClibNibOS5lw9DeararmhHxUic8icTf5DvPedda24vQWLicb7icgyPBLo6T2MdW3wEWWId7yrxpRU9usfzw/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=18&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.48333333333333334&quot; data-s=&quot;300,640&quot; data-type=&quot;png&quot; data-w=&quot;1080&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-croporisrc=&quot;https://mmbiz.qpic.cn/mmbiz_png/rvbNscYfLzaSbKm5dqx4xAUeZusl2aecrsjVS7ic7libzicfjtwMPUoudkzGt9b3g5jD4Glytlx9XmKxVpibiaoWZF5HTkqm4UesEBeq48srHicAs/0?wx_fmt=png&amp;amp;from=appmsg&quot; data-cropselx1=&quot;0&quot; data-cropselx2=&quot;263&quot; data-cropsely1=&quot;0&quot; data-cropsely2=&quot;127&quot; data-imgfileid=&quot;100027033&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;17&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/rvbNscYfLzY36bjU0t5UBqLULGnJheClibNibOS5lw9DeararmhHxUic8icTf5DvPedda24vQWLicb7icgyPBLo6T2MdW3wEWWId7yrxpRU9usfzw/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=18&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573950205&quot; data-report-img-idx=&quot;18&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__28&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzZJoibzlXR5AYb3dlXBhaTZ8KfLsx1KungJ5H84GJTwHzjJ3L65RCojFsDYfj3DdGFnADx1IK0VFB5SOibbjmVepGFPdujjM5mWw/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=19&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027023&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;18&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzZJoibzlXR5AYb3dlXBhaTZ8KfLsx1KungJ5H84GJTwHzjJ3L65RCojFsDYfj3DdGFnADx1IK0VFB5SOibbjmVepGFPdujjM5mWw/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=19&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573950619&quot; data-report-img-idx=&quot;19&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__29&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzYh7GJou82GmvvV8KWwAjCV8ibKLoJNhicrNBAJBQ38X1HKFM4NrraFf3Atn1lkcrXbpBQVj0YtFUzNiaib0crS6SP8Nm9s0PgHt70/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=20&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027022&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;19&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzYh7GJou82GmvvV8KWwAjCV8ibKLoJNhicrNBAJBQ38X1HKFM4NrraFf3Atn1lkcrXbpBQVj0YtFUzNiaib0crS6SP8Nm9s0PgHt70/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=20&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573950620&quot; data-report-img-idx=&quot;20&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__30&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzZ68ia5NG2yicygfs6GYjpKGT6KO243KKyicP5OyCWV8Iib8MjjqbwJ82bWiaxngxicHTJNgicTUuI410RUvehRlx5icTJPpkRfSKrJ52g/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=21&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027024&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;20&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzZ68ia5NG2yicygfs6GYjpKGT6KO243KKyicP5OyCWV8Iib8MjjqbwJ82bWiaxngxicHTJNgicTUuI410RUvehRlx5icTJPpkRfSKrJ52g/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=21&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573950657&quot; data-report-img-idx=&quot;21&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__31&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzZo2hA9icqzykkIkU3Ya86rsfJ3RbicIP9YhHwP9W7QiasxYkTe2T7sH1B8ypoR7PeyF86SBH221MMD2XFUxSnKyeic1nQicqibyPPhc/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=22&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027025&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;21&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzZo2hA9icqzykkIkU3Ya86rsfJ3RbicIP9YhHwP9W7QiasxYkTe2T7sH1B8ypoR7PeyF86SBH221MMD2XFUxSnKyeic1nQicqibyPPhc/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=22&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573950657&quot; data-report-img-idx=&quot;22&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__32&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzZEFIIHj6eciat2GH3a0llrZe2pVEvSn4GHZibQqZT3y1cQqpYVyXM5uu4DicLD7q7g552waECTWyibZpaQKVP3kBkSftyTS7Dmmgo/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=23&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027026&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;22&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzZEFIIHj6eciat2GH3a0llrZe2pVEvSn4GHZibQqZT3y1cQqpYVyXM5uu4DicLD7q7g552waECTWyibZpaQKVP3kBkSftyTS7Dmmgo/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=23&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573951006&quot; data-report-img-idx=&quot;24&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__33&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzYZczicrabfCBPJ38zyjNNmHc1NxMLaJiaChWWNq05bIYic82Ln5lYr9uO8TXaboF7MZp5EiaKeshjfsBV3umf8ic7gibkaDv4dGxSSk/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=24&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027027&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;23&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzYZczicrabfCBPJ38zyjNNmHc1NxMLaJiaChWWNq05bIYic82Ln5lYr9uO8TXaboF7MZp5EiaKeshjfsBV3umf8ic7gibkaDv4dGxSSk/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=24&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573951006&quot; data-report-img-idx=&quot;23&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__34&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzadOag1LGHPjibiaS78ibPbJT0Ix1pAxMnGMKqPrkibYSicAWH1GdAMNcOWLgHDWXn5QicEKk79nX8yqWrNwhUY5zCbGMD6d8pnwTP1w/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=25&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027028&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;24&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzadOag1LGHPjibiaS78ibPbJT0Ix1pAxMnGMKqPrkibYSicAWH1GdAMNcOWLgHDWXn5QicEKk79nX8yqWrNwhUY5zCbGMD6d8pnwTP1w/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=25&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573951047&quot; data-report-img-idx=&quot;26&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__35&quot;&gt;&lt;section&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzY7DE8icibGCibCzAY1Ff3HTMa2GSU9YEpdpsNNvTt8icEwnk4gADjcnRdgMm8xtzHjEibkYZAgc7kc9cgS5kHFw2dLW1rJJDrcbjk8/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=26&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6265625&quot; data-type=&quot;jpeg&quot; data-w=&quot;640&quot; style=&quot;margin: 0px auto 8px; padding: 0px; border: 0px; max-width: 100%; display: block; border-radius: 4px; height: auto !important; visibility: visible !important; width: 312.984px !important;&quot; data-imgfileid=&quot;100027029&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;margin: 0px auto 8px;padding: 0px;border: 0px;max-width: 100%;display: block;border-radius: 4px;height: auto;&quot; data-index=&quot;25&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_jpg/rvbNscYfLzY7DE8icibGCibCzAY1Ff3HTMa2GSU9YEpdpsNNvTt8icEwnk4gADjcnRdgMm8xtzHjEibkYZAgc7kc9cgS5kHFw2dLW1rJJDrcbjk8/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=26&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573951048&quot; data-report-img-idx=&quot;25&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h1 data-track=&quot;7&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__36 js_darkmode__text__22&quot;&gt;&lt;span data-pm-slice=&quot;1 1 [&amp;quot;heading&amp;quot;,{&amp;quot;tagName&amp;quot;:&amp;quot;h1&amp;quot;,&amp;quot;attributes&amp;quot;:{&amp;quot;class&amp;quot;:&amp;quot;pgc-h-forward-slash&amp;quot;,&amp;quot;data-track&amp;quot;:&amp;quot;8&amp;quot;,&amp;quot;style&amp;quot;:&amp;quot;margin: 20px 0px; padding: 0px; border: 0px; position: relative; width: 328px; font-weight: 700; vertical-align: middle; color: rgb(34, 34, 34); font-size: 1.059em; line-height: 1.71; font-family: -apple-system, helvetica, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;&amp;quot;,&amp;quot;data-pm-slice&amp;quot;:&amp;quot;0 0 []&amp;quot;},&amp;quot;namespaceURI&amp;quot;:&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;,&amp;quot;level&amp;quot;:1,&amp;quot;data-layout-id&amp;quot;:null}]&quot; class=&quot;js_darkmode__text__23&quot;&gt;四、功能概述&lt;/span&gt;&lt;/h1&gt;&lt;h1 data-track=&quot;9&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__37 js_darkmode__text__24&quot;&gt;&lt;span class=&quot;js_darkmode__text__25&quot;&gt;核心特点&lt;/span&gt;&lt;/h1&gt;&lt;h1 data-track=&quot;18&quot; class=&quot;js_darkmode__text__26&quot;&gt;&lt;span style=&quot;color:rgba(0, 0, 0, 0.9);font-size:17px;font-family:&amp;quot;mp-quote&amp;quot;, &amp;quot;PingFang SC&amp;quot;, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;line-height:1.6;letter-spacing:0.034em;font-style:normal;font-weight:normal;&quot; class=&quot;js_darkmode__38 js_darkmode__text__27&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot; class=&quot;js_darkmode__text__28&quot;&gt;模型驱动：按业务定义主数据，减少重复建设&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p data-track=&quot;19&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__39 js_darkmode__text__29&quot;&gt;&lt;span class=&quot;js_darkmode__text__30&quot;&gt;围绕客户、供应商、物料、设备等对象配置主数据模型与字段，在统一模型下组织数据维护与查询服务。按主数据域和模型目录管理业务对象，复用平台已有的基础能力，减少反复建设维护页面、编码逻辑和查询接口的工作。&lt;/span&gt;&lt;/p&gt;&lt;h1 data-track=&quot;20&quot; class=&quot;js_darkmode__text__31&quot;&gt;&lt;span style=&quot;color:rgba(0, 0, 0, 0.9);font-size:17px;font-family:&amp;quot;mp-quote&amp;quot;, &amp;quot;PingFang SC&amp;quot;, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;line-height:1.6;letter-spacing:0.034em;font-style:normal;font-weight:normal;&quot; class=&quot;js_darkmode__40 js_darkmode__text__32&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot; class=&quot;js_darkmode__text__33&quot;&gt;统一标准：集中管理编码与取值，保持业务口径一致&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p data-track=&quot;21&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__41 js_darkmode__text__34&quot;&gt;&lt;span class=&quot;js_darkmode__text__35&quot;&gt;统一维护参考数据与编码方案，为业务分类、标准取值和编号规则提供共同依据。支持组合固定文本、业务字段、参考数据映射、日期时间与流水号等编码段，让不同业务对象的编码有规则可循，让基础信息有一致的表达方式。&lt;/span&gt;&lt;/p&gt;&lt;h1 data-track=&quot;22&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__42 js_darkmode__text__36&quot;&gt;&lt;span class=&quot;js_darkmode__text__37&quot;&gt;质量治理：定位数据问题，跟踪责任整改&lt;/span&gt;&lt;/h1&gt;&lt;p data-track=&quot;23&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__43 js_darkmode__text__38&quot;&gt;&lt;span class=&quot;js_darkmode__text__39&quot;&gt;通过基础质量规则及人工、定时质量任务检查正式主数据，定位问题记录、字段和原因。结合问题归集与整改任务，明确处理责任、跟踪整改进度；修正后可再次执行检查，把数据质量管理落实到日常维护中。&lt;/span&gt;&lt;/p&gt;&lt;h1 data-track=&quot;24&quot; class=&quot;js_darkmode__text__40&quot;&gt;&lt;span style=&quot;color:rgba(0, 0, 0, 0.9);font-size:17px;font-family:&amp;quot;mp-quote&amp;quot;, &amp;quot;PingFang SC&amp;quot;, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;line-height:1.6;letter-spacing:0.034em;font-style:normal;font-weight:normal;&quot; class=&quot;js_darkmode__44 js_darkmode__text__41&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot; class=&quot;js_darkmode__text__42&quot;&gt;开放服务：通过查询与分发，让业务系统使用主数据&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p data-track=&quot;25&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__45 js_darkmode__text__43&quot;&gt;&lt;span class=&quot;js_darkmode__text__44&quot;&gt;基于已发布模型配置&lt;/span&gt;&lt;strong style=&quot;margin: 0px;padding: 0px;border: 0px;font-weight: 700;&quot; class=&quot;js_darkmode__text__45&quot;&gt;&lt;span class=&quot;js_darkmode__text__46&quot;&gt;只读 REST API&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;js_darkmode__text__47&quot;&gt;，提供单条与分页查询，按需设置查询条件、响应字段和调用授权。支持人工或定时执行全量、增量分发，将主数据字段映射到目标 API，为业务系统提供统一的数据使用入口。&lt;/span&gt;&lt;/p&gt;&lt;h1 data-track=&quot;26&quot; class=&quot;js_darkmode__text__48&quot;&gt;&lt;span style=&quot;color:rgba(0, 0, 0, 0.9);font-size:17px;font-family:&amp;quot;mp-quote&amp;quot;, &amp;quot;PingFang SC&amp;quot;, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif;line-height:1.6;letter-spacing:0.034em;font-style:normal;font-weight:normal;&quot; class=&quot;js_darkmode__46 js_darkmode__text__49&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot; class=&quot;js_darkmode__text__50&quot;&gt;开源可扩展：理解实现方式，按项目需要二次开发&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p data-track=&quot;27&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__47 js_darkmode__text__51&quot;&gt;&lt;span class=&quot;js_darkmode__text__52&quot;&gt;采用 Java、Spring Boot 与 Vue 3 技术栈，按模型、主数据、规则质量、数据接入、服务分发等模块组织代码。开发者可以从具体业务模块入手，阅读实现、扩展质量规则或定制业务能力，复用已有的数据管理与权限基础。&lt;/span&gt;&lt;/p&gt;&lt;h1 data-track=&quot;31&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__48 js_darkmode__text__53&quot;&gt;&lt;span class=&quot;js_darkmode__text__54&quot;&gt;能力概览&lt;/span&gt;&lt;/h1&gt;&lt;p data-track=&quot;32&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__49 js_darkmode__text__55&quot;&gt;&lt;span class=&quot;js_darkmode__text__56&quot;&gt;从&lt;span class=&quot;&quot;&gt;主数据建模&lt;/span&gt;、多源接入和融合，到权威主数据维护、质量治理与跨系统共享，集中管理企业的核心业务数据。&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;js_darkmode__50 js_darkmode__text__57&quot;&gt;&lt;tbody class=&quot;js_darkmode__text__58&quot;&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__59 firstRow&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__51 js_darkmode__text__60&quot;&gt;&lt;p data-track=&quot;33&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__61&quot;&gt;&lt;span class=&quot;js_darkmode__text__62&quot;&gt;核心能力&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__52 js_darkmode__text__63&quot;&gt;&lt;p data-track=&quot;34&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__64&quot;&gt;&lt;span class=&quot;js_darkmode__text__65&quot;&gt;能力亮点&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__66&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__53 js_darkmode__text__67&quot;&gt;&lt;p data-track=&quot;35&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__68&quot;&gt;&lt;strong style=&quot;margin: 0px;padding: 0px;border: 0px;font-weight: 700;&quot; class=&quot;js_darkmode__text__69&quot;&gt;&lt;span class=&quot;js_darkmode__text__70&quot;&gt;主数据建模与标准&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__54 js_darkmode__text__71&quot;&gt;&lt;p data-track=&quot;36&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__72&quot;&gt;&lt;span class=&quot;js_darkmode__text__73&quot;&gt;按主数据域和目录管理普通模型、分类模型、1:N 子模型及模型关联。通过参考数据与编码方案统一业务取值和编号规则，通过模型版本管理跟踪结构变更。&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__74&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__55 js_darkmode__text__75&quot;&gt;&lt;p data-track=&quot;37&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__76&quot;&gt;&lt;strong style=&quot;margin: 0px;padding: 0px;border: 0px;font-weight: 700;&quot; class=&quot;js_darkmode__text__77&quot;&gt;&lt;span class=&quot;js_darkmode__text__78&quot;&gt;多源数据接入&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__56 js_darkmode__text__79&quot;&gt;&lt;p data-track=&quot;38&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__80&quot;&gt;&lt;span class=&quot;js_darkmode__text__81&quot;&gt;支持数据库全量与增量采集、Excel 和 CSV 文件导入、外部 API 拉取。将来源字段映射到模型字段，按来源记录识别变化并保留采集版本。&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__82&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__57 js_darkmode__text__83&quot;&gt;&lt;p data-track=&quot;39&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__84&quot;&gt;&lt;strong style=&quot;margin: 0px;padding: 0px;border: 0px;font-weight: 700;&quot; class=&quot;js_darkmode__text__85&quot;&gt;&lt;span class=&quot;js_darkmode__text__86&quot;&gt;匹配与多源融合&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__58 js_darkmode__text__87&quot;&gt;&lt;p data-track=&quot;40&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__88&quot;&gt;&lt;span class=&quot;js_darkmode__text__89&quot;&gt;通过精确匹配、模糊匹配和多字段加权匹配识别重复候选。按生存规则推荐字段取值，逐字段处理冲突并保留取值来源，结果经质量检查和审批后纳入权威主数据。&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__90&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__59 js_darkmode__text__91&quot;&gt;&lt;p data-track=&quot;41&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__92&quot;&gt;&lt;strong style=&quot;margin: 0px;padding: 0px;border: 0px;font-weight: 700;&quot; class=&quot;js_darkmode__text__93&quot;&gt;&lt;span class=&quot;js_darkmode__text__94&quot;&gt;权威主数据生命周期管理&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__60 js_darkmode__text__95&quot;&gt;&lt;p data-track=&quot;42&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__96&quot;&gt;&lt;span class=&quot;js_darkmode__text__97&quot;&gt;支持数据新增、变更和批量维护，通过审批管理数据及其生效、冻结、失效和归档状态。可对比历史版本并申请恢复。&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__98&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__61 js_darkmode__text__99&quot;&gt;&lt;p data-track=&quot;43&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__100&quot;&gt;&lt;strong style=&quot;margin: 0px;padding: 0px;border: 0px;font-weight: 700;&quot; class=&quot;js_darkmode__text__101&quot;&gt;&lt;span class=&quot;js_darkmode__text__102&quot;&gt;规则驱动的质量治理&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__62 js_darkmode__text__103&quot;&gt;&lt;p data-track=&quot;44&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__104&quot;&gt;&lt;span class=&quot;js_darkmode__text__105&quot;&gt;配置必填、唯一性、格式、范围和跨字段校验，手动或定时检查正式主数据。定位问题记录和字段，将整改任务派给责任人，并通过复检跟踪处理结果。&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__106&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__63 js_darkmode__text__107&quot;&gt;&lt;p data-track=&quot;45&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__108&quot;&gt;&lt;strong style=&quot;margin: 0px;padding: 0px;border: 0px;font-weight: 700;&quot; class=&quot;js_darkmode__text__109&quot;&gt;&lt;span class=&quot;js_darkmode__text__110&quot;&gt;数据分发与查询服务&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__64 js_darkmode__text__111&quot;&gt;&lt;p data-track=&quot;46&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__112&quot;&gt;&lt;span class=&quot;js_darkmode__text__113&quot;&gt;按目标系统配置数据范围与字段映射，推送全量数据、增量数据及已分发记录的生命周期变化。可发布只读 REST API，提供经授权的单条或分页查询。&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__114&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__65 js_darkmode__text__115&quot;&gt;&lt;p data-track=&quot;47&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__116&quot;&gt;&lt;strong style=&quot;margin: 0px;padding: 0px;border: 0px;font-weight: 700;&quot; class=&quot;js_darkmode__text__117&quot;&gt;&lt;span class=&quot;js_darkmode__text__118&quot;&gt;精细化授权与审计追溯&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__66 js_darkmode__text__119&quot;&gt;&lt;p data-track=&quot;48&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__120&quot;&gt;&lt;span class=&quot;js_darkmode__text__121&quot;&gt;按用户、角色或组织控制模型的行、字段和操作权限。追溯业务操作、审批过程、版本差异及权威记录对应的来源数据。&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h1 data-track=&quot;10&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__67 js_darkmode__text__122&quot;&gt;&lt;span class=&quot;js_darkmode__text__123&quot;&gt;五、技术选型&lt;/span&gt;&lt;/h1&gt;&lt;h1 data-track=&quot;11&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__68 js_darkmode__text__124&quot;&gt;&lt;span class=&quot;js_darkmode__text__125&quot;&gt;产品功能架构&lt;/span&gt;&lt;/h1&gt;&lt;p&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img class=&quot;rich_pages wxw-img js_insertlocalimg&quot; data-aistatus=&quot;1&quot; data-imgfileid=&quot;100027002&quot; data-ratio=&quot;0.5194444444444445&quot; data-s=&quot;300,640&quot; data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzb1P5CW0t9Go8R6t1SeVQ7Ev7Iz4xicKe7hiazG9QfmKFrWqk0DiaBofiaVIRibtRDibxVdqC61sHhJtCia7Vu5AMuUzCNOTrKPSDv3YU/640?wx_fmt=jpeg&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=27&quot; data-type=&quot;jpeg&quot; data-w=&quot;1080&quot; type=&quot;block&quot; data-original-style=&quot;null&quot; data-index=&quot;27&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_jpg/rvbNscYfLzb1P5CW0t9Go8R6t1SeVQ7Ev7Iz4xicKe7hiazG9QfmKFrWqk0DiaBofiaVIRibtRDibxVdqC61sHhJtCia7Vu5AMuUzCNOTrKPSDv3YU/640?wx_fmt=jpeg&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=27&quot; _width=&quot;584px&quot; __sec_open_place_holder__=&quot;true&quot; style=&quot;height: auto !important; visibility: visible !important; width: 676.984px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795573953318&quot; data-report-img-idx=&quot;27&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;/p&gt;&lt;h1 data-track=&quot;49&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__69 js_darkmode__text__126&quot;&gt;&lt;span class=&quot;js_darkmode__text__127&quot;&gt;开发与扩展&lt;/span&gt;&lt;/h1&gt;&lt;p data-track=&quot;50&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__70 js_darkmode__text__128&quot;&gt;&lt;span class=&quot;js_darkmode__text__129&quot;&gt;qData-mdm 采用前后端分离与模块化组织方式，便于开发者阅读代码、接入业务系统，并围绕实际项目需求扩展能力。&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;js_darkmode__71 js_darkmode__text__130&quot;&gt;&lt;tbody class=&quot;js_darkmode__text__131&quot;&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__132 firstRow&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__72 js_darkmode__text__133&quot;&gt;&lt;p data-track=&quot;51&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__134&quot;&gt;&lt;span class=&quot;js_darkmode__text__135&quot;&gt;层次&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__73 js_darkmode__text__136&quot;&gt;&lt;p data-track=&quot;52&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__137&quot;&gt;&lt;span class=&quot;js_darkmode__text__138&quot;&gt;主要技术&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__139&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__74 js_darkmode__text__140&quot;&gt;&lt;p data-track=&quot;53&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__141&quot;&gt;&lt;span class=&quot;js_darkmode__text__142&quot;&gt;后端&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__75 js_darkmode__text__143&quot;&gt;&lt;p data-track=&quot;54&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__144&quot;&gt;&lt;span class=&quot;js_darkmode__text__145&quot;&gt;Java、Spring Boot、Spring Security、MyBatis-Plus&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__146&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__76 js_darkmode__text__147&quot;&gt;&lt;p data-track=&quot;55&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__148&quot;&gt;&lt;span class=&quot;js_darkmode__text__149&quot;&gt;前端&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__77 js_darkmode__text__150&quot;&gt;&lt;p data-track=&quot;56&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__151&quot;&gt;&lt;span class=&quot;js_darkmode__text__152&quot;&gt;Vue 3、Element Plus、Vite&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__153&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__78 js_darkmode__text__154&quot;&gt;&lt;p data-track=&quot;57&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__155&quot;&gt;&lt;span class=&quot;js_darkmode__text__156&quot;&gt;数据存储与缓存&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__79 js_darkmode__text__157&quot;&gt;&lt;p data-track=&quot;58&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__158&quot;&gt;&lt;span class=&quot;js_darkmode__text__159&quot;&gt;关系型数据库、Redis&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__160&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__80 js_darkmode__text__161&quot;&gt;&lt;p data-track=&quot;59&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__162&quot;&gt;&lt;span class=&quot;js_darkmode__text__163&quot;&gt;接口文档与联调&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__81 js_darkmode__text__164&quot;&gt;&lt;p data-track=&quot;60&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;text-align: left;&quot; class=&quot;js_darkmode__text__165&quot;&gt;&lt;span class=&quot;js_darkmode__text__166&quot;&gt;Knife4j / OpenAPI&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;margin: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__167&quot;&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__82 js_darkmode__text__168&quot;&gt;&lt;p data-track=&quot;61&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__169&quot;&gt;&lt;span class=&quot;js_darkmode__text__170&quot;&gt;图形与统计展示&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot;margin: 0px;padding: 8px 12px;border: 1px solid rgb(232, 232, 232);vertical-align: top;font-weight: 400;text-align: left;font-size: 16px;line-height: 28px;min-height: 44px;box-sizing: border-box;&quot; class=&quot;js_darkmode__83 js_darkmode__text__171&quot;&gt;&lt;p data-track=&quot;62&quot; style=&quot;margin-top: 0px !important;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;&quot; class=&quot;js_darkmode__text__172&quot;&gt;&lt;span class=&quot;js_darkmode__text__173&quot;&gt;AntV X6、ECharts&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h1 data-track=&quot;12&quot; style=&quot;margin: 20px 0px;padding: 0px;border: 0px;width: 328px;font-weight: 700;vertical-align: middle;color: rgb(34, 34, 34);font-size: 1.059em;line-height: 1.71;font-family: -apple-system, helvetica, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__84 js_darkmode__text__174&quot;&gt;&lt;span class=&quot;js_darkmode__text__175&quot;&gt;六、源码地址&lt;/span&gt;&lt;/h1&gt;&lt;p data-track=&quot;13&quot; style=&quot;margin-top: 20px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__85 js_darkmode__text__176&quot;&gt;&lt;span class=&quot;js_darkmode__text__177&quot;&gt;开源项目地址：&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;js_darkmode__text__178&quot;&gt;&lt;span class=&quot;js_darkmode__text__179&quot;&gt;&lt;span class=&quot;wx_text_underline&quot;&gt;https://gitee.com/qiantongtech/qData-mdm&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-track=&quot;13&quot; style=&quot;margin-top: 20px;margin-right: 0px;margin-bottom: 0px !important;margin-left: 0px;padding: 0px;border: 0px;color: rgb(34, 34, 34);font-family: -apple-system, helvetica, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__86 js_darkmode__text__180&quot;&gt;&lt;span class=&quot;js_darkmode__text__181&quot;&gt;访问一飞开源：https://code.exmay.com/&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 25 Nov 2026 10:32:53 +0800</pubDate></item><item><title>ASP.NET core中的Blazor有必要学吗？</title><link>https://www.codepub.top/post/743.html</link><description>&lt;section data-tool=&quot;mdnice编辑器&quot; data-website=&quot;https://www.mdnice.com&quot; style=&quot;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__text__1&quot;&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__0 js_darkmode__text__2&quot;&gt;&lt;span class=&quot;js_darkmode__text__3&quot;&gt;某乎上问“Blazor有必要学吗？”，本文就这个问题探讨一下。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__1 js_darkmode__text__4&quot;&gt;&lt;span class=&quot;js_darkmode__text__5&quot;&gt;同一个框架，有团队两天搓出带实时串流的内部工具，也有团队写了两周全部删掉换回 MVC。两件事都发生在 2023 年，都不是个例。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__2 js_darkmode__text__6&quot;&gt;&lt;span class=&quot;js_darkmode__text__7&quot;&gt;「Blazor 有没有必要学」把两件事混成了一件：一项几天能上手的技能，和一个要押上团队与生产系统的赌注。技能几乎不要钱，赌注几乎总是亏。分开看，问题就换了一个形状。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot; class=&quot;js_darkmode__text__8&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__text__9&quot;&gt;&lt;span class=&quot;js_darkmode__text__10&quot;&gt;先确定边界画在哪&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__3 js_darkmode__text__11&quot;&gt;&lt;span class=&quot;js_darkmode__text__12&quot;&gt;剥掉 C# 与 JavaScript 之争，剩下的是所有 Web 架构都要回答的题：网络边界画在哪，谁为跨过边界付税。&lt;/span&gt;&lt;/p&gt;&lt;section data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;overflow-x: auto;&quot; class=&quot;js_darkmode__text__13&quot;&gt;&lt;table class=&quot;js_darkmode__text__14&quot;&gt;&lt;thead class=&quot;js_darkmode__text__15&quot;&gt;&lt;tr class=&quot;js_darkmode__text__16 firstRow&quot;&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__4 js_darkmode__text__17&quot;&gt;&lt;section class=&quot;js_darkmode__text__18&quot;&gt;&lt;span class=&quot;js_darkmode__text__19&quot;&gt;方案&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__5 js_darkmode__text__20&quot;&gt;&lt;section class=&quot;js_darkmode__text__21&quot;&gt;&lt;span class=&quot;js_darkmode__text__22&quot;&gt;边界位置&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__6 js_darkmode__text__23&quot;&gt;&lt;section class=&quot;js_darkmode__text__24&quot;&gt;&lt;span class=&quot;js_darkmode__text__25&quot;&gt;一次性成本&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__7 js_darkmode__text__26&quot;&gt;&lt;section class=&quot;js_darkmode__text__27&quot;&gt;&lt;span class=&quot;js_darkmode__text__28&quot;&gt;持续成本&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__8 js_darkmode__text__29&quot;&gt;&lt;section class=&quot;js_darkmode__text__30&quot;&gt;&lt;span class=&quot;js_darkmode__text__31&quot;&gt;什么时候失效&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody class=&quot;js_darkmode__text__32&quot;&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__9 js_darkmode__text__33&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__34&quot;&gt;&lt;section class=&quot;js_darkmode__text__35&quot;&gt;&lt;span class=&quot;js_darkmode__text__36&quot;&gt;前后端分离（Vue/React + API）&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__37&quot;&gt;&lt;section class=&quot;js_darkmode__text__38&quot;&gt;&lt;span class=&quot;js_darkmode__text__39&quot;&gt;HTTP / JSON&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__40&quot;&gt;&lt;section class=&quot;js_darkmode__text__41&quot;&gt;&lt;span class=&quot;js_darkmode__text__42&quot;&gt;两套工程、部署、人&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__43&quot;&gt;&lt;section class=&quot;js_darkmode__text__44&quot;&gt;&lt;span class=&quot;js_darkmode__text__45&quot;&gt;序列化与契约同步&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__46&quot;&gt;&lt;section class=&quot;js_darkmode__text__47&quot;&gt;&lt;span class=&quot;js_darkmode__text__48&quot;&gt;交互密集、对象图复杂&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__10 js_darkmode__text__49&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__50&quot;&gt;&lt;section class=&quot;js_darkmode__text__51&quot;&gt;&lt;span class=&quot;js_darkmode__text__52&quot;&gt;服务端渲染 + 局部替换（htmx 一类）&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__53&quot;&gt;&lt;section class=&quot;js_darkmode__text__54&quot;&gt;&lt;span class=&quot;js_darkmode__text__55&quot;&gt;HTML 片段&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__56&quot;&gt;&lt;section class=&quot;js_darkmode__text__57&quot;&gt;&lt;span class=&quot;js_darkmode__text__58&quot;&gt;交互粒度粗&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__59&quot;&gt;&lt;section class=&quot;js_darkmode__text__60&quot;&gt;&lt;span class=&quot;js_darkmode__text__61&quot;&gt;每次交互一次请求&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__62&quot;&gt;&lt;section class=&quot;js_darkmode__text__63&quot;&gt;&lt;span class=&quot;js_darkmode__text__64&quot;&gt;需要复杂前端状态&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__11 js_darkmode__text__65&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__66&quot;&gt;&lt;section class=&quot;js_darkmode__text__67&quot;&gt;&lt;span class=&quot;js_darkmode__text__68&quot;&gt;Blazor Server&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__69&quot;&gt;&lt;section class=&quot;js_darkmode__text__70&quot;&gt;&lt;span class=&quot;js_darkmode__text__71&quot;&gt;渲染树 diff（SignalR）&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__72&quot;&gt;&lt;section class=&quot;js_darkmode__text__73&quot;&gt;&lt;span class=&quot;js_darkmode__text__74&quot;&gt;每用户一条长连接&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__75&quot;&gt;&lt;section class=&quot;js_darkmode__text__76&quot;&gt;&lt;span class=&quot;js_darkmode__text__77&quot;&gt;服务端内存 + 往返延迟&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__78&quot;&gt;&lt;section class=&quot;js_darkmode__text__79&quot;&gt;&lt;span class=&quot;js_darkmode__text__80&quot;&gt;用户多、网络差&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__12 js_darkmode__text__81&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__82&quot;&gt;&lt;section class=&quot;js_darkmode__text__83&quot;&gt;&lt;span class=&quot;js_darkmode__text__84&quot;&gt;Blazor WASM&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__85&quot;&gt;&lt;section class=&quot;js_darkmode__text__86&quot;&gt;&lt;span class=&quot;js_darkmode__text__87&quot;&gt;程序集下载&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__88&quot;&gt;&lt;section class=&quot;js_darkmode__text__89&quot;&gt;&lt;span class=&quot;js_darkmode__text__90&quot;&gt;首屏体积&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__91&quot;&gt;&lt;section class=&quot;js_darkmode__text__92&quot;&gt;&lt;span class=&quot;js_darkmode__text__93&quot;&gt;浏览器内 CPU / 内存&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__94&quot;&gt;&lt;section class=&quot;js_darkmode__text__95&quot;&gt;&lt;span class=&quot;js_darkmode__text__96&quot;&gt;冷启动预算紧&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__13 js_darkmode__text__97&quot;&gt;&lt;span class=&quot;js_darkmode__text__98&quot;&gt;四种方案是同一笔税的不同缴法。前端框架这几年做的事，是把 JSON 那笔税变得可管理：TypeScript 生成类型，OpenAPI 生成客户端，&lt;span class=&quot;&quot;&gt;BFF&lt;/span&gt; 收敛契约，代价是两套工程、两套构建、两套监控。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__14 js_darkmode__text__99&quot;&gt;&lt;span class=&quot;js_darkmode__text__100&quot;&gt;Blazor 不优化边界，把边界推进进程内。UI 组件和后端对象活在同一个 CLR，订阅事件就是&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;&quot; class=&quot;js_darkmode__text__101&quot;&gt;&lt;span class=&quot;js_darkmode__text__102&quot;&gt;broker.OnRequest += Handle&lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;js_darkmode__text__103&quot;&gt;，没有协议、schema、版本协商。「Blazor Server 直接传对象就行」描述的是现象，省掉的不是 WebSocket 代码量，而是跨语言契约的同步成本。Vue 接 SignalR 一样能实时推送。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot; class=&quot;js_darkmode__text__104&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__text__105&quot;&gt;&lt;span class=&quot;js_darkmode__text__106&quot;&gt;「+= 就搞定」的四条代价&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__15 js_darkmode__text__107 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__16 js_darkmode__text__109&quot;&gt;&lt;span class=&quot;js_darkmode__text__110&quot;&gt;每个在线用户占一条长连接加一份组件状态，内存按并发用户数算，不按 QPS 算。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__17 js_darkmode__text__112&quot;&gt;&lt;span class=&quot;js_darkmode__text__113&quot;&gt;每次交互是一次网络往返加服务端渲染，用户离服务器越远越贵。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__18 js_darkmode__text__115&quot;&gt;&lt;span class=&quot;js_darkmode__text__116&quot;&gt;多实例部署需要&lt;span class=&quot;&quot;&gt;粘性会话&lt;/span&gt;，扩容不是加机器那么简单。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__19 js_darkmode__text__118&quot;&gt;&lt;span class=&quot;js_darkmode__text__119&quot;&gt;连接断掉就是中断，不是降级。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__20 js_darkmode__text__120&quot;&gt;&lt;span class=&quot;js_darkmode__text__121&quot;&gt;这四条对「内网、用户少、服务器近」的场景不敏感，broker 工具能跑得快，是因为它把前提全占齐了。同一套代码后来挪到跨地区场景，在线人数涨到两百多，一半在另一个城市。首屏和每次交互都开始能感觉到延迟，投诉集中在「点一下要等半秒」。翻日志才确认是 SignalR 往返在作祟。内网里感觉不到的税，出了内网立刻记账。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__21 js_darkmode__text__122&quot;&gt;&lt;span class=&quot;js_darkmode__text__123&quot;&gt;&lt;span class=&quot;&quot;&gt;.NET 8&lt;/span&gt; 的自动交互模式，首屏由服务端渲染并接管交互，后台下载 WASM，之后交互在浏览器里跑，渲染层切换做到了无缝。状态层做不到：在服务端订阅的对象事件，切到浏览器进程就不存在了。能无缝切换的是谁来渲染，不是数据从哪来。写得越贴近同进程红利，切换时改动越大。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot; class=&quot;js_darkmode__text__124&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__text__125&quot;&gt;&lt;span class=&quot;js_darkmode__text__126&quot;&gt;&lt;span class=&quot;&quot;&gt;Silverlight&lt;/span&gt; 的类比只对了一半&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__22 js_darkmode__text__127&quot;&gt;&lt;span class=&quot;js_darkmode__text__128&quot;&gt;不成立的一半是死因：Silverlight 靠插件，用户得先装运行时，移动端直接出局；Blazor 用浏览器原生的 WebAssembly，不用装，手机也能跑。成立的一半是供给结构：技术采纳由厂商营销推动，招聘长期个位数，没有团队为它扩编，也没有公司建培训体系。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__23 js_darkmode__text__129&quot;&gt;&lt;span class=&quot;js_darkmode__text__130&quot;&gt;更准确的说法是：WASM 不会消失，浏览器厂商还在投；但「用 C# 写前端」这条产品路线，下限比 Silverlight 高，上限没被验证。混着说，就会得出「要么必然成功要么必然失败」这种没有信息量的结论。微软从 Silverlight 到 LightSwitch 再到 Xamarin.Forms，都是高调推出、安静退场，文档首页的曝光度并不能预测存活期。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot; class=&quot;js_darkmode__text__131&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__text__132&quot;&gt;&lt;span class=&quot;js_darkmode__text__133&quot;&gt;AI 把两端的成本又改了一遍&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__24 js_darkmode__text__134&quot;&gt;&lt;span class=&quot;js_darkmode__text__135&quot;&gt;开头那句「技能几乎不要钱」，到 2026 年更成立。上手期被压缩了：以前读文档，现在把需求丢给 AI 就能拿到能跑的组件代码。学这一端，成本还在往下掉。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__25 js_darkmode__text__136&quot;&gt;&lt;span class=&quot;js_darkmode__text__137&quot;&gt;同一把剪刀也剪到了对面。让后端学 Vue、生成 OpenAPI 客户端、维护两套构建，这些原本要「雇两拨人」的活，AI 承担了一部分。「一个人顶一个前后端小队」的杠杆还在，但小队那边也有 AI，杠杆没有早年那么夸张。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__26 js_darkmode__text__138&quot;&gt;&lt;span class=&quot;js_darkmode__text__139&quot;&gt;真正抬高权重的是语料。AI 写代码的准确率，取决于训练数据里见过多少同类模式。就公开可见的代码与问答量看，React、Vue 的体量远大于 Blazor。「出了坑没有足够多的人替你踩过」这句话，现在要补半句：也没有足够多的语料让 AI 学过这个坑。遇到冷门问题，搜索结果少，AI 也容易给出似是而非的答案。这是生态小在 AI 时代的新税。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__27 js_darkmode__text__140&quot;&gt;&lt;span class=&quot;js_darkmode__text__141&quot;&gt;AI 没有移动边界，只改了边界两边的价格。边界在进程内，红利照旧；生态小这一项，从「招人难」扩展成了「招人难加辅助弱」。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot; class=&quot;js_darkmode__text__142&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__text__143&quot;&gt;&lt;span class=&quot;js_darkmode__text__144&quot;&gt;效率跟着用户规模走&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__28 js_darkmode__text__145&quot;&gt;&lt;span class=&quot;js_darkmode__text__146&quot;&gt;同一份代码，内网是神器，公网是事故。判断依据只有一句：用户是不是被困在同一张网、同一台服务器、同一批人里。是，Blazor Server 几乎最省事；不是，账立刻来：Server 模式是 SignalR 往返延迟，WASM 模式是首屏下载程序集和运行时。领导不关心原因，只记得系统慢。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__29 js_darkmode__text__147&quot;&gt;&lt;span class=&quot;js_darkmode__text__148&quot;&gt;Unity WebGL 是同构案例：运行时搬进浏览器，产物几十 MB，首屏几十秒，行业共识是能跑但不适合公开站点。htmx 重新流行，恰恰因为不搬运行时，只把边界留在服务端，代价是交互粒度变粗。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot; class=&quot;js_darkmode__text__149&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__text__150&quot;&gt;&lt;span class=&quot;js_darkmode__text__151&quot;&gt;市场给这项技能定的价&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__30 js_darkmode__text__152&quot;&gt;&lt;span class=&quot;js_darkmode__text__153&quot;&gt;技能价格不由难度决定，由工位的稀缺度决定。Blazor 稀缺，原因是没什么人需要，不是供不应求。2023 年的一份招聘抽样里，相关岗位全国个位数，薪资也不高（样本时效久，此处未做更新核实）。学会它不会多一个面试机会，但会在某个特定面试里变成加分项。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__31 js_darkmode__text__154&quot;&gt;&lt;span class=&quot;js_darkmode__text__155&quot;&gt;两类人的结论相反：只有 .NET 背景、独立交付内部工具的人，回报极高；有成熟前端能力、在大团队做公众产品的人，回报接近零，同事看不懂，招不到人接手，现成组件库一个都用不上。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__32 js_darkmode__text__156&quot;&gt;&lt;span class=&quot;js_darkmode__text__157&quot;&gt;该警惕的是把学当成押注。学是几天加一个 side project，押注是把生产系统、团队技能、招聘渠道全绑上去，两者风险差几个数量级。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot; class=&quot;js_darkmode__text__158&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__text__159&quot;&gt;&lt;span class=&quot;js_darkmode__text__160&quot;&gt;一张表，判断现状是否适用&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;section data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;overflow-x: auto;&quot; class=&quot;js_darkmode__text__161&quot;&gt;&lt;table class=&quot;js_darkmode__text__162&quot;&gt;&lt;thead class=&quot;js_darkmode__text__163&quot;&gt;&lt;tr class=&quot;js_darkmode__text__164 firstRow&quot;&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__33 js_darkmode__text__165&quot;&gt;&lt;section class=&quot;js_darkmode__text__166&quot;&gt;&lt;span class=&quot;js_darkmode__text__167&quot;&gt;你的处境&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__34 js_darkmode__text__168&quot;&gt;&lt;section class=&quot;js_darkmode__text__169&quot;&gt;&lt;span class=&quot;js_darkmode__text__170&quot;&gt;结论&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody class=&quot;js_darkmode__text__171&quot;&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__35 js_darkmode__text__172&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__173&quot;&gt;&lt;section class=&quot;js_darkmode__text__174&quot;&gt;&lt;span class=&quot;js_darkmode__text__175&quot;&gt;内网工具，用户几十到几百，服务器同城&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__176&quot;&gt;&lt;section class=&quot;js_darkmode__text__177&quot;&gt;&lt;span class=&quot;js_darkmode__text__178&quot;&gt;值得用 Server，性价比极高&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__36 js_darkmode__text__179&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__180&quot;&gt;&lt;section class=&quot;js_darkmode__text__181&quot;&gt;&lt;span class=&quot;js_darkmode__text__182&quot;&gt;需要实时进度、日志串流、状态推送&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__183&quot;&gt;&lt;section class=&quot;js_darkmode__text__184&quot;&gt;&lt;span class=&quot;js_darkmode__text__185&quot;&gt;值得用，省掉整套协议设计&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__37 js_darkmode__text__186&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__187&quot;&gt;&lt;section class=&quot;js_darkmode__text__188&quot;&gt;&lt;span class=&quot;js_darkmode__text__189&quot;&gt;团队只有 .NET 背景，没有前端&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__190&quot;&gt;&lt;section class=&quot;js_darkmode__text__191&quot;&gt;&lt;span class=&quot;js_darkmode__text__192&quot;&gt;值得用，比逼后端学 Vue 现实&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__38 js_darkmode__text__193&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__194&quot;&gt;&lt;section class=&quot;js_darkmode__text__195&quot;&gt;&lt;span class=&quot;js_darkmode__text__196&quot;&gt;面向公众的站点，首屏预算是硬指标&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__197&quot;&gt;&lt;section class=&quot;js_darkmode__text__198&quot;&gt;&lt;span class=&quot;js_darkmode__text__199&quot;&gt;不要用 WASM 模式&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__39 js_darkmode__text__200&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__201&quot;&gt;&lt;section class=&quot;js_darkmode__text__202&quot;&gt;&lt;span class=&quot;js_darkmode__text__203&quot;&gt;用户分散、网络质量不可控&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__204&quot;&gt;&lt;section class=&quot;js_darkmode__text__205&quot;&gt;&lt;span class=&quot;js_darkmode__text__206&quot;&gt;不要用 Server 模式&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__40 js_darkmode__text__207&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__208&quot;&gt;&lt;section class=&quot;js_darkmode__text__209&quot;&gt;&lt;span class=&quot;js_darkmode__text__210&quot;&gt;已有成熟前端团队和组件体系&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__211&quot;&gt;&lt;section class=&quot;js_darkmode__text__212&quot;&gt;&lt;span class=&quot;js_darkmode__text__213&quot;&gt;不要引入，收益为负&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__41 js_darkmode__text__214&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__215&quot;&gt;&lt;section class=&quot;js_darkmode__text__216&quot;&gt;&lt;span class=&quot;js_darkmode__text__217&quot;&gt;需要重度浏览器 API（Canvas、WebGL）&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__218&quot;&gt;&lt;section class=&quot;js_darkmode__text__219&quot;&gt;&lt;span class=&quot;js_darkmode__text__220&quot;&gt;谨慎，JS 互操作会吃掉红利&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__42 js_darkmode__text__221&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__222&quot;&gt;&lt;section class=&quot;js_darkmode__text__223&quot;&gt;&lt;span class=&quot;js_darkmode__text__224&quot;&gt;要靠这门技术找工作&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__text__225&quot;&gt;&lt;section class=&quot;js_darkmode__text__226&quot;&gt;&lt;span class=&quot;js_darkmode__text__227&quot;&gt;不要作为主打技能&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot; class=&quot;js_darkmode__text__228&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot; class=&quot;js_darkmode__text__229&quot;&gt;&lt;span class=&quot;js_darkmode__text__230&quot;&gt;上手前先处理这几条&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__43 js_darkmode__text__231 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__44 js_darkmode__text__233&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__45 js_darkmode__text__234&quot;&gt;&lt;span class=&quot;js_darkmode__text__235&quot;&gt;多实例部署配粘性会话&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;js_darkmode__text__236&quot;&gt;，否则 circuit 落到没有状态的实例上。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__46 js_darkmode__text__238&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__47 js_darkmode__text__239&quot;&gt;&lt;span class=&quot;js_darkmode__text__240&quot;&gt;预渲染让&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;&quot; class=&quot;js_darkmode__text__241&quot;&gt;&lt;span class=&quot;js_darkmode__text__242&quot;&gt;OnInitialized&lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;js_darkmode__text__243&quot;&gt;&amp;nbsp;执行两次&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;js_darkmode__text__244&quot;&gt;，带副作用的逻辑做成幂等，或挪到&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;&quot; class=&quot;js_darkmode__text__245&quot;&gt;&lt;span class=&quot;js_darkmode__text__246&quot;&gt;OnAfterRender&lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;js_darkmode__text__247&quot;&gt;。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__48 js_darkmode__text__249&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__49 js_darkmode__text__250&quot;&gt;&lt;span class=&quot;js_darkmode__text__251&quot;&gt;长连接显式处理重连&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;js_darkmode__text__252&quot;&gt;，断线期间的事件会丢，重连后拉一次全量状态对齐。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__50 js_darkmode__text__254&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__51 js_darkmode__text__255&quot;&gt;&lt;span class=&quot;js_darkmode__text__256&quot;&gt;按并发 circuit 数估算内存&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;js_darkmode__text__257&quot;&gt;，不要按 QPS，这是两套容量模型。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;&quot; class=&quot;js_darkmode__52 js_darkmode__text__259&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__53 js_darkmode__text__260&quot;&gt;&lt;span class=&quot;js_darkmode__text__261&quot;&gt;公开站点不用 WASM 首屏&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;js_darkmode__text__262&quot;&gt;，体积税只能缓解不能消除。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__54 js_darkmode__text__263&quot;&gt;&lt;span class=&quot;js_darkmode__text__264&quot;&gt;真正出过问题的是预渲染那条。启用后，订阅服务事件的组件打开页面注册了两次回调，进度推一次走两遍，日志里同一个 ID 出现两行。修法是把订阅挪到&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;&quot; class=&quot;js_darkmode__text__265&quot;&gt;&lt;span class=&quot;js_darkmode__text__266&quot;&gt;OnAfterRender(firstRender: true)&lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;js_darkmode__text__267&quot;&gt;，组件释放时退订。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__55 js_darkmode__text__268&quot;&gt;&lt;span class=&quot;js_darkmode__text__269&quot;&gt;回到最初那个问题。Blazor 的效率红利是真的，前提只有一个：边界在进程内。条件成立，它是 .NET 生态里最省事的 UI 方案；不成立，就是一层没人愿意维护的抽象。先确认边界在哪，再决定要不要用。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__56 js_darkmode__text__270&quot;&gt;&lt;span class=&quot;js_darkmode__text__271&quot;&gt;你手上那个系统，状态是在两端之间来回搬，还是本来就长在同一台服务器上？把对应的场景写出来，比争论框架名字有信息量。&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__57 js_darkmode__text__272&quot;&gt;&lt;span class=&quot;js_darkmode__text__273&quot;&gt;在AI时代，还需要判断吗？交给AI吧。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 25 Nov 2026 09:47:17 +0800</pubDate></item><item><title>别再数点号了：迪米特法则在 .NET 里的真正边界</title><link>https://www.codepub.top/post/741.html</link><description>&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;code style=&quot;color: rgb(14, 138, 235); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none left top / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;.Customer.Address.City&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;这种点号连成一串的写法，在任何跑过两三年的 .NET 项目里都能搜出不少。它编译通过，跑起来也没毛病。麻烦出在需求变更那天：结构改一次，得靠全局搜索才知道要动多少处。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;迪米特法则（&lt;span class=&quot;&quot;&gt;Law of Demeter&lt;/span&gt;）处理的正是这件事。它不管性能，不管并发，只管一个问题：一个类该知道多少别的类的内部结构。常被压缩成一句话，「只跟直接朋友说话」。这句话太短，短到大多数人照着做，做出来的是另一种坏代码。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 18px; color: #0E88EB; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;四个点号，四层依赖&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;下面这套订阅续费模型是示意代码，不对应任何真实系统。&lt;/span&gt;&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 10px 0px; padding: 0px; visibility: visible;&quot;&gt;&lt;code style=&quot;overflow-x: auto; padding: 16px; background: rgb(30, 30, 30); color: rgb(220, 220, 220); display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;sealed&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;PaymentCard&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;string&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;Last4 {&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; } =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #D69D85; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;DateOnly ExpiresOn {&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; }&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;bool&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;IsActive {&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; }&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;sealed&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;BillingProfile&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;PaymentCard? DefaultCard {&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; }&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;string&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;Country {&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; } =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #D69D85; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;sealed&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Account&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;BillingProfile Billing {&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; } =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;();&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;bool&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;IsFrozen {&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; }&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;sealed&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Subscription&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;Account Account {&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; } =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;();&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;DateOnly TrialEndsOn {&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; }&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;续费判断通常写成这样：&lt;/span&gt;&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 10px 0px; padding: 0px; visibility: visible;&quot;&gt;&lt;code style=&quot;overflow-x: auto; padding: 16px; background: rgb(30, 30, 30); color: rgb(220, 220, 220); display: -webkit-box; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;color: #DCDCDC; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;bool&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;CanRenew&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;Subscription sub, DateOnly today&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;(sub.TrialEndsOn &amp;gt;= today)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #57A64A; font-style: italic; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;// 试用期内不扣款&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;(sub.Account.IsFrozen)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #57A64A; font-style: italic; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;// 账户被冻结&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;card = sub.Account.Billing.DefaultCard;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;(card&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;is&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;null&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;|| !card.IsActive)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #57A64A; font-style: italic; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;// 没有可用卡&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;(card.ExpiresOn &amp;lt;= today)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #57A64A; font-style: italic; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;// 卡过期&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569CD6; line-height: 26px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;true&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;br style=&quot;visibility: visible;&quot;/&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;语法没问题，逻辑也对。问题在&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color: rgb(14, 138, 235); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none left top / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;var card = sub.Account.Billing.DefaultCard;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;这一行。&lt;/span&gt;&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0); font-size: 15px; line-height: 1.8em; letter-spacing: 0em; text-align: left; text-indent: 0em; margin: 0px; padding: 8px 0px; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;code style=&quot;color: rgb(14, 138, 235); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none left top / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;CanRenew&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;同时知道四件事：Subscription 有 Account、Account 有 Billing、Billing 有 DefaultCard、Card 有&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color: rgb(14, 138, 235); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none left top / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;IsActive&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;和&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color: rgb(14, 138, 235); font-size: 14px; line-height: 1.8em; letter-spacing: 0em; background: none left top / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05); width: auto; height: auto; margin: 0px 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4); border-radius: 4px; overflow-wrap: break-word; font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace; word-break: break-all; visibility: visible;&quot; class=&quot;js_darkmode__13&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;ExpiresOn&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;。这四件事里只有最后一件与「这单能不能续费」直接相关，前三件纯粹是导航。需求一旦变成「卡到期前 30 天停止自动扣款」，改动点落在这段代码正中间。如果后台、通知、对账三个服务各留了一份同样的判断，这次改动就要出现三遍，少改一遍的后果不是编译失败，是账目对不上。&lt;/span&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin: 30px 0px 15px; padding: 0px; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 18px; color: #0E88EB; line-height: 1.5em; letter-spacing: 0em; text-align: left; font-weight: bold; display: block; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;三种改了等于没改的重构&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__15&quot;&gt;把链条原封不动下移一层。&lt;/strong&gt;&amp;nbsp;一种常见改法是这样：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;background: #1E1E1E;color: #DCDCDC;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;sealed&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;Subscription&lt;/span&gt;&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;bool&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;CanRenew&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;DateOnly today&lt;/span&gt;)&lt;/span&gt;&amp;nbsp;=&amp;gt; Account.CanRenew(today);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;sealed&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;Account&lt;/span&gt;&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;bool&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;CanRenew&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;DateOnly today&lt;/span&gt;)&lt;/span&gt;&amp;nbsp;=&amp;gt; !IsFrozen &amp;amp;&amp;amp; Billing.CanRenew(today);&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__17&quot;&gt;一行拆成三行，散在三个类里。耦合度一点没降：&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__18&quot;&gt;Account.CanRenew&lt;/code&gt;&amp;nbsp;依然只有&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__19&quot;&gt;Billing&lt;/code&gt;&amp;nbsp;改了才能正确工作，&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__20&quot;&gt;Billing.CanRenew&lt;/code&gt;&amp;nbsp;依然知道&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__21&quot;&gt;DefaultCard&lt;/code&gt;&amp;nbsp;的存在。判断是不是转发层，有个土办法：把新加的这层方法删掉，看调用方是不是还得自己把点号重新写一遍。如果答案是「是」，那它只是把点号换了个位置。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__22&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__23&quot;&gt;把&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__24&quot;&gt;private set&lt;/code&gt;&amp;nbsp;当封装。&lt;/strong&gt;&amp;nbsp;写成&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__25&quot;&gt;public Shipment Shipment { get; private set; }&lt;/code&gt;&amp;nbsp;只挡住了赋值，挡不住读。调用方照样能写&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__26&quot;&gt;order.Shipment.IsShipped()&lt;/code&gt;，然后自己决定要不要取消这笔订单。读权限泄露结构的速度比写权限快得多，因为读不需要任何许可。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__27&quot;&gt;&lt;strong style=&quot;color: rgb(14, 136, 235);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot; class=&quot;js_darkmode__28&quot;&gt;状态机只写了一半。&lt;/strong&gt;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__29&quot;&gt;OrderStatus&lt;/code&gt;&amp;nbsp;里只有&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__30&quot;&gt;Pending&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__31&quot;&gt;Cancelled&lt;/code&gt;&amp;nbsp;两个值，而&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__32&quot;&gt;Status&lt;/code&gt;&amp;nbsp;的赋值点也只有两处：构造函数给&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__33&quot;&gt;Pending&lt;/code&gt;，&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__34&quot;&gt;Cancel()&lt;/code&gt;&amp;nbsp;给&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__35&quot;&gt;Cancelled&lt;/code&gt;。于是一个已经发货的订单，&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__36&quot;&gt;Status&lt;/code&gt;&amp;nbsp;仍然是&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__37&quot;&gt;Pending&lt;/code&gt;。取消逻辑里那句「已发货不能取消」读的是&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__38&quot;&gt;Shipment.IsShipped()&lt;/code&gt;，不是&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__39&quot;&gt;Order.Status&lt;/code&gt;。同一笔订单的发货状态，在&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__40&quot;&gt;Order&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__41&quot;&gt;Shipment&lt;/code&gt;&amp;nbsp;里各存了一份语义，两边随时可能打架。发货对一个订单来说更像一次&lt;span class=&quot;&quot;&gt;状态迁移&lt;/span&gt;，而不是一个可以独立存在的外部对象，这股味道比点号数量值得警惕得多。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;该收敛还是该保留，看链上有没有业务规则&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__42&quot;&gt;点号多不多，从来不是判据。真正要看的，是这条链上有没有挂着一个属于业务规则的条件判断。&lt;/p&gt;&lt;p&gt;&lt;section data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;overflow-x: auto;&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__43&quot;&gt;&lt;section&gt;写法&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__44&quot;&gt;&lt;section&gt;处理&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none left top / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;&quot; class=&quot;js_darkmode__45&quot;&gt;&lt;section&gt;理由&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__46&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;code&gt;sub.Account.Billing.DefaultCard&lt;/code&gt;&lt;section&gt;，链上是别的聚合的实体&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;收敛成语义方法&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;实体结构会跟着需求变&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__47&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;链上挂着业务规则（能否扣款、能否取消）&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;必须收敛&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;规则散落必然漏改&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__48&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;code&gt;DateTime.UtcNow.Year&lt;/code&gt;&lt;section&gt;、&lt;code&gt;Math.Round(x, 2)&lt;/code&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;保留&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;结构由 BCL 固定，包一层是噪音&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__49&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;LINQ、&lt;code&gt;StringBuilder&lt;/code&gt;、builder 模式&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;保留&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;点号是接口设计，不是对象图&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__50&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;code&gt;IQueryable&lt;/code&gt;&lt;section&gt;&amp;nbsp;里的&amp;nbsp;&lt;code&gt;Select(o =&amp;gt; o.Customer.Address.City)&lt;/code&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;保留&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;翻译成 SQL，不加载实体&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__51&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;纯转发的&amp;nbsp;&lt;code&gt;Order.GetCity() =&amp;gt; _customer.GetCity()&lt;/code&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;不要&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;耦合没降，只多一个文件&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;&quot; class=&quot;js_darkmode__52&quot;&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;对外暴露的导航属性&amp;nbsp;&lt;code&gt;public Shipment Shipment { get; }&lt;/code&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;改 private 字段&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;&quot;&gt;&lt;section&gt;读权限同样泄露结构&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;把规则收进它该在的类&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__53&quot;&gt;重写之后，每个类只对外回答自己能负责的那个问题。&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;background: #1E1E1E;color: #DCDCDC;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__54&quot;&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// Domain.cs&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;using&lt;/span&gt;&amp;nbsp;System;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 卡只判断自己今天还能不能用，有效期规则只有这一处&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;sealed&lt;/span&gt;&amp;nbsp;record&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;PaymentCard&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;string&lt;/span&gt;&amp;nbsp;Last4, DateOnly ExpiresOn,&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;bool&lt;/span&gt;&amp;nbsp;IsActive&lt;/span&gt;)&lt;/span&gt;&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;bool&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;IsUsableOn&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;DateOnly today&lt;/span&gt;)&lt;/span&gt;&amp;nbsp;=&amp;gt; IsActive &amp;amp;&amp;amp; ExpiresOn &amp;gt; today;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;sealed&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;BillingProfile&lt;/span&gt;&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;readonly&lt;/span&gt;&amp;nbsp;PaymentCard? _defaultCard;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;BillingProfile&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;PaymentCard? defaultCard&lt;/span&gt;)&lt;/span&gt;&amp;nbsp;=&amp;gt; _defaultCard = defaultCard;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 对外只回答能不能扣款，卡对象本身不出这个类&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;bool&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;HasUsableCard&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;DateOnly today&lt;/span&gt;)&lt;/span&gt;&amp;nbsp;=&amp;gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _defaultCard&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;is&lt;/span&gt;&amp;nbsp;not&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;null&lt;/span&gt;&amp;nbsp;&amp;amp;&amp;amp; _defaultCard.IsUsableOn(today);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;sealed&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;Account&lt;/span&gt;&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;readonly&lt;/span&gt;&amp;nbsp;BillingProfile _billing;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;Account&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;BillingProfile billing,&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;bool&lt;/span&gt;&amp;nbsp;isFrozen&lt;/span&gt;)&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _billing = billing;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IsFrozen = isFrozen;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;bool&lt;/span&gt;&amp;nbsp;IsFrozen {&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;get&lt;/span&gt;; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;bool&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;CanBeChargedOn&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;DateOnly today&lt;/span&gt;)&lt;/span&gt;&amp;nbsp;=&amp;gt; !IsFrozen &amp;amp;&amp;amp; _billing.HasUsableCard(today);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;enum&lt;/span&gt;&amp;nbsp;RenewalOutcome&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; ReadyToCharge,&lt;br/&gt;&amp;nbsp; &amp;nbsp; InTrial,&lt;br/&gt;&amp;nbsp; &amp;nbsp; Blocked&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;sealed&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;Subscription&lt;/span&gt;&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;readonly&lt;/span&gt;&amp;nbsp;Account _account;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;Subscription&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;Account account, DateOnly trialEndsOn&lt;/span&gt;)&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _account = account;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TrialEndsOn = trialEndsOn;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;DateOnly TrialEndsOn {&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;get&lt;/span&gt;; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 试用期和扣款条件在这里合成一个业务结论，调用方不必知道判断顺序&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;public&lt;/span&gt;&amp;nbsp;RenewalOutcome&amp;nbsp;&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;EvaluateRenewal&lt;/span&gt;(&lt;span style=&quot;color: #DCDCDC;line-height: 26px;&quot;&gt;DateOnly today&lt;/span&gt;)&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(today &amp;lt;= TrialEndsOn)&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;RenewalOutcome.InTrial;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(!_account.CanBeChargedOn(today))&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;RenewalOutcome.Blocked;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;RenewalOutcome.ReadyToCharge;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__55&quot;&gt;调用方只剩一行：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;background: #1E1E1E;color: #DCDCDC;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__56&quot;&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// Program.cs&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;using&lt;/span&gt;&amp;nbsp;System;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;card =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;PaymentCard(&lt;span style=&quot;color: #D69D85;line-height: 26px;&quot;&gt;&amp;quot;4242&amp;quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;DateOnly(&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;2027&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;3&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;31&lt;/span&gt;), IsActive:&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;true&lt;/span&gt;);&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;account =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Account(&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;BillingProfile(card), isFrozen:&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;false&lt;/span&gt;);&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;subscription =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Subscription(account, trialEndsOn:&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;DateOnly(&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;2026&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;1&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;1&lt;/span&gt;));&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;today =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;DateOnly(&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;2026&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;6&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #B8D7A3;line-height: 26px;&quot;&gt;1&lt;/span&gt;);&lt;br/&gt;Console.WriteLine(subscription.EvaluateRenewal(today)); &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// ReadyToCharge&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;frozen =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Account(&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;BillingProfile(card), isFrozen:&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;true&lt;/span&gt;);&lt;br/&gt;Console.WriteLine(&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Subscription(frozen, today).EvaluateRenewal(today)); &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// Blocked&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__57&quot;&gt;环境是&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__58&quot;&gt;.NET 8&lt;/code&gt;&amp;nbsp;控制台项目（&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__59&quot;&gt;dotnet new console -f net8.0&lt;/code&gt;），没有第三方依赖。&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__60&quot;&gt;DateOnly&lt;/code&gt;&amp;nbsp;要求 .NET 6 及以上；领域类如果和顶级语句塞进同一个文件，会报 CS8803，拆成&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__61&quot;&gt;Domain.cs&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__62&quot;&gt;Program.cs&lt;/code&gt;&amp;nbsp;最省事。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__63&quot;&gt;几个容易忽略的点：&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__64&quot;&gt;EvaluateRenewal&lt;/code&gt;&amp;nbsp;返回枚举而不是&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__65&quot;&gt;bool&lt;/code&gt;，「试用期内」和「被拦截」在业务上是两回事，压成&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__66&quot;&gt;false&lt;/code&gt;&amp;nbsp;之后前端只能弹一句笼统的失败提示；&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__67&quot;&gt;BillingProfile&lt;/code&gt;&amp;nbsp;不再交出卡对象，想绕开它自己判断，只能去改&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__68&quot;&gt;BillingProfile&lt;/code&gt;；将来要加「卡到期前 30 天停止扣款」，动&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__69&quot;&gt;IsUsableOn&lt;/code&gt;&amp;nbsp;一行即可，上层结构不动。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__70&quot;&gt;关键的不是方法变少了。关键是&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__71&quot;&gt;EvaluateRenewal&lt;/code&gt;&amp;nbsp;把两个原本散在不同层次的条件（试用期、扣款资格）合成了一个业务结论，调用方拿到的从「卡的到期日是哪天」变成了「这单能不能续」。这也是判断一次重构成不成立的标尺：收敛之后，返回值应该是一句业务语言，不是一段结构路径。&lt;/p&gt;&lt;h3 data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;&quot;&gt;&lt;span style=&quot;font-size: 18px;color: #0E88EB;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;&quot;&gt;这几处不该套用&lt;/span&gt;&lt;/h3&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__72&quot;&gt;实体图投影在查询表达式里是安全的，因为&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__73&quot;&gt;IQueryable&lt;/code&gt;&amp;nbsp;会把整条链翻译成 SQL，不产生对象导航：&lt;/p&gt;&lt;pre data-tool=&quot;mdnice编辑器&quot; style=&quot;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;&quot;&gt;&lt;code style=&quot;overflow-x: auto;padding: 16px;background: #1E1E1E;color: #DCDCDC;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;&quot; class=&quot;js_darkmode__74&quot;&gt;&lt;span style=&quot;color: #57A64A;font-style: italic;line-height: 26px;&quot;&gt;// 正常写法：表达式树直译成 SQL，实体根本不进内存&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;cities =&amp;nbsp;&lt;span style=&quot;color: #569CD6;line-height: 26px;&quot;&gt;await&lt;/span&gt;&amp;nbsp;db.Orders&lt;br/&gt;&amp;nbsp; &amp;nbsp; .Where(o =&amp;gt; o.CreatedOn &amp;gt;= since)&lt;br/&gt;&amp;nbsp; &amp;nbsp; .Select(o =&amp;gt; o.Customer.Address.City)&lt;br/&gt;&amp;nbsp; &amp;nbsp; .ToListAsync();&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__75&quot;&gt;为了「守法则」把它包成&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__76&quot;&gt;o.Customer.GetCity()&lt;/code&gt;，EF Core 通常无法翻译自定义方法，只会抛&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__77&quot;&gt;InvalidOperationException&lt;/code&gt;，或者退化成客户端求值，把整张订单表拉进内存。查询里的点号描述的是查询，不是对象图。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__78&quot;&gt;值对象同理。&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__79&quot;&gt;DateTime.UtcNow.Year&lt;/code&gt;、&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__80&quot;&gt;decimal.Round(x, 2)&lt;/code&gt;&amp;nbsp;这类结构由 BCL 保证稳定，包一层只会让读代码的人多跳一次文件。fluent API 更是反例：&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__81&quot;&gt;new StringBuilder().Append(&amp;quot;a&amp;quot;).Append(&amp;quot;b&amp;quot;)&lt;/code&gt;&amp;nbsp;的链是接口设计本身，拆开就废了。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__82&quot;&gt;迪米特法则真正约束的，是「A 类为了完成自己的职责，去翻 B 类内部对象的内部对象」。一旦链上出现业务规则，它迟早会散成多份；链上只有导航，它随时会随字段一起搬家。两种情况的处理方式相反，用同一个「超过两个点就重构」的规则去套，产出的只会是一堆转发方法。&lt;/p&gt;&lt;p data-tool=&quot;mdnice编辑器&quot; style=&quot;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;&quot; class=&quot;js_darkmode__83&quot;&gt;你项目里点号最长的那条链，上面挂的是业务规则还是纯导航？转给那位习惯写&amp;nbsp;&lt;code style=&quot;color: rgb(14, 138, 235);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: left;background-position-y: top;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: &amp;#39;Operator Mono&amp;#39;, Consolas, Monaco, Menlo, monospace;word-break: break-all;&quot; class=&quot;js_darkmode__84&quot;&gt;a.b.c&lt;/code&gt;&amp;nbsp;的同事，一起对一遍。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Tue, 24 Nov 2026 12:21:05 +0800</pubDate></item><item><title>.NET 11 新特性｜C# 15 联合类型：把「多种可能」写进类型</title><link>https://www.codepub.top/post/740.html</link><description>&lt;p style=&quot;font-size: 16.5px; color: rgb(76, 29, 149); line-height: 1.75em; font-weight: 400; padding: 0px; margin: 0px 0px 16px; letter-spacing: 0.2px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; text-align: left; overflow-wrap: break-word; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;上一篇《.NET 11 正式发布 新功能全览》从&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;运行时&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;、语言到框架浏览了 .NET 11 的变化。现在把镜头推近，第一站是 C# 15 的&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;联合&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;类型&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(71, 68, 82); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.85em; margin: 0px 0px 20px; letter-spacing: 0.3px; text-align: justify; overflow-wrap: break-word; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;先看&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;一个&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;常见的业务场景：审核接口可能返回三种&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;结果&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;——通过、驳回、转人工。后两种各自带着一段说明，但这三种&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;结果&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;不应该同时出现。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(71, 68, 82); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.85em; margin: 0px 0px 20px; letter-spacing: 0.3px; text-align: justify; overflow-wrap: break-word; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;你当然可以用&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;一个&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;状态枚举加几个&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;可空&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;字段来表示。但这样也允许出现「已通过，却带着驳回原因」这种自相矛盾的&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;对象&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;。调用方还得记住：每个状态对应哪些字段，增加状态后又有哪些地方需要跟着修改。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(71, 68, 82); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.85em; margin: 0px 0px 20px; letter-spacing: 0.3px; text-align: left; overflow-wrap: break-word; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;C# 15 的&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;联合&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;类型&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;（union type）给了我们另一种表达：&lt;/span&gt;&lt;strong style=&quot;font-weight: 700; color: rgb(176, 81, 47); visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;把允许的&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;结果&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;类型&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;列出来，让&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;编译器&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;检查&lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;background-color: rgb(244, 241, 251); color: rgb(15, 118, 110); font-size: 90%; padding: 2px 6px; border-radius: 4px; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-weight: 600; white-space: nowrap; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;switch&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&amp;nbsp;表达式是否遗漏了&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;处理&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;分支&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;。&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; margin: 20px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;display: block; text-align: center; margin: 20px 0px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/PwADIYPgTmKgs80sFOzPLlxsyISdc7YR6lH2G5wFSM1b3lHk4WjKHC5rdFpxEJyF77DvNia674v3MwibvbwDGqxITbvicp7bEh5retqljZNuwQ/640?from=appmsg#imgIndex=0&quot; alt=&quot;联合类型：一个值可以是多种 case 类型之一&quot; class=&quot;rich_pages wxw-img js_darkmode__6&quot; data-ratio=&quot;0.562962962962963&quot; data-w=&quot;1080&quot; height=&quot;203&quot; style=&quot;display: block; width: 584px !important; height: auto !important; border-radius: 10px; margin: 12px auto; border: 1px solid rgb(236, 231, 245); visibility: visible !important;&quot; width=&quot;361&quot; data-original-style=&quot;display:block; width:100%; height:auto; border-radius:10px; margin:12px auto; border:1px solid #ece7f5;&quot; data-index=&quot;2&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/PwADIYPgTmKgs80sFOzPLlxsyISdc7YR6lH2G5wFSM1b3lHk4WjKHC5rdFpxEJyF77DvNia674v3MwibvbwDGqxITbvicp7bEh5retqljZNuwQ/640?from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1#imgIndex=0&quot; _width=&quot;100%&quot; data-before-load-time=&quot;1795394382623&quot; data-report-img-idx=&quot;0&quot; data-fail=&quot;0&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;display: block; font-size: 13px; line-height: 1.6em; color: #8A8398; text-align: left; margin: 8px 0px 0px; letter-spacing: 0.2px; visibility: visible;&quot;&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;联合&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;类型&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;：&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;一个&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;值可以是多种 case&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;类型&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;之一&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin: 44px 0px 20px; display: flex; align-items: center; visibility: visible;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; font-weight: 700; color: #FFFFFF; background-color: #B64C26; padding: 6px 9px; border-radius: 5px; line-height: 1; margin-right: 12px; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;01&lt;/span&gt;&lt;/span&gt;&lt;h2 style=&quot;font-size: 20px; font-weight: 700; margin: 0px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.42em; letter-spacing: -0.3px; color: rgb(51, 42, 104); border-left: 3px solid rgb(70, 183, 196); padding-left: 12px; flex: 1 1 auto; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;用&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;联合&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;类型&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;表示审核&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;结果&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(71, 68, 82); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.85em; margin: 0px 0px 20px; letter-spacing: 0.3px; text-align: justify; overflow-wrap: break-word; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;安装 .NET 11 SDK，创建&lt;/span&gt;&lt;span style=&quot;white-space: nowrap; visibility: visible;&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;一个&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;控制台项目：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#1a1630; color:#e6e2f2; font-size:13px; line-height:1.8em; padding:18px 16px; margin:0 0 18px 0; border:1px solid #262040; box-sizing:border-box; border-radius:8px; overflow-x:auto; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;span style=&quot;display:block; color:#a49cc0; font-size:11px; letter-spacing:1.2px; text-transform:uppercase; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; margin:0 0 10px 0; padding:0 0 0 1px;&quot;&gt;bash&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#E2D6A7;&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#E2D6A7;&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot;&gt;console&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__10&quot;&gt;用 .NET 11 SDK 创建项目时，模板&lt;span style=&quot;white-space:nowrap;&quot;&gt;默认&lt;/span&gt;目标框架是&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__11&quot;&gt;net11.0&lt;/code&gt;，配套 C# 15，&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;无需额外开启&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__12&quot;&gt;preview&lt;/code&gt;。将下面的&lt;span style=&quot;white-space:nowrap;&quot;&gt;内容&lt;/span&gt;替换项目中的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__13&quot;&gt;Program.cs&lt;/code&gt;，然后运行：&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#1a1630; color:#e6e2f2; font-size:13px; line-height:1.8em; padding:18px 16px; margin:0 0 18px 0; border:1px solid #262040; box-sizing:border-box; border-radius:8px; overflow-x:auto; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;span style=&quot;display:block; color:#a49cc0; font-size:11px; letter-spacing:1.2px; text-transform:uppercase; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; margin:0 0 10px 0; padding:0 0 0 1px;&quot;&gt;csharp&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;ModerationResult&lt;/span&gt;&amp;nbsp;result =&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;&amp;nbsp; &amp;nbsp; new&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Rejected&lt;/span&gt;(&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;quot;图片不清晰&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(&lt;span style=&quot;color:#E2D6A7;&quot;&gt;Handle&lt;/span&gt;(result));&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;static&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;string&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#E2D6A7;&quot;&gt;Handle&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; ModerationResult&lt;/span&gt;&amp;nbsp;result)&amp;nbsp;&lt;span style=&quot;color:#D4D4D4;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp; &amp;nbsp; result&amp;nbsp;&lt;span style=&quot;color:#D6A1D0;&quot;&gt;switch&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; Approved&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4;&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;quot;发布&amp;quot;&lt;/span&gt;,&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; Rejected&lt;/span&gt;&amp;nbsp;rejected&amp;nbsp;&lt;span style=&quot;color:#D4D4D4;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $&amp;quot;驳回：&lt;span style=&quot;color:#84BDF0;&quot;&gt;{rejected.Reason}&lt;/span&gt;&amp;quot;&lt;/span&gt;,&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; NeedsReview&lt;/span&gt;&amp;nbsp;r&amp;nbsp;&lt;span style=&quot;color:#D4D4D4;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $&amp;quot;人工复核：&lt;span style=&quot;color:#84BDF0;&quot;&gt;{r.Suggestion}&lt;/span&gt;&amp;quot;&lt;/span&gt;,&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;&amp;nbsp; &amp;nbsp; null&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4;&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;quot;没有审核结果&amp;quot;&lt;/span&gt;,&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;};&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;public&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;record&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Approved&lt;/span&gt;;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;public&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;record&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Rejected&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; string&lt;/span&gt;&amp;nbsp;Reason);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;public&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;record&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;NeedsReview&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; string&lt;/span&gt;&amp;nbsp;Suggestion);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;public&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;union&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;ModerationResult&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; Approved&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Rejected&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#72CDBD;&quot;&gt;NeedsReview&lt;/span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:10.5px; letter-spacing:1.2px; color:#2f7d52; margin:20px 0 6px 0;&quot;&gt;输出 · 实测&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#f2faf5; border:0.5px solid #c9e9d5; border-left:2px solid #2f7d52; border-radius:6px; padding:12px 14px; margin:0 0 20px 0;&quot; class=&quot;js_darkmode__15&quot;&gt;&lt;code style=&quot;display:block; background-color:transparent; color:#3d4340; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; font-size:13.5px; line-height:1.8em; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;驳回：图片不清晰&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__17&quot;&gt;ModerationResult&lt;/code&gt;&amp;nbsp;是&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;新&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;，&lt;span style=&quot;white-space:nowrap;&quot;&gt;声明&lt;/span&gt;里列出三个&lt;strong style=&quot;font-weight:700; color:#b0512f;&quot;&gt;case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;/strong&gt;，也就是&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;可接受&lt;/span&gt;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;。&lt;span style=&quot;white-space:nowrap;&quot;&gt;赋值时&lt;/span&gt;，直接给&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;&amp;nbsp;case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;实例&lt;/span&gt;即可，&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;会做&lt;span style=&quot;white-space:nowrap;&quot;&gt;隐式转换&lt;/span&gt;。读取时，&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__18&quot;&gt;switch&lt;/code&gt;&amp;nbsp;按&lt;span style=&quot;white-space:nowrap;&quot;&gt;运行时&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;对应的 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;。这里的&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型集合&lt;/span&gt;是&lt;span style=&quot;white-space:nowrap;&quot;&gt;固定的&lt;/span&gt;：这个&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合声明&lt;/span&gt;里列出的就是全部 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;，&lt;span style=&quot;white-space:nowrap;&quot;&gt;声明之后&lt;/span&gt;不能再从&lt;span style=&quot;white-space:nowrap;&quot;&gt;别处&lt;/span&gt;加入新&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__19&quot;&gt;如果不用 union，而是直接用接口或&lt;span style=&quot;white-space:nowrap;&quot;&gt;抽象基类&lt;/span&gt;来装这几种&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;，它就是&lt;span style=&quot;white-space:nowrap;&quot;&gt;开放集合&lt;/span&gt;：只要&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;可见&lt;/span&gt;，别的&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;就能&lt;span style=&quot;white-space:nowrap;&quot;&gt;继续&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;实现&lt;/span&gt;或&lt;span style=&quot;white-space:nowrap;&quot;&gt;派生&lt;/span&gt;。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__20&quot;&gt;所以&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;无法把它当成&lt;span style=&quot;white-space:nowrap;&quot;&gt;固定集合&lt;/span&gt;。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__21&quot;&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__22&quot;&gt;is&lt;/code&gt;&amp;nbsp;也能判断 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;：只写&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__23&quot;&gt;is Rejected&lt;/code&gt;&amp;nbsp;时，它只回答「是不是」；要读&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;里的数据，用带变量名的&lt;span style=&quot;white-space:nowrap;&quot;&gt;声明模式&lt;/span&gt;，或者&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__24&quot;&gt;switch&lt;/code&gt;。下面这些&lt;span style=&quot;white-space:nowrap;&quot;&gt;写法&lt;/span&gt;可以放在一起对照：&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#1a1630; color:#e6e2f2; font-size:13px; line-height:1.8em; padding:18px 16px; margin:0 0 18px 0; border:1px solid #262040; box-sizing:border-box; border-radius:8px; overflow-x:auto; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot; class=&quot;js_darkmode__25&quot;&gt;&lt;span style=&quot;display:block; color:#a49cc0; font-size:11px; letter-spacing:1.2px; text-transform:uppercase; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; margin:0 0 10px 0; padding:0 0 0 1px;&quot;&gt;csharp&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;display:block;&quot;&gt;result&amp;nbsp;&lt;span style=&quot;color:#84BDF0;&quot;&gt;is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Rejected &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#92BB8F;&quot;&gt;// true&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;result&amp;nbsp;&lt;span style=&quot;color:#84BDF0;&quot;&gt;is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Approved &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#92BB8F;&quot;&gt;// false&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;result&amp;nbsp;&lt;span style=&quot;color:#84BDF0;&quot;&gt;is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Rejected&lt;/span&gt;&amp;nbsp;rejected &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color:#92BB8F;&quot;&gt;// 取出结果&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;result&amp;nbsp;&lt;span style=&quot;color:#84BDF0;&quot;&gt;is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;ModerationResult &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#92BB8F;&quot;&gt;// CS8121&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;result&amp;nbsp;&lt;span style=&quot;color:#84BDF0;&quot;&gt;is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;not&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;null &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#92BB8F;&quot;&gt;// 有值&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;result.Value&amp;nbsp;&lt;span style=&quot;color:#84BDF0;&quot;&gt;is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;null &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#92BB8F;&quot;&gt;// 内容为空&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;result&amp;nbsp;&lt;span style=&quot;color:#84BDF0;&quot;&gt;is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;var&lt;/span&gt;&amp;nbsp;captured &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#92BB8F;&quot;&gt;// 捕获实例&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__26&quot;&gt;其中&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__27&quot;&gt;result is ModerationResult&lt;/code&gt;&amp;nbsp;会报&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__28&quot;&gt;CS8121&lt;/code&gt;：&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;模式&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;检查&lt;/span&gt;的是&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;内容&lt;/span&gt;，不是&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;实例&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;本身&lt;/span&gt;。代码块最后三行分别对应三种用法：判断有值、判断&lt;span style=&quot;white-space:nowrap;&quot;&gt;内容&lt;/span&gt;为空、捕获&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;实例&lt;/span&gt;。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__29&quot;&gt;这三种&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;不必继承同&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;基类或&lt;span style=&quot;white-space:nowrap;&quot;&gt;实现&lt;/span&gt;同&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;接口；case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;可以是类、&lt;span style=&quot;white-space:nowrap;&quot;&gt;结构体&lt;/span&gt;、接口、&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;参数&lt;/span&gt;、&lt;span style=&quot;white-space:nowrap;&quot;&gt;可空&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;，甚至另&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;，只要它能转换成&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__30&quot;&gt;object&lt;/code&gt;。它们也可以是已经存在的&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;；&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合声明&lt;/span&gt;负责把它们组合成一组可能性。调用方拿到的是&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__31&quot;&gt;ModerationResult&lt;/code&gt;，再通过&lt;span style=&quot;white-space:nowrap;&quot;&gt;模式&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;读取其中的&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;。上面的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__32&quot;&gt;null&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;分支&lt;/span&gt;也有用：即使 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;都不&lt;span style=&quot;white-space:nowrap;&quot;&gt;可空&lt;/span&gt;，&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;仍可能处于&lt;span style=&quot;white-space:nowrap;&quot;&gt;空内容&lt;/span&gt;状态，原因稍后解释。&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:44px 0 20px 0; display:flex; align-items:center;&quot;&gt;&lt;span style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:15px; font-weight:700; color:#ffffff; background-color:#b64c26; padding:6px 9px; border-radius:5px; line-height:1; margin-right:12px;&quot;&gt;02&lt;/span&gt;&lt;h2 style=&quot;font-size:20px; font-weight:700; color:#554bb8; margin:0; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.42em; letter-spacing:-0.3px; color:#332a68; border-left:3px solid #46b7c4; padding-left:12px; flex:1 1 auto;&quot; class=&quot;js_darkmode__33&quot;&gt;新增一种&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;，&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;会提醒吗？&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__34&quot;&gt;假设业务新增了「升级&lt;span style=&quot;white-space:nowrap;&quot;&gt;处理&lt;/span&gt;」。在前面的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__35&quot;&gt;Program.cs&lt;/code&gt;&amp;nbsp;里补上&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__36&quot;&gt;Escalated&lt;/code&gt;&amp;nbsp;记录，并把&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合声明&lt;/span&gt;改成下面这样：&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#1a1630; color:#e6e2f2; font-size:13px; line-height:1.8em; padding:18px 16px; margin:0 0 18px 0; border:1px solid #262040; box-sizing:border-box; border-radius:8px; overflow-x:auto; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot; class=&quot;js_darkmode__37&quot;&gt;&lt;span style=&quot;display:block; color:#a49cc0; font-size:11px; letter-spacing:1.2px; text-transform:uppercase; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; margin:0 0 10px 0; padding:0 0 0 1px;&quot;&gt;csharp&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;public&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;record&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Escalated&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; string&lt;/span&gt;&amp;nbsp;Reason);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;public&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;union&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;ModerationResult&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; Approved&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Rejected&lt;/span&gt;,&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; NeedsReview&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Escalated&lt;/span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__38&quot;&gt;如果&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__39&quot;&gt;Handle&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;没有&lt;/span&gt;新增&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__40&quot;&gt;Escalated&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;分支&lt;/span&gt;，重新编译时，&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;会对这个&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__41&quot;&gt;switch&lt;/code&gt;&lt;strong style=&quot;font-weight:700; color:#b0512f;&quot;&gt;表达式&lt;/strong&gt;报告&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__42&quot;&gt;CS8509&lt;/code&gt;&amp;nbsp;穷尽性警告。它&lt;span style=&quot;white-space:nowrap;&quot;&gt;默认&lt;/span&gt;是警告，不会自动阻止构建；想让遗漏导致构建失败，可以在项目文件中设置：&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#1a1630; color:#e6e2f2; font-size:13px; line-height:1.8em; padding:18px 16px; margin:0 0 18px 0; border:1px solid #262040; box-sizing:border-box; border-radius:8px; overflow-x:auto; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot; class=&quot;js_darkmode__43&quot;&gt;&lt;span style=&quot;display:block; color:#a49cc0; font-size:11px; letter-spacing:1.2px; text-transform:uppercase; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; margin:0 0 10px 0; padding:0 0 0 1px;&quot;&gt;xml&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#A7A2B8;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;PropertyGroup&lt;/span&gt;&lt;span style=&quot;color:#A7A2B8;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#A7A2B8;&quot;&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;WarningsAsErrors&lt;/span&gt;&lt;span style=&quot;color:#A7A2B8;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; $(WarningsAsErrors)&lt;/span&gt;;CS8509&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#A7A2B8;&quot;&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;WarningsAsErrors&lt;/span&gt;&lt;span style=&quot;color:#A7A2B8;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#A7A2B8;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;PropertyGroup&lt;/span&gt;&lt;span style=&quot;color:#A7A2B8;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__44&quot;&gt;这个&lt;span style=&quot;white-space:nowrap;&quot;&gt;检查&lt;/span&gt;有两个容易影响效果的边界：&lt;/p&gt;&lt;ul style=&quot;text-align:left; margin:12px 0 16px 0; padding-left:22px; font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.75em; letter-spacing:0.3px;&quot; class=&quot;js_darkmode__45 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;这里说的是&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__47&quot;&gt;switch&lt;/code&gt;&lt;strong style=&quot;font-weight:700; color:#b0512f;&quot;&gt;表达式&lt;/strong&gt;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;穷尽性检查&lt;/span&gt;；&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__48&quot;&gt;switch&lt;/code&gt;&amp;nbsp;语句漏掉某种&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;处理&lt;/span&gt;，不会&lt;span style=&quot;white-space:nowrap;&quot;&gt;触发&lt;/span&gt;同&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;警告。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;用&lt;span style=&quot;white-space:nowrap;&quot;&gt;弃元&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__50&quot;&gt;_&lt;/code&gt;&amp;nbsp;或&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__51&quot;&gt;var&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;模式&lt;/span&gt;兜底时，&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;的是&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;实例&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;本身&lt;/span&gt;，不&lt;span style=&quot;white-space:nowrap;&quot;&gt;解包&lt;/span&gt;；它们也会接住以后新增的 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;，&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;就不会提醒你补上专门的&lt;span style=&quot;white-space:nowrap;&quot;&gt;处理&lt;/span&gt;。需要&lt;span style=&quot;white-space:nowrap;&quot;&gt;处理&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;空内容&lt;/span&gt;时，优先写&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__52&quot;&gt;null&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;分支&lt;/span&gt;，它&lt;span style=&quot;white-space:nowrap;&quot;&gt;检查&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__53&quot;&gt;Value&lt;/code&gt;，不会吞掉新增&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__54&quot;&gt;换句话说，&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;让 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型集合&lt;/span&gt;进入&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;系统&lt;/span&gt;，但要把提醒变成工程保障，还需要留意消费&lt;span style=&quot;white-space:nowrap;&quot;&gt;方式&lt;/span&gt;和项目的警告策略。&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:44px 0 20px 0; display:flex; align-items:center;&quot;&gt;&lt;span style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:15px; font-weight:700; color:#ffffff; background-color:#b64c26; padding:6px 9px; border-radius:5px; line-height:1; margin-right:12px;&quot;&gt;03&lt;/span&gt;&lt;h2 style=&quot;font-size:20px; font-weight:700; color:#554bb8; margin:0; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.42em; letter-spacing:-0.3px; color:#332a68; border-left:3px solid #46b7c4; padding-left:12px; flex:1 1 auto;&quot; class=&quot;js_darkmode__55&quot;&gt;列全&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;，还要&lt;span style=&quot;white-space:nowrap;&quot;&gt;处理&lt;/span&gt;空值吗？&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__56&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;空内容&lt;/span&gt;也能直接构造出来。把下面两行加在&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__57&quot;&gt;Handle(result)&lt;/code&gt;&amp;nbsp;之后、&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;声明&lt;/span&gt;之前：&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#1a1630; color:#e6e2f2; font-size:13px; line-height:1.8em; padding:18px 16px; margin:0 0 18px 0; border:1px solid #262040; box-sizing:border-box; border-radius:8px; overflow-x:auto; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot; class=&quot;js_darkmode__58&quot;&gt;&lt;span style=&quot;display:block; color:#a49cc0; font-size:11px; letter-spacing:1.2px; text-transform:uppercase; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; margin:0 0 10px 0; padding:0 0 0 1px;&quot;&gt;csharp&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;ModerationResult&lt;/span&gt;&amp;nbsp;empty =&amp;nbsp;&lt;span style=&quot;color:#84BDF0;&quot;&gt;default&lt;/span&gt;;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(&lt;span style=&quot;color:#E2D6A7;&quot;&gt;Handle&lt;/span&gt;(empty));&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:10.5px; letter-spacing:1.2px; color:#2f7d52; margin:20px 0 6px 0;&quot;&gt;输出 · 实测&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#f2faf5; border:0.5px solid #c9e9d5; border-left:2px solid #2f7d52; border-radius:6px; padding:12px 14px; margin:0 0 20px 0;&quot; class=&quot;js_darkmode__59&quot;&gt;&lt;code style=&quot;display:block; background-color:transparent; color:#3d4340; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; font-size:13.5px; line-height:1.8em; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;没有审核结果&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__60&quot;&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__61&quot;&gt;union&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;声明&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;的是&lt;span style=&quot;white-space:nowrap;&quot;&gt;结构体&lt;/span&gt;，&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__62&quot;&gt;default&lt;/code&gt;&amp;nbsp;会把内部保存&lt;span style=&quot;white-space:nowrap;&quot;&gt;内容&lt;/span&gt;的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__63&quot;&gt;object? Value&lt;/code&gt;&amp;nbsp;置为&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__64&quot;&gt;null&lt;/code&gt;——也就是「&lt;span style=&quot;white-space:nowrap;&quot;&gt;没有&lt;/span&gt;保存任何值」，即&lt;span style=&quot;white-space:nowrap;&quot;&gt;没有&lt;/span&gt;活动 case。&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__65&quot;&gt;switch&lt;/code&gt;&amp;nbsp;里的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__66&quot;&gt;null&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;分支&lt;/span&gt;正是接住这种状态，所以上面输出「&lt;span style=&quot;white-space:nowrap;&quot;&gt;没有&lt;/span&gt;审核&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;」。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__67&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;空内容&lt;/span&gt;不只来自手写的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__68&quot;&gt;default&lt;/code&gt;：新建的数组&lt;span style=&quot;white-space:nowrap;&quot;&gt;元素&lt;/span&gt;、没赋过值的字段，&lt;span style=&quot;white-space:nowrap;&quot;&gt;默认&lt;/span&gt;都是&lt;span style=&quot;white-space:nowrap;&quot;&gt;空内容&lt;/span&gt;。&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__69&quot;&gt;new ModerationResult[3]&lt;/code&gt;&amp;nbsp;里三个&lt;span style=&quot;white-space:nowrap;&quot;&gt;元素&lt;/span&gt;全为&lt;span style=&quot;white-space:nowrap;&quot;&gt;空内容&lt;/span&gt;，&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__70&quot;&gt;Handle&lt;/code&gt;&amp;nbsp;对其中任何&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;的返回都是「&lt;span style=&quot;white-space:nowrap;&quot;&gt;没有&lt;/span&gt;审核&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;」。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__71&quot;&gt;如果&lt;span style=&quot;white-space:nowrap;&quot;&gt;运行时&lt;/span&gt;遇到&lt;span style=&quot;white-space:nowrap;&quot;&gt;空内容&lt;/span&gt;，而&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__72&quot;&gt;switch&lt;/code&gt;&amp;nbsp;表达式&lt;span style=&quot;white-space:nowrap;&quot;&gt;没有&lt;/span&gt;任何&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;分支&lt;/span&gt;，就会&lt;span style=&quot;white-space:nowrap;&quot;&gt;触发&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__73&quot;&gt;SwitchExpressionException&lt;/code&gt;。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__74&quot;&gt;异常&lt;span style=&quot;white-space:nowrap;&quot;&gt;消息&lt;/span&gt;把两件事说清楚了（&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;前缀与调用栈从略）：&lt;/p&gt;&lt;p style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:10.5px; letter-spacing:1.2px; color:#2f7d52; margin:20px 0 6px 0;&quot;&gt;输出 · 实测&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#f2faf5; border:0.5px solid #c9e9d5; border-left:2px solid #2f7d52; border-radius:6px; padding:12px 14px; margin:0 0 20px 0;&quot; class=&quot;js_darkmode__75&quot;&gt;&lt;code style=&quot;display:block; background-color:transparent; color:#3d4340; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; font-size:13.5px; line-height:1.8em; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;Non-exhaustive switch expression failed to match its input.&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;Unmatched value was ModerationResult.&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__76&quot;&gt;关键在于&lt;strong style=&quot;font-weight:700; color:#b0512f;&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;未必会提醒&lt;/strong&gt;：&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__77&quot;&gt;union&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;的是非&lt;span style=&quot;white-space:nowrap;&quot;&gt;可空&lt;/span&gt;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;结构体&lt;/span&gt;，&lt;span style=&quot;white-space:nowrap;&quot;&gt;穷尽性检查&lt;/span&gt;先看&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合类型本身&lt;/span&gt;。case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;都不&lt;span style=&quot;white-space:nowrap;&quot;&gt;可空&lt;/span&gt;时，&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__78&quot;&gt;default&lt;/code&gt;&amp;nbsp;构造出来的&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;在分析里仍算&lt;span style=&quot;white-space:nowrap;&quot;&gt;非空值&lt;/span&gt;；即使&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__79&quot;&gt;Value&lt;/code&gt;&amp;nbsp;实际为&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__80&quot;&gt;null&lt;/code&gt;，&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;也不会因此要求你补&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__81&quot;&gt;null&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;分支&lt;/span&gt;，构建可以干干净净通过。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__82&quot;&gt;反过来，如果&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;包含&lt;span style=&quot;white-space:nowrap;&quot;&gt;可空&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;，或者&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;的是&lt;span style=&quot;white-space:nowrap;&quot;&gt;可空&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;，只要&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;在当前位置仍认为&lt;span style=&quot;white-space:nowrap;&quot;&gt;内容&lt;/span&gt;可能为 null，漏写&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__83&quot;&gt;null&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;分支&lt;/span&gt;就会收到&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__84&quot;&gt;CS8655&lt;/code&gt;&amp;nbsp;警告。前面的代码若已&lt;span style=&quot;white-space:nowrap;&quot;&gt;检查&lt;/span&gt;并排除空值，这个警告可能不出现。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__85&quot;&gt;所以「&lt;span style=&quot;white-space:nowrap;&quot;&gt;没有&lt;/span&gt;警告」不等于「&lt;span style=&quot;white-space:nowrap;&quot;&gt;运行时&lt;/span&gt;不会为空」，&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__86&quot;&gt;null&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;分支&lt;/span&gt;仍要自己记得写。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__87&quot;&gt;这也是开头示例保留&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__88&quot;&gt;null =&amp;gt; ...&lt;/code&gt;&amp;nbsp;的原因。在真实业务里，这个&lt;span style=&quot;white-space:nowrap;&quot;&gt;分支&lt;/span&gt;可以返回错误，也可以抛出更有上下文的异常；关键是明确约定&lt;span style=&quot;white-space:nowrap;&quot;&gt;空内容&lt;/span&gt;如何&lt;span style=&quot;white-space:nowrap;&quot;&gt;处理&lt;/span&gt;。case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;本身&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;可空&lt;/span&gt;时（比如&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__89&quot;&gt;union X(string?, int)&lt;/code&gt;），装进去的 null 和「&lt;span style=&quot;white-space:nowrap;&quot;&gt;没有&lt;/span&gt;保存任何值」在&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__90&quot;&gt;Value&lt;/code&gt;&amp;nbsp;上分不出来；要区分，就得在 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;里另带标记。&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:44px 0 20px 0; display:flex; align-items:center;&quot;&gt;&lt;span style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:15px; font-weight:700; color:#ffffff; background-color:#b64c26; padding:6px 9px; border-radius:5px; line-height:1; margin-right:12px;&quot;&gt;04&lt;/span&gt;&lt;h2 style=&quot;font-size:20px; font-weight:700; color:#554bb8; margin:0; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.42em; letter-spacing:-0.3px; color:#332a68; border-left:3px solid #46b7c4; padding-left:12px; flex:1 1 auto;&quot; class=&quot;js_darkmode__91&quot;&gt;组合现有&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;：数字或&lt;span style=&quot;white-space:nowrap;&quot;&gt;字符串&lt;/span&gt;&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__92&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;把现有&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;组合起来，不需要先给它们造&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;共同的基类；case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;甚至可以是内置&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;。例如，&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;外部接口的价格字段可能是按分计价的数字，也可能是&lt;span style=&quot;white-space:nowrap;&quot;&gt;字符串&lt;/span&gt;。将&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__93&quot;&gt;Program.cs&lt;/code&gt;&amp;nbsp;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;内容&lt;/span&gt;替换为下面的例子：&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#1a1630; color:#e6e2f2; font-size:13px; line-height:1.8em; padding:18px 16px; margin:0 0 18px 0; border:1px solid #262040; box-sizing:border-box; border-radius:8px; overflow-x:auto; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot; class=&quot;js_darkmode__94&quot;&gt;&lt;span style=&quot;display:block; color:#a49cc0; font-size:11px; letter-spacing:1.2px; text-transform:uppercase; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; margin:0 0 10px 0; padding:0 0 0 1px;&quot;&gt;csharp&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;&amp;nbsp;price =&amp;nbsp;&lt;span style=&quot;color:#BDD5AD;&quot;&gt;9900&lt;/span&gt;;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;&amp;nbsp;negotiable =&amp;nbsp;&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;quot;面议&amp;quot;&lt;/span&gt;;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(&lt;span style=&quot;color:#E2D6A7;&quot;&gt;Display&lt;/span&gt;(price));&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#E2D6A7;&quot;&gt;&amp;nbsp; &amp;nbsp; Display&lt;/span&gt;(negotiable));&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;static&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;string&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#E2D6A7;&quot;&gt;Display&lt;/span&gt;(&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;&amp;nbsp;price)&amp;nbsp;&lt;span style=&quot;color:#D4D4D4;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp; &amp;nbsp; price&amp;nbsp;&lt;span style=&quot;color:#D6A1D0;&quot;&gt;switch&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; int&lt;/span&gt;&amp;nbsp;cents&amp;nbsp;&lt;span style=&quot;color:#D4D4D4;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $&amp;quot;&lt;span style=&quot;color:#84BDF0;&quot;&gt;{cents / 100m:0.00}&lt;/span&gt;&amp;nbsp;元&amp;quot;&lt;/span&gt;,&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; string&lt;/span&gt;&amp;nbsp;text&amp;nbsp;&lt;span style=&quot;color:#D4D4D4;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;text,&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;&amp;nbsp; &amp;nbsp; null&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4;&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;quot;价格未提供&amp;quot;&lt;/span&gt;,&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;};&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;public&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;union&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;(&lt;span style=&quot;color:#72CDBD;&quot;&gt;int&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#72CDBD;&quot;&gt;string&lt;/span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:10.5px; letter-spacing:1.2px; color:#2f7d52; margin:20px 0 6px 0;&quot;&gt;输出 · 实测&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#f2faf5; border:0.5px solid #c9e9d5; border-left:2px solid #2f7d52; border-radius:6px; padding:12px 14px; margin:0 0 20px 0;&quot; class=&quot;js_darkmode__95&quot;&gt;&lt;code style=&quot;display:block; background-color:transparent; color:#3d4340; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; font-size:13.5px; line-height:1.8em; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;99.00 元&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;面议&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__96&quot;&gt;金额的小数分隔符取决于当前区域设置，示例按本机区域设置输出；如果接口要求&lt;span style=&quot;white-space:nowrap;&quot;&gt;固定&lt;/span&gt;格式，应显式指定区域设置。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__97&quot;&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__98&quot;&gt;int&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__99&quot;&gt;string&lt;/code&gt;&amp;nbsp;不需要为了组成&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;而包一层&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;。这里用&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__100&quot;&gt;decimal&lt;/code&gt;&amp;nbsp;换算金额，避免示例引入浮点数的精度问题。另一方面，&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__101&quot;&gt;int&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;本身&lt;/span&gt;不会告诉读者单位是分，也不能阻止负数；当单位、校验或业务规则重要时，单独定义&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__102&quot;&gt;PriceInCents&lt;/code&gt;&amp;nbsp;等 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;会更清楚。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__103&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合声明&lt;/span&gt;括号里是&lt;strong style=&quot;font-weight:700; color:#b0512f;&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;列表&lt;/strong&gt;，不是带名字的&lt;span style=&quot;white-space:nowrap;&quot;&gt;参数&lt;/span&gt;列表：&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__104&quot;&gt;union Price(int Cents, string Display)&lt;/code&gt;&amp;nbsp;会报&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__105&quot;&gt;CS1073&lt;/code&gt;（意外标记&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__106&quot;&gt;Cents&lt;/code&gt;），不是合法&lt;span style=&quot;white-space:nowrap;&quot;&gt;写法&lt;/span&gt;。需要附加语义或数据，就把它们放进 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__107&quot;&gt;case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;也不必是具体&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;：&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__108&quot;&gt;union Result&amp;lt;T&amp;gt;(T, Exception)&lt;/code&gt;&amp;nbsp;里，&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__109&quot;&gt;T&lt;/code&gt;&amp;nbsp;在&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__110&quot;&gt;Result&amp;lt;int&amp;gt;&lt;/code&gt;&amp;nbsp;上就是&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__111&quot;&gt;int&lt;/code&gt;；case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;还可以是另&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;。这让「要么值、要么错误」不需要&lt;span style=&quot;white-space:nowrap;&quot;&gt;任何继承层次&lt;/span&gt;。&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:44px 0 20px 0; display:flex; align-items:center;&quot;&gt;&lt;span style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:15px; font-weight:700; color:#ffffff; background-color:#b64c26; padding:6px 9px; border-radius:5px; line-height:1; margin-right:12px;&quot;&gt;05&lt;/span&gt;&lt;h2 style=&quot;font-size:20px; font-weight:700; color:#554bb8; margin:0; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.42em; letter-spacing:-0.3px; color:#332a68; border-left:3px solid #46b7c4; padding-left:12px; flex:1 1 auto;&quot; class=&quot;js_darkmode__112&quot;&gt;JSON 如何区分&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;？&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size:16px; font-weight:700; color:#514a72; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; padding-left:9px; border-left:2px solid #c9c3da; margin:26px 0 10px 0; line-height:1.5em; letter-spacing:0.1px;&quot; class=&quot;js_darkmode__113&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;默认&lt;/span&gt;按&lt;span style=&quot;white-space:nowrap;&quot;&gt;令牌类型&lt;/span&gt;区分&lt;/h3&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__114&quot;&gt;.NET 11 的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__115&quot;&gt;System.Text.Json&lt;/code&gt;&amp;nbsp;支持 C#&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;。将&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__116&quot;&gt;Program.cs&lt;/code&gt;&amp;nbsp;替换为下面的例子，看看&lt;span style=&quot;white-space:nowrap;&quot;&gt;序列化&lt;/span&gt;和&lt;span style=&quot;white-space:nowrap;&quot;&gt;反序列化&lt;/span&gt;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;。&lt;span style=&quot;white-space:nowrap;&quot;&gt;默认&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;序列化&lt;/span&gt;输出的是&lt;span style=&quot;white-space:nowrap;&quot;&gt;当前活动&lt;/span&gt;&amp;nbsp;case 的值，不额外包一层&lt;span style=&quot;white-space:nowrap;&quot;&gt;对象&lt;/span&gt;。也&lt;span style=&quot;white-space:nowrap;&quot;&gt;没有&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__117&quot;&gt;$type&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型鉴别器&lt;/span&gt;字段：&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#1a1630; color:#e6e2f2; font-size:13px; line-height:1.8em; padding:18px 16px; margin:0 0 18px 0; border:1px solid #262040; box-sizing:border-box; border-radius:8px; overflow-x:auto; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot; class=&quot;js_darkmode__118&quot;&gt;&lt;span style=&quot;display:block; color:#a49cc0; font-size:11px; letter-spacing:1.2px; text-transform:uppercase; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; margin:0 0 10px 0; padding:0 0 0 1px;&quot;&gt;csharp&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Text.Json;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;&amp;nbsp;price =&amp;nbsp;&lt;span style=&quot;color:#BDD5AD;&quot;&gt;9900&lt;/span&gt;;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;&amp;nbsp;negotiable =&amp;nbsp;&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;quot;面议&amp;quot;&lt;/span&gt;;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; JsonSerializer&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;Serialize&lt;/span&gt;(price));&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; JsonSerializer&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;Serialize&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; negotiable));&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;&amp;nbsp;fromNumber =&amp;nbsp;&lt;span style=&quot;color:#72CDBD;&quot;&gt;JsonSerializer&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp; &amp;nbsp; .Deserialize&amp;lt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;&amp;gt;(&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;quot;9900&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;&amp;nbsp;fromString =&amp;nbsp;&lt;span style=&quot;color:#72CDBD;&quot;&gt;JsonSerializer&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp; &amp;nbsp; .Deserialize&amp;lt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;&amp;gt;(&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;quot;\&amp;quot;9900\&amp;quot;&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp; &amp;nbsp; fromNumber.Value&lt;span style=&quot;color:#D4D4D4;&quot;&gt;?.&lt;/span&gt;&lt;span style=&quot;color:#E2D6A7;&quot;&gt;GetType&lt;/span&gt;().Name);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp; &amp;nbsp; fromString.Value&lt;span style=&quot;color:#D4D4D4;&quot;&gt;?.&lt;/span&gt;&lt;span style=&quot;color:#E2D6A7;&quot;&gt;GetType&lt;/span&gt;().Name);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; JsonSerializer&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;Serialize&lt;/span&gt;(fromString));&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;public&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;union&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;(&lt;span style=&quot;color:#72CDBD;&quot;&gt;int&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#72CDBD;&quot;&gt;string&lt;/span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:10.5px; letter-spacing:1.2px; color:#2f7d52; margin:20px 0 6px 0;&quot;&gt;输出 · 实测&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#f2faf5; border:0.5px solid #c9e9d5; border-left:2px solid #2f7d52; border-radius:6px; padding:12px 14px; margin:0 0 20px 0;&quot; class=&quot;js_darkmode__119&quot;&gt;&lt;code style=&quot;display:block; background-color:transparent; color:#3d4340; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; font-size:13.5px; line-height:1.8em; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;9900&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;quot;\u9762\u8BAE&amp;quot;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;Int32&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;quot;9900&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__120&quot;&gt;中文被转义是&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__121&quot;&gt;System.Text.Json&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;默认&lt;/span&gt;编码&lt;span style=&quot;white-space:nowrap;&quot;&gt;行为&lt;/span&gt;——&lt;span style=&quot;white-space:nowrap;&quot;&gt;默认编码器&lt;/span&gt;把非 ASCII 字符写成&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__122&quot;&gt;\uXXXX&lt;/code&gt;，并不改变&lt;span style=&quot;white-space:nowrap;&quot;&gt;字符串&lt;/span&gt;的值。&lt;span style=&quot;white-space:nowrap;&quot;&gt;默认&lt;/span&gt;选项下，JSON 数字&lt;span style=&quot;white-space:nowrap;&quot;&gt;令牌&lt;/span&gt;会选中&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__123&quot;&gt;int&lt;/code&gt;，&lt;span style=&quot;white-space:nowrap;&quot;&gt;字符串&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;令牌&lt;/span&gt;会选中&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__124&quot;&gt;string&lt;/code&gt;；代码用&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__125&quot;&gt;GetType().Name&lt;/code&gt;&amp;nbsp;把两个&lt;span style=&quot;white-space:nowrap;&quot;&gt;分支&lt;/span&gt;都打出来，&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__126&quot;&gt;Int32&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__127&quot;&gt;String&lt;/code&gt;&amp;nbsp;分别对应这两种情况。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__128&quot;&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__129&quot;&gt;Console.WriteLine&lt;/code&gt;&amp;nbsp;直接输出值，不会补 JSON 的双引号——所以&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__130&quot;&gt;fromString.Value&lt;/code&gt;&amp;nbsp;是&lt;span style=&quot;white-space:nowrap;&quot;&gt;字符串&lt;/span&gt;，打印出来仍是&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__131&quot;&gt;9900&lt;/code&gt;；改用&lt;span style=&quot;white-space:nowrap;&quot;&gt;序列化&lt;/span&gt;输出，才看到&lt;span style=&quot;white-space:nowrap;&quot;&gt;字符串&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;令牌&lt;/span&gt;的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__132&quot;&gt;&amp;quot;9900&amp;quot;&lt;/code&gt;。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__133&quot;&gt;但如果使用 Web&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;默认&lt;/span&gt;选项，数字也允许从 JSON&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;字符串&lt;/span&gt;读取；此时&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__134&quot;&gt;int&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__135&quot;&gt;string&lt;/code&gt;&amp;nbsp;都可能&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;字符串&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;令牌&lt;/span&gt;，&lt;span style=&quot;white-space:nowrap;&quot;&gt;反序列化&lt;/span&gt;会因歧义抛出&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__136&quot;&gt;JsonException&lt;/code&gt;。把&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__137&quot;&gt;Program.cs&lt;/code&gt;&amp;nbsp;再替换为下面的例子，读&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;带引号的数字：&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#1a1630; color:#e6e2f2; font-size:13px; line-height:1.8em; padding:18px 16px; margin:0 0 18px 0; border:1px solid #262040; box-sizing:border-box; border-radius:8px; overflow-x:auto; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot; class=&quot;js_darkmode__138&quot;&gt;&lt;span style=&quot;display:block; color:#a49cc0; font-size:11px; letter-spacing:1.2px; text-transform:uppercase; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; margin:0 0 10px 0; padding:0 0 0 1px;&quot;&gt;csharp&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;using&lt;/span&gt;&amp;nbsp;System.Text.Json;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;var&lt;/span&gt;&amp;nbsp;web =&amp;nbsp;&lt;span style=&quot;color:#84BDF0;&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;JsonSerializerOptions&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; JsonSerializerDefaults&lt;/span&gt;.Web);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#D6A1D0;&quot;&gt;try&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; Price&lt;/span&gt;&amp;nbsp;value =&amp;nbsp;&lt;span style=&quot;color:#72CDBD;&quot;&gt;JsonSerializer&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Deserialize&amp;lt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;&amp;gt;(&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;\&amp;quot;9900\&amp;quot;&amp;quot;&lt;/span&gt;, web);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(value.Value);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#D6A1D0;&quot;&gt;catch&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#72CDBD;&quot;&gt;JsonException&lt;/span&gt;&amp;nbsp;ex)&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#92BB8F;&quot;&gt;&amp;nbsp; &amp;nbsp; // 只打印类型和消息里的歧义说明&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;&amp;nbsp; &amp;nbsp; var&lt;/span&gt;&amp;nbsp;kind = ex.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;GetType&lt;/span&gt;().Name;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;&amp;nbsp; &amp;nbsp; var&lt;/span&gt;&amp;nbsp;message = ex.Message&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;span style=&quot;color:#E2D6A7;&quot;&gt;Split&lt;/span&gt;(&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;quot; because&amp;quot;&lt;/span&gt;)[&lt;span style=&quot;color:#BDD5AD;&quot;&gt;0&lt;/span&gt;] +&amp;nbsp;&lt;span style=&quot;color:#DDA88E;&quot;&gt;&amp;quot;.&amp;quot;&lt;/span&gt;;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;&amp;nbsp; &amp;nbsp; Console&lt;/span&gt;.&lt;span style=&quot;color:#E2D6A7;&quot;&gt;WriteLine&lt;/span&gt;(&lt;span style=&quot;color:#DDA88E;&quot;&gt;$&amp;quot;&lt;span style=&quot;color:#84BDF0;&quot;&gt;{kind}&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color:#84BDF0;&quot;&gt;{message}&lt;/span&gt;&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;public&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot;&gt;union&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#72CDBD;&quot;&gt;Price&lt;/span&gt;(&lt;span style=&quot;color:#72CDBD;&quot;&gt;int&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#72CDBD;&quot;&gt;string&lt;/span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:10.5px; letter-spacing:1.2px; color:#2f7d52; margin:20px 0 6px 0;&quot;&gt;输出 · 实测&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color:#f2faf5; border:0.5px solid #c9e9d5; border-left:2px solid #2f7d52; border-radius:6px; padding:12px 14px; margin:0 0 20px 0;&quot; class=&quot;js_darkmode__139&quot;&gt;&lt;code style=&quot;display:block; background-color:transparent; color:#3d4340; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-feature-settings:&amp;#39;liga&amp;#39; 1,&amp;#39;calt&amp;#39; 1; font-variant-ligatures:contextual; font-size:13.5px; line-height:1.8em; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word; text-align:left;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;JsonException: JSON value type &amp;#39;String&amp;#39; is ambiguous for union type &amp;#39;Price&amp;#39;.&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__140&quot;&gt;异常&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;是&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__141&quot;&gt;JsonException&lt;/code&gt;，原因在异常&lt;span style=&quot;white-space:nowrap;&quot;&gt;消息&lt;/span&gt;里：&lt;span style=&quot;white-space:nowrap;&quot;&gt;字符串&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;令牌&lt;/span&gt;对&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__142&quot;&gt;int&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__143&quot;&gt;string&lt;/code&gt;&amp;nbsp;两个 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;都可用，&lt;span style=&quot;white-space:nowrap;&quot;&gt;反序列化&lt;/span&gt;无法判断该选哪个。完整&lt;span style=&quot;white-space:nowrap;&quot;&gt;消息&lt;/span&gt;还会提示指定自定义&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型分类器&lt;/span&gt;；这里只取&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;和&lt;span style=&quot;white-space:nowrap;&quot;&gt;消息&lt;/span&gt;里说明歧义的那一句，输出只保留&lt;span style=&quot;white-space:nowrap;&quot;&gt;关键一句&lt;/span&gt;，也不必依赖完整&lt;span style=&quot;white-space:nowrap;&quot;&gt;消息&lt;/span&gt;的格式。&lt;/p&gt;&lt;h3 style=&quot;font-size:16px; font-weight:700; color:#514a72; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; padding-left:9px; border-left:2px solid #c9c3da; margin:26px 0 10px 0; line-height:1.5em; letter-spacing:0.1px;&quot; class=&quot;js_darkmode__144&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;对象&lt;/span&gt;&amp;nbsp;case 的&lt;span style=&quot;white-space:nowrap;&quot;&gt;分类器&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__145&quot;&gt;多个 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;都是 JSON&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;对象&lt;/span&gt;时，同样不能只靠&lt;span style=&quot;white-space:nowrap;&quot;&gt;令牌类型&lt;/span&gt;区分。相关配置有三点：&lt;/p&gt;&lt;ul style=&quot;text-align:left; margin:12px 0 16px 0; padding-left:22px; font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.75em; letter-spacing:0.3px;&quot; class=&quot;js_darkmode__146 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;特性：&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__148&quot;&gt;JsonUnionAttribute&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;内置结构分类器&lt;/span&gt;&lt;/p&gt;&lt;section&gt;：&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__150&quot;&gt;JsonUnionTypeStructuralClassifier&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;用法：在&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;上挂&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__152&quot;&gt;[JsonUnion]&lt;/code&gt;，把&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__153&quot;&gt;TypeClassifier&lt;/code&gt;&amp;nbsp;指向它&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__154&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;反序列化&lt;/span&gt;会按根级属性名和必需属性缩小候选 case。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__155&quot;&gt;它不&lt;span style=&quot;white-space:nowrap;&quot;&gt;检查&lt;/span&gt;属性值或嵌套&lt;span style=&quot;white-space:nowrap;&quot;&gt;内容&lt;/span&gt;；&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;到 0 个或多个 case 都会抛&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__156&quot;&gt;JsonException&lt;/code&gt;。另外还有几条&lt;span style=&quot;white-space:nowrap;&quot;&gt;限制&lt;/span&gt;：&lt;/p&gt;&lt;ul style=&quot;text-align:left; margin:12px 0 16px 0; padding-left:22px; font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.75em; letter-spacing:0.3px;&quot; class=&quot;js_darkmode__157 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;普通对象&lt;/span&gt;&lt;/p&gt;&lt;section&gt;&amp;nbsp;case 不能和字典、&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__159&quot;&gt;JsonObject&lt;/code&gt;&amp;nbsp;这类&lt;span style=&quot;white-space:nowrap;&quot;&gt;非 POCO&lt;/span&gt;&amp;nbsp;形状混用；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;同一&lt;span style=&quot;white-space:nowrap;&quot;&gt;令牌&lt;/span&gt;下不能有多个非&lt;span style=&quot;white-space:nowrap;&quot;&gt;对象&lt;/span&gt;&amp;nbsp;case；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;不支持嵌套&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;、多态 case 或&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__162&quot;&gt;ReferenceHandler.Preserve&lt;/code&gt;；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;大小写不敏感&lt;/span&gt;&lt;/p&gt;&lt;section&gt;配置在构建&lt;span style=&quot;white-space:nowrap;&quot;&gt;分类器&lt;/span&gt;时会抛&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__164&quot;&gt;NotSupportedException&lt;/code&gt;。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__165&quot;&gt;需要别的规则时，从&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__166&quot;&gt;JsonTypeClassifierFactory&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;派生&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;自定义分类器&lt;/span&gt;。注册位置：&lt;/p&gt;&lt;ul style=&quot;text-align:left; margin:12px 0 16px 0; padding-left:22px; font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.75em; letter-spacing:0.3px;&quot; class=&quot;js_darkmode__167 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合声明&lt;/span&gt;&lt;/p&gt;&lt;section&gt;上的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__169&quot;&gt;[JsonUnion]&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__171&quot;&gt;JsonSerializerOptions.TypeClassifiers&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;源生成上下文&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;自定义契约&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__174&quot;&gt;JsonTypeInfo.TypeClassifier&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;font-size:16px; font-weight:700; color:#514a72; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; padding-left:9px; border-left:2px solid #c9c3da; margin:26px 0 10px 0; line-height:1.5em; letter-spacing:0.1px;&quot; class=&quot;js_darkmode__175&quot;&gt;null 与往返&lt;/h3&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__176&quot;&gt;还有&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;与前文呼应的边界：如果&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;里的 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;都不&lt;span style=&quot;white-space:nowrap;&quot;&gt;可空&lt;/span&gt;，JSON&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__177&quot;&gt;null&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;反序列化&lt;/span&gt;后会得到&lt;span style=&quot;white-space:nowrap;&quot;&gt;默认&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;；对&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;结构体&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;来说，这意味着&lt;span style=&quot;white-space:nowrap;&quot;&gt;内容&lt;/span&gt;为空。反方向也一样：&lt;span style=&quot;white-space:nowrap;&quot;&gt;内容&lt;/span&gt;为空的&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;序列化&lt;/span&gt;出去，就是 JSON&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__178&quot;&gt;null&lt;/code&gt;。如果&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;同时&lt;span style=&quot;white-space:nowrap;&quot;&gt;声明&lt;/span&gt;了&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__179&quot;&gt;T&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__180&quot;&gt;T?&lt;/code&gt;&amp;nbsp;两个 case，&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__181&quot;&gt;null&lt;/code&gt;&amp;nbsp;会落到&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__182&quot;&gt;T?&lt;/code&gt;；但非 null 值可能同时&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;两者，&lt;span style=&quot;white-space:nowrap;&quot;&gt;没有&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;自定义分类器&lt;/span&gt;就会歧义。&lt;strong style=&quot;font-weight:700; color:#b0512f;&quot;&gt;能否往返，取决于完整的&lt;span style=&quot;white-space:nowrap;&quot;&gt;序列化&lt;/span&gt;选项与&lt;span style=&quot;white-space:nowrap;&quot;&gt;数据协定&lt;/span&gt;，而不只是&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__183&quot;&gt;union&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;声明&lt;/span&gt;。&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__184&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;分类器&lt;/span&gt;怎么配、选项怎么组合，属于&lt;span style=&quot;white-space:nowrap;&quot;&gt;序列化&lt;/span&gt;配置的另一层问题，留到本系列《联合类型与封闭层次结构：从序列化到OpenAPI》再展开。&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:44px 0 20px 0; display:flex; align-items:center;&quot;&gt;&lt;span style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:15px; font-weight:700; color:#ffffff; background-color:#b64c26; padding:6px 9px; border-radius:5px; line-height:1; margin-right:12px;&quot;&gt;06&lt;/span&gt;&lt;h2 style=&quot;font-size:20px; font-weight:700; color:#554bb8; margin:0; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.42em; letter-spacing:-0.3px; color:#332a68; border-left:3px solid #46b7c4; padding-left:12px; flex:1 1 auto;&quot; class=&quot;js_darkmode__185&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;了什么？&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__186&quot;&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__187&quot;&gt;union ModerationResult(...)&lt;/code&gt;&amp;nbsp;并不是为每种 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;一套全新&lt;span style=&quot;white-space:nowrap;&quot;&gt;对象&lt;/span&gt;层次。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__188&quot;&gt;前面用&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__189&quot;&gt;default&lt;/code&gt;&amp;nbsp;时见过的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__190&quot;&gt;object? Value&lt;/code&gt;，就是&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;结构体&lt;/span&gt;里的公开属性；背后是&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__191&quot;&gt;object?&lt;/code&gt;&amp;nbsp;字段。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__192&quot;&gt;这个&lt;span style=&quot;white-space:nowrap;&quot;&gt;结构体&lt;/span&gt;带&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__193&quot;&gt;[Union]&lt;/code&gt;&amp;nbsp;特性、&lt;span style=&quot;white-space:nowrap;&quot;&gt;实现&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__194&quot;&gt;IUnion&lt;/code&gt;。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__195&quot;&gt;它为每种 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;单&lt;span style=&quot;white-space:nowrap;&quot;&gt;参数&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;构造函数&lt;/span&gt;。&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;font-size:84%;padding:1px 4px;font-weight:500;letter-spacing:-0.01em;&quot; class=&quot;js_darkmode__196&quot;&gt;new Rejected(&amp;quot;图片不清晰&amp;quot;)&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;赋给&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__197&quot;&gt;ModerationResult&lt;/code&gt;&amp;nbsp;时，&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;把赋值改写成对这个&lt;span style=&quot;white-space:nowrap;&quot;&gt;构造函数&lt;/span&gt;的调用。&lt;span style=&quot;white-space:nowrap;&quot;&gt;模式&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;则相反，从&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__198&quot;&gt;Value&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;解包&lt;/span&gt;再&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;。&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__199&quot;&gt;想核对&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;细节，可以查&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__200&quot;&gt;union types&lt;/code&gt;&amp;nbsp;语言&lt;span style=&quot;white-space:nowrap;&quot;&gt;参考&lt;/span&gt;，或者用反射看&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;本身&lt;/span&gt;：&lt;/p&gt;&lt;ul style=&quot;text-align:left; margin:12px 0 16px 0; padding-left:22px; font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.75em; letter-spacing:0.3px;&quot; class=&quot;js_darkmode__201 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;&lt;/p&gt;&lt;section&gt;带&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__203&quot;&gt;[Union]&lt;/code&gt;&amp;nbsp;特性的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__204&quot;&gt;struct&lt;/code&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;实现&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__206&quot;&gt;IUnion&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;&lt;/p&gt;&lt;section&gt;只读的公开&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__208&quot;&gt;object? Value&lt;/code&gt;&amp;nbsp;属性&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;每种 case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;构造函数&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__210&quot;&gt;（本机 11.0.100 反射&lt;span style=&quot;white-space:nowrap;&quot;&gt;所得&lt;/span&gt;。）&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__211&quot;&gt;这带来几个实际影响。&lt;/p&gt;&lt;h3 style=&quot;font-size:16px; font-weight:700; color:#514a72; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; padding-left:9px; border-left:2px solid #c9c3da; margin:26px 0 10px 0; line-height:1.5em; letter-spacing:0.1px;&quot; class=&quot;js_darkmode__212&quot;&gt;值&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;会装箱&lt;/h3&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__213&quot;&gt;上面的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__214&quot;&gt;int&lt;/code&gt;&amp;nbsp;会作为&lt;span style=&quot;white-space:nowrap;&quot;&gt;对象&lt;/span&gt;保存：本机实测把 100 万个&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__215&quot;&gt;int&lt;/code&gt;&amp;nbsp;装进&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;，&lt;span style=&quot;white-space:nowrap;&quot;&gt;分配&lt;/span&gt;&amp;nbsp;24,000,000 字节；同样次数的直接&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__216&quot;&gt;int&lt;/code&gt;&amp;nbsp;赋值是 0 字节（SDK 11.0.100、Release，数值依环境而异）。这只是&lt;span style=&quot;white-space:nowrap;&quot;&gt;分配&lt;/span&gt;量的对照，不代表应用的整体性能。在热路径上，先测量实际影响，再考虑自定义&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;的非装箱访问&lt;span style=&quot;white-space:nowrap;&quot;&gt;模式&lt;/span&gt;。&lt;/p&gt;&lt;h3 style=&quot;font-size:16px; font-weight:700; color:#514a72; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; padding-left:9px; border-left:2px solid #c9c3da; margin:26px 0 10px 0; line-height:1.5em; letter-spacing:0.1px;&quot; class=&quot;js_darkmode__217&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;不是 record&lt;/h3&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__218&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合声明&lt;/span&gt;不会自动&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;&amp;nbsp;record 的相等性、&lt;span style=&quot;white-space:nowrap;&quot;&gt;克隆&lt;/span&gt;或解构&lt;span style=&quot;white-space:nowrap;&quot;&gt;行为&lt;/span&gt;；case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;本身&lt;/span&gt;可以是 record，但不要因此假设&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;也有相同语义。它同样不会&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__219&quot;&gt;==&lt;/code&gt;&amp;nbsp;运算符，两个&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__220&quot;&gt;Price&lt;/code&gt;&amp;nbsp;直接写&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__221&quot;&gt;==&lt;/code&gt;&amp;nbsp;会报&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__222&quot;&gt;CS0019&lt;/code&gt;（运算符「==」无法应用于「Price」和「Price」&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;的操作数）。需要按业务语义比较时，先用&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__223&quot;&gt;switch&lt;/code&gt;&amp;nbsp;拆出具体的值，再明确比较&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;及其携带的值——什么算相等，由你定义。&lt;/p&gt;&lt;h3 style=&quot;font-size:16px; font-weight:700; color:#514a72; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; padding-left:9px; border-left:2px solid #c9c3da; margin:26px 0 10px 0; line-height:1.5em; letter-spacing:0.1px;&quot; class=&quot;js_darkmode__224&quot;&gt;可以添加哪些成员？&lt;/h3&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__225&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;可以定义方法或计算属性；不能&lt;span style=&quot;white-space:nowrap;&quot;&gt;声明&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;实例&lt;/span&gt;字段、自动属性、字段式事件或公共单&lt;span style=&quot;white-space:nowrap;&quot;&gt;参数&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;构造函数&lt;/span&gt;，因为&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;代码需要这些位置。自己写的&lt;span style=&quot;white-space:nowrap;&quot;&gt;构造函数&lt;/span&gt;必须用&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__226&quot;&gt;this(...)&lt;/code&gt;&amp;nbsp;初始化器委托到&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;生成&lt;/span&gt;的&lt;span style=&quot;white-space:nowrap;&quot;&gt;构造函数&lt;/span&gt;。&lt;/p&gt;&lt;h3 style=&quot;font-size:16px; font-weight:700; color:#514a72; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; padding-left:9px; border-left:2px solid #c9c3da; margin:26px 0 10px 0; line-height:1.5em; letter-spacing:0.1px;&quot; class=&quot;js_darkmode__227&quot;&gt;什么时候需要手写&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;？&lt;/h3&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__228&quot;&gt;如果需要接入已有&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;、不同的存储策略或工厂校验，也可以手写遵循 union 约定的&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;：&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__229&quot;&gt;[Union]&lt;/code&gt;&amp;nbsp;配合单&lt;span style=&quot;white-space:nowrap;&quot;&gt;参数&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;构造函数&lt;/span&gt;与&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__230&quot;&gt;Value&lt;/code&gt;&amp;nbsp;属性，或通过嵌套的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__231&quot;&gt;IUnionMembers&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;提供&lt;/span&gt;成员。更完整的约定还支持&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__232&quot;&gt;HasValue&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__233&quot;&gt;TryGetValue&lt;/code&gt;，供&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;使用更高效的&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;路径。手写&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;不一定是&lt;span style=&quot;white-space:nowrap;&quot;&gt;结构体&lt;/span&gt;：类也可以带&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__234&quot;&gt;[Union]&lt;/code&gt;&amp;nbsp;并&lt;span style=&quot;white-space:nowrap;&quot;&gt;实现&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__235&quot;&gt;IUnion&lt;/code&gt;；类&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__236&quot;&gt;null&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;模式&lt;/span&gt;会同时&lt;span style=&quot;white-space:nowrap;&quot;&gt;匹配&lt;/span&gt;引用&lt;span style=&quot;white-space:nowrap;&quot;&gt;本身&lt;/span&gt;为&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__237&quot;&gt;null&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__238&quot;&gt;Value&lt;/code&gt;&amp;nbsp;为&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__239&quot;&gt;null&lt;/code&gt;。手写&lt;span style=&quot;white-space:nowrap;&quot;&gt;实现&lt;/span&gt;必须满足这些&lt;span style=&quot;white-space:nowrap;&quot;&gt;行为&lt;/span&gt;约定；加&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;特性&lt;span style=&quot;white-space:nowrap;&quot;&gt;本身&lt;/span&gt;并不能自动修好已有&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;。&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:44px 0 20px 0; display:flex; align-items:center;&quot;&gt;&lt;span style=&quot;font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-size:15px; font-weight:700; color:#ffffff; background-color:#b64c26; padding:6px 9px; border-radius:5px; line-height:1; margin-right:12px;&quot;&gt;07&lt;/span&gt;&lt;h2 style=&quot;font-size:20px; font-weight:700; color:#554bb8; margin:0; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.42em; letter-spacing:-0.3px; color:#332a68; border-left:3px solid #46b7c4; padding-left:12px; flex:1 1 auto;&quot; class=&quot;js_darkmode__240&quot;&gt;使用&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;时，记住三点&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:justify; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__241&quot;&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;联合&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;把「可能返回什么」从注释和约定搬进&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;系统&lt;/span&gt;：原先靠纪律维持的约束，改由&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;检查&lt;/span&gt;。落地时记住三件事：&lt;/p&gt;&lt;ul style=&quot;text-align:left; margin:12px 0 16px 0; padding-left:22px; font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.75em; letter-spacing:0.3px;&quot; class=&quot;js_darkmode__242 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;用不带通用兜底的&amp;nbsp;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__244&quot;&gt;switch&lt;/code&gt;&amp;nbsp;表达式，保留新增&lt;span style=&quot;white-space:nowrap;&quot;&gt;结果&lt;/span&gt;时的提醒；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;明确&lt;span style=&quot;white-space:nowrap;&quot;&gt;处理&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__246&quot;&gt;default&lt;/code&gt;&amp;nbsp;带来的&lt;span style=&quot;white-space:nowrap;&quot;&gt;空内容&lt;/span&gt;——case&amp;nbsp;&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;都不&lt;span style=&quot;white-space:nowrap;&quot;&gt;可空&lt;/span&gt;时，&lt;span style=&quot;white-space:nowrap;&quot;&gt;编译器&lt;/span&gt;未必会提醒；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;在 JSON 边界验证实际选项能否区分各个&lt;span style=&quot;white-space:nowrap;&quot;&gt;类型&lt;/span&gt;。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;font-size:16px; color:#474452; font-family:-apple-system,BlinkMacSystemFont,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,sans-serif; line-height:1.85em; margin:0 0 20px 0; letter-spacing:0.3px; text-align:left; overflow-wrap:break-word;&quot; class=&quot;js_darkmode__248&quot;&gt;如果这些可能本来就属于同&lt;span style=&quot;white-space:nowrap;&quot;&gt;一个&lt;/span&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;继承层次&lt;/span&gt;，也可以把&lt;span style=&quot;white-space:nowrap;&quot;&gt;限制&lt;/span&gt;写进&lt;span style=&quot;white-space:nowrap;&quot;&gt;基类声明&lt;/span&gt;——&lt;span style=&quot;white-space:nowrap;&quot;&gt;下一篇&lt;/span&gt;&lt;code style=&quot;background-color:#f4f1fb; color:#0f766e; font-size:90%; padding:2px 6px; border-radius:4px; font-family:&amp;#39;Cascadia Code&amp;#39;,&amp;#39;JetBrains Mono&amp;#39;,&amp;#39;Fira Code&amp;#39;,&amp;#39;SF Mono&amp;#39;,Menlo,Consolas,&amp;#39;Source Code Pro&amp;#39;,&amp;#39;Sarasa Mono SC&amp;#39;,&amp;#39;Maple Mono NF CN&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace; font-weight:600;;white-space:nowrap;&quot; class=&quot;js_darkmode__249&quot;&gt;closed&lt;/code&gt;&lt;span style=&quot;white-space:nowrap;&quot;&gt;（封闭层次结构）&lt;/span&gt;，走的就是这条路。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 23 Nov 2026 09:20:45 +0800</pubDate></item><item><title>.NET 11 新特性｜SDK 工具全景：运行、构建、测试与发布</title><link>https://www.codepub.top/post/739.html</link><description>&lt;p style=&quot;font-size: 17px; line-height: 1.78em; color: rgb(56, 43, 82); margin: 0px 0px 21px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; overflow-wrap: break-word; padding: 5px 10px; border-left: 3px solid rgb(146, 122, 182); background-color: rgb(245, 240, 250); border-radius: 0px 7px 7px 0px;&quot; class=&quot;js_darkmode__1 js_darkmode__text__1&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2&quot;&gt;接着上一篇《单文件运行（File-Based Apps）》，这篇看看 .NET 11 给常用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__2 js_darkmode__text__3&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__4&quot;&gt;dotnet&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__5&quot;&gt; 命令带来了哪些变化。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__3 js_darkmode__text__6&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__7&quot;&gt;升级后，两项改动会默认生效。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__4 js_darkmode__text__8&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__9&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__10&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__11&quot;&gt;version&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__12&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__5 js_darkmode__text__13&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__14&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__15&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__16&quot;&gt;help&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__17&quot;&gt; 等命令由 Native AOT 宿主直接处理。MSBuild 服务器也会默认启用，连续构建时可以复用后台进程。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__6 js_darkmode__text__18&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__19&quot;&gt;整轮测试的超时和失败上限需要在 MTP 模式下设置。要固定容器镜像的构建时间戳，可以在发布时传入 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__7 js_darkmode__text__20&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__21&quot;&gt;SOURCE_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__22&quot;&gt;DATE_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__23&quot;&gt;EPOCH&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__24&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:34px 0 15px;padding:7px 10px;background-color:#f4eef8;border:1px solid #e8dcef;border-radius:7px;&quot; class=&quot;js_darkmode__8 js_darkmode__text__25&quot;&gt;&lt;h2 style=&quot;font-size: 19px; color: rgb(72, 52, 93); margin: 0px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 28px; display: table; table-layout: fixed; width: 100%;&quot; class=&quot;js_darkmode__text__26&quot;&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;width:35px;&quot; class=&quot;js_darkmode__text__27&quot;&gt;&lt;span style=&quot;display: block; width: 26px; margin: 2px 0px 0px; background-color: #E8DCF2; border-radius: 5px; text-align: center; color: #604778; font-size: 13px; line-height: 24px; font-variant-numeric: tabular-nums;&quot; class=&quot;js_darkmode__9 js_darkmode__text__28&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__29&quot;&gt;01&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__30&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__31&quot;&gt;CLI：运行与构建&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__10 js_darkmode__text__32&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__33&quot;&gt;传环境变量和启动参数&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__11 js_darkmode__text__34&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__35&quot;&gt;以前要给应用临时传环境变量，在 Bash 和 Zsh 里可以把赋值写在命令前，在 PowerShell 里通常先给 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__12 js_darkmode__text__36&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__37&quot;&gt;$env:&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__38&quot;&gt;GREETING&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__39&quot;&gt; 赋值，再运行命令。.NET 11 的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__13 js_darkmode__text__40&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__41&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__42&quot;&gt;run&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__43&quot;&gt;-e&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__44&quot;&gt; 可以直接把变量传给应用。把下面的代码保存为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__14 js_darkmode__text__45&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__46&quot;&gt;envdemo.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__47&quot;&gt;cs&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__48&quot;&gt; 就能试。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__15 js_darkmode__text__49&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__16 js_darkmode__text__50&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__51&quot;&gt;csharp&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__52&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__53&quot;&gt;&amp;nbsp;envdemo.cs&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__54&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__55&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot; class=&quot;js_darkmode__text__56&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__57&quot;&gt;var&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot; class=&quot;js_darkmode__text__58&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__59&quot;&gt;value&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__60&quot;&gt;&amp;nbsp;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__61&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot; class=&quot;js_darkmode__text__62&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__63&quot;&gt;&amp;nbsp; &amp;nbsp; Environment&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__64&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__65&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__66&quot;&gt;GetEnvironmentVariable&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__67&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__68&quot;&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__69&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__70&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;GREETING&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__71&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__72&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot; class=&quot;js_darkmode__text__73&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__74&quot;&gt;Console&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__75&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__76&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__77&quot;&gt;WriteLine&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__78&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__79&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__80&quot;&gt;$&amp;quot;GREETING =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot; class=&quot;js_darkmode__text__81&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__82&quot;&gt;{value}&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__83&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__84&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__17 js_darkmode__text__85&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__18 js_darkmode__text__86&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__87&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__88&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__89&quot;&gt;&amp;nbsp;指定文件入口和本次环境变量&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__90&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__91&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__92&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__93&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__94&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__95&quot;&gt;run&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__96&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__97&quot;&gt;--file&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__98&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__99&quot;&gt;envdemo.cs&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__100&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__101&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__102&quot;&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__103&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__104&quot;&gt;&amp;nbsp; -e&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__105&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__106&quot;&gt;GREETING=hello-net11&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;section style=&quot;margin:0 0 22px;border:1px solid #d6e6de;border-radius:9px;background-color:#f6faf8;&quot; class=&quot;js_darkmode__19 js_darkmode__text__107&quot;&gt;&lt;p style=&quot;margin: 0px; padding: 7px 12px; background-color: rgb(234, 243, 239); border-radius: 8px 8px 0px 0px; border-bottom: 1px solid rgb(214, 230, 222); color: rgb(49, 90, 75); font-size: 12px; font-weight: 600; line-height: 1.5em;&quot; class=&quot;js_darkmode__20 js_darkmode__text__108&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__109&quot;&gt;输出 · 本次运行读取到的环境变量&lt;/span&gt;&lt;/p&gt;&lt;code style=&quot;display: block; padding: 9px 12px 11px; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; line-height: 1.7em; color: rgb(41, 62, 55); white-space: pre-wrap; overflow-wrap: anywhere;&quot; class=&quot;js_darkmode__text__110&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__111&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__112&quot;&gt;GREETING = hello-net11&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__21 js_darkmode__text__113&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__114&quot;&gt;传多个变量就重复写 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__22 js_darkmode__text__115&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__116&quot;&gt;-e&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__117&quot;&gt;。变量会传给这次启动的应用，当前 shell 中的值保持原样。MSBuild 也能通过 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__23 js_darkmode__text__118&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__119&quot;&gt;Runtime&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__120&quot;&gt;Environment&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__121&quot;&gt;Variable&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__122&quot;&gt; 项读取这组设置。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__24 js_darkmode__text__123&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__124&quot;&gt;需要反复使用一组参数时，可以把它们写进启动配置。MSBuild 会先求值项目属性，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__25 js_darkmode__text__125&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__126&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__127&quot;&gt;run&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__128&quot;&gt; 再把结果展开到 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__26 js_darkmode__text__129&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__130&quot;&gt;command&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__131&quot;&gt;Line&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__132&quot;&gt;Args&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__133&quot;&gt; 里。比如写入 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__27 js_darkmode__text__134&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__135&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__136&quot;&gt;name&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__137&quot;&gt;$(Assembly&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__138&quot;&gt;Name)&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__139&quot;&gt;，程序集名为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__28 js_darkmode__text__140&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__141&quot;&gt;Launch&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__142&quot;&gt;Probe&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__143&quot;&gt; 时，程序收到的参数就是 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__29 js_darkmode__text__144&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__145&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__146&quot;&gt;name&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__147&quot;&gt;Launch&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__148&quot;&gt;Probe&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__149&quot;&gt;。展开只适用于 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__30 js_darkmode__text__150&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__151&quot;&gt;command&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__152&quot;&gt;Line&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__153&quot;&gt;Args&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__154&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__31 js_darkmode__text__155&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__156&quot;&gt;如果脚本要读取应用输出，现在可以少过滤一行。&lt;span class=&quot;&quot; link-id=&quot;link-1795355092518-0.8275050810418489&quot;&gt;CLI&lt;/span&gt; 会把 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__32 js_darkmode__text__157&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__158&quot;&gt;Using&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__159&quot;&gt;launch&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__160&quot;&gt;settings&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__161&quot;&gt;from&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__162&quot;&gt;…&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__163&quot;&gt; 写入标准错误（stderr）。本机分别重定向两路输出时，启动提示进入了 stderr，应用的监听地址和主机日志仍写入标准输出（stdout）。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__33 js_darkmode__text__164&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__165&quot;&gt;项目引用与构建配置&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__34 js_darkmode__text__166&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__167&quot;&gt;在项目目录执行 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__35 js_darkmode__text__168&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__169&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__170&quot;&gt;reference&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__171&quot;&gt;add&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__172&quot;&gt; 或 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__36 js_darkmode__text__173&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__174&quot;&gt;remove&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__175&quot;&gt; 时，现在可以像 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__37 js_darkmode__text__176&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__177&quot;&gt;list&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__178&quot;&gt; 一样省略 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__38 js_darkmode__text__179&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__180&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__181&quot;&gt;project&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__182&quot;&gt;。如果是单文件程序，就用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__39 js_darkmode__text__183&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__184&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__185&quot;&gt;file&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__186&quot;&gt; 指定文件。例如，下面的命令给 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__40 js_darkmode__text__187&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__188&quot;&gt;app.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__189&quot;&gt;cs&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__190&quot;&gt; 添加项目引用。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__41 js_darkmode__text__191&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__42 js_darkmode__text__192&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__193&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__194&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__195&quot;&gt;&amp;nbsp;给单文件程序添加项目引用&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__196&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__197&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__198&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__199&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__200&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__201&quot;&gt;reference&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__202&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__203&quot;&gt;add&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__204&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__205&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__206&quot;&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__207&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__208&quot;&gt;&amp;nbsp; --file&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__209&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__210&quot;&gt;app.cs&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__211&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__212&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__213&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__214&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__215&quot;&gt;&amp;nbsp; ../Lib/Lib.csproj&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__43 js_darkmode__text__216&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__217&quot;&gt;实测会把 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__44 js_darkmode__text__218&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__219&quot;&gt;#:&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__220&quot;&gt;project&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__221&quot;&gt; 指令写入文件首行。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__45 js_darkmode__text__222&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__223&quot;&gt;list&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__224&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__46 js_darkmode__text__225&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__226&quot;&gt;remove&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__227&quot;&gt; 也支持 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__47 js_darkmode__text__228&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__229&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__230&quot;&gt;file&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__231&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__48 js_darkmode__text__232&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__233&quot;&gt;现在可以用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__49 js_darkmode__text__234&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__235&quot;&gt;Configuration&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__236&quot;&gt; 环境变量给 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__50 js_darkmode__text__237&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__238&quot;&gt;-c&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__239&quot;&gt; 设默认值。下面用 Bash 或 Zsh 为一次构建设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__51 js_darkmode__text__240&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__241&quot;&gt;Release&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__242&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__52 js_darkmode__text__243&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__53 js_darkmode__text__244&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__245&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__246&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__247&quot;&gt;&amp;nbsp;用环境变量指定构建配置&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__248&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__249&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__250&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__251&quot;&gt;Configuration=Release&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__252&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__253&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__254&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__255&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__256&quot;&gt;&amp;nbsp; dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__257&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__258&quot;&gt;build&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__259&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__260&quot;&gt;App/App.csproj&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__54 js_darkmode__text__261&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__262&quot;&gt;本机生成的程序集位于 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__55 js_darkmode__text__263&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__264&quot;&gt;App/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__265&quot;&gt;bin/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__266&quot;&gt;Release/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__267&quot;&gt;net11.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__268&quot;&gt;0/&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__269&quot;&gt;。在同样的环境变量下显式传 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__56 js_darkmode__text__270&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__271&quot;&gt;-c&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__272&quot;&gt;Debug&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__273&quot;&gt;，产物会写入 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__57 js_darkmode__text__274&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__275&quot;&gt;App/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__276&quot;&gt;bin/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__277&quot;&gt;Debug/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__278&quot;&gt;net11.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__279&quot;&gt;0/&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__280&quot;&gt;。空值或纯空白不会改变默认配置。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__58 js_darkmode__text__281&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__282&quot;&gt;其他 CLI 改动&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;margin: 12px 0px 16px; padding-left: 22px; font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.75em; letter-spacing: 0.3px;&quot; class=&quot;js_darkmode__59 js_darkmode__text__283 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__285&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__286&quot;&gt;补全与帮助：Fish 补全会直接列出已知的子命令和选项，需要动态候选时才调用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__61 js_darkmode__text__287&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__288&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__289&quot;&gt;complete&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__290&quot;&gt;。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__62 js_darkmode__text__291&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__292&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__293&quot;&gt;nuget&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__294&quot;&gt;&amp;lt;子命令&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__295&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__296&quot;&gt;help&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__297&quot;&gt; 会显示相应的 NuGet CLI 帮助。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__299&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__300&quot;&gt;安装与工具执行：&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__64 js_darkmode__text__301&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__302&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__303&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__304&quot;&gt;install&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__305&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__306&quot;&gt;prerelease&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__307&quot;&gt; 在未指定版本时会从正式版和预发行版中选择最新版本。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__65 js_darkmode__text__308&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__309&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__310&quot;&gt;tool&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__311&quot;&gt;exec&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__312&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__66 js_darkmode__text__313&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__314&quot;&gt;dnx&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__315&quot;&gt; 移除了额外的确认提示。SDK 也修复了安装、更新和卸载工具时的并发冲突。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__317&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__318&quot;&gt;项目和工作负载：在工作负载命令或 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__68 js_darkmode__text__319&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__320&quot;&gt;global.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__321&quot;&gt;json&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__322&quot;&gt; 中误填 NuGet 包的内部版本号时，SDK 会提示应使用的版本号格式。单文件程序在 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__69 js_darkmode__text__323&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__324&quot;&gt;#:&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__325&quot;&gt;property&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__326&quot;&gt; 中可用引号括起含空格的值，属性名仍须符合 MSBuild 规则。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__70 js_darkmode__text__327&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__328&quot;&gt;#:&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__329&quot;&gt;package&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__330&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__71 js_darkmode__text__331&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__332&quot;&gt;#:&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__333&quot;&gt;project&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__334&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__72 js_darkmode__text__335&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__336&quot;&gt;#:&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__337&quot;&gt;ref&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__338&quot;&gt; 可附加 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__73 js_darkmode__text__339&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__340&quot;&gt;Name=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__341&quot;&gt;Value&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__342&quot;&gt; 元数据，例如用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__74 js_darkmode__text__343&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__344&quot;&gt;Aliases=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__345&quot;&gt;Command&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__346&quot;&gt;Line&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__347&quot;&gt; 配合 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__75 js_darkmode__text__348&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__349&quot;&gt;extern&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__350&quot;&gt;alias&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__351&quot;&gt;。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;section style=&quot;margin:34px 0 15px;padding:7px 10px;background-color:#f4eef8;border:1px solid #e8dcef;border-radius:7px;&quot; class=&quot;js_darkmode__76 js_darkmode__text__352&quot;&gt;&lt;h2 style=&quot;font-size: 19px; color: rgb(72, 52, 93); margin: 0px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 28px; display: table; table-layout: fixed; width: 100%;&quot; class=&quot;js_darkmode__text__353&quot;&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;width:35px;&quot; class=&quot;js_darkmode__text__354&quot;&gt;&lt;span style=&quot;display: block; width: 26px; margin: 2px 0px 0px; background-color: #E8DCF2; border-radius: 5px; text-align: center; color: #604778; font-size: 13px; line-height: 24px; font-variant-numeric: tabular-nums;&quot; class=&quot;js_darkmode__77 js_darkmode__text__355&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__356&quot;&gt;02&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__357&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__358&quot;&gt;启动、构建与安装包体积&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__78 js_darkmode__text__359&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__360&quot;&gt;Native AOT 版 CLI 宿主&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__79 js_darkmode__text__361&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__362&quot;&gt;.NET 11 默认启用 Native AOT 编译的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__80 js_darkmode__text__363&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__364&quot;&gt;dotnet&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__365&quot;&gt; 命令行宿主，参数解析、命令校验和帮助生成都交给它。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__81 js_darkmode__text__366&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__367&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__368&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__369&quot;&gt;version&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__370&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__82 js_darkmode__text__371&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__372&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__373&quot;&gt;help&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__374&quot;&gt; 这类命令由它直接返回结果，不再启动托管 CLI。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__83 js_darkmode__text__375&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__376&quot;&gt;下面是 macOS arm64 上用 .NET SDK 11.0.100 测得的结果。每组运行 8 次，取中位数。&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;js_darkmode__84 js_darkmode__text__377&quot; width=&quot;100&quot;&gt;&lt;thead class=&quot;js_darkmode__text__378&quot;&gt;&lt;tr class=&quot;js_darkmode__text__379 firstRow&quot;&gt;&lt;th style=&quot;padding: 9px 10px; background-color: rgb(244, 240, 246); border-bottom: 1px solid rgb(228, 220, 233); color: rgb(73, 61, 86); line-height: 1.55em; text-align: left; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__85 js_darkmode__text__380&quot;&gt;&lt;section class=&quot;js_darkmode__text__381&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__382&quot;&gt;dotnet 子命令或参数&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;padding: 9px 10px; background-color: rgb(244, 240, 246); border-bottom: 1px solid rgb(228, 220, 233); color: rgb(73, 61, 86); line-height: 1.55em; text-align: right; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__86 js_darkmode__text__383&quot;&gt;&lt;section class=&quot;js_darkmode__text__384&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__385&quot;&gt;默认 AOT&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;padding: 9px 10px; background-color: rgb(244, 240, 246); border-bottom: 1px solid rgb(228, 220, 233); color: rgb(73, 61, 86); line-height: 1.55em; text-align: right; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__87 js_darkmode__text__386&quot;&gt;&lt;section class=&quot;js_darkmode__text__387&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__388&quot;&gt;关闭 AOT&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody class=&quot;js_darkmode__text__389&quot;&gt;&lt;tr class=&quot;js_darkmode__text__390&quot;&gt;&lt;td style=&quot;padding: 9px 10px; background-color: rgb(255, 254, 254); border-bottom: 1px solid rgb(239, 234, 242); color: rgb(48, 44, 56); line-height: 1.65em; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__88 js_darkmode__text__391&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__89 js_darkmode__text__392&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__393&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__394&quot;&gt;version&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__90 js_darkmode__text__395&quot;&gt;&lt;section class=&quot;js_darkmode__text__396&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__397&quot;&gt;39 ms&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__91 js_darkmode__text__398&quot;&gt;&lt;section class=&quot;js_darkmode__text__399&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__400&quot;&gt;150 ms&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;js_darkmode__text__401&quot;&gt;&lt;td style=&quot;padding: 9px 10px; background-color: rgb(255, 254, 254); border-bottom: 1px solid rgb(239, 234, 242); color: rgb(48, 44, 56); line-height: 1.65em; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__92 js_darkmode__text__402&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__93 js_darkmode__text__403&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__404&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__405&quot;&gt;help&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__94 js_darkmode__text__406&quot;&gt;&lt;section class=&quot;js_darkmode__text__407&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__408&quot;&gt;30 ms&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__95 js_darkmode__text__409&quot;&gt;&lt;section class=&quot;js_darkmode__text__410&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__411&quot;&gt;127 ms&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;js_darkmode__text__412&quot;&gt;&lt;td style=&quot;padding: 9px 10px; background-color: rgb(255, 254, 254); border-bottom: 1px solid rgb(239, 234, 242); color: rgb(48, 44, 56); line-height: 1.65em; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__96 js_darkmode__text__413&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__97 js_darkmode__text__414&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__415&quot;&gt;sln&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__416&quot;&gt;list&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__98 js_darkmode__text__417&quot;&gt;&lt;section class=&quot;js_darkmode__text__418&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__419&quot;&gt;344 ms&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__99 js_darkmode__text__420&quot;&gt;&lt;section class=&quot;js_darkmode__text__421&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__422&quot;&gt;767 ms&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__100 js_darkmode__text__423&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__424&quot;&gt;设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__101 js_darkmode__text__425&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__426&quot;&gt;DOTNET_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__427&quot;&gt;CLI_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__428&quot;&gt;ENABLEAOT=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__429&quot;&gt;false&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__430&quot;&gt; 可关闭 AOT 宿主。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__102 js_darkmode__text__431&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__432&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__433&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__434&quot;&gt;version&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__435&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__103 js_darkmode__text__436&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__437&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__438&quot;&gt;info&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__439&quot;&gt;、内置命令帮助、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__104 js_darkmode__text__440&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__441&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__442&quot;&gt;cli-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__443&quot;&gt;schema&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__444&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__105 js_darkmode__text__445&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__446&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__447&quot;&gt;sln&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__448&quot;&gt; 的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__106 js_darkmode__text__449&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__450&quot;&gt;list&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__451&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__107 js_darkmode__text__452&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__453&quot;&gt;migrate&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__454&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__108 js_darkmode__text__455&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__456&quot;&gt;remove&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__457&quot;&gt; 都有 AOT 执行路径。有些操作只能在托管代码里做，参数解析完再交给托管 CLI。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__109 js_darkmode__text__458&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__459&quot;&gt;AOT 宿主也能直接启动全局工具和外部命令。按微软公布的数据，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__110 js_darkmode__text__460&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__461&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__462&quot;&gt;ef&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__463&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__111 js_darkmode__text__464&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__465&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__466&quot;&gt;dev-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__467&quot;&gt;certs&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__468&quot;&gt; 这类调用可省去约 600～700 ms 的托管 CLI 启动开销。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__112 js_darkmode__text__469&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__470&quot;&gt;单文件应用也能缩短启动时间。源码和命令参数命中缓存时，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__113 js_darkmode__text__471&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__472&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__473&quot;&gt;run&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__474&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__475&quot;&gt;file&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__476&quot;&gt;app.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__477&quot;&gt;cs&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__478&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__114 js_darkmode__text__479&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__480&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__481&quot;&gt;run&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__482&quot;&gt;app.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__483&quot;&gt;cs&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__484&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__115 js_darkmode__text__485&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__486&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__487&quot;&gt;app.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__488&quot;&gt;cs&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__489&quot;&gt; 都可复用已有的构建产物。这里的 AOT 指 CLI 宿主，应用本身仍按自己的配置构建和运行。仓库启用 SDK 的集中产物布局后，单文件应用的产物也会写入仓库的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__116 js_darkmode__text__490&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__491&quot;&gt;artifacts&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__492&quot;&gt; 目录。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__117 js_darkmode__text__493&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__494&quot;&gt;MSBuild 服务器默认启用&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__118 js_darkmode__text__495&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__496&quot;&gt;MSBuild 服务器（MSBuild Server）是一个可复用的后台构建进程。从 .NET 11 起，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__119 js_darkmode__text__497&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__498&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__499&quot;&gt;build&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__500&quot;&gt; 等使用 MSBuild 的 CLI 命令会默认启用它。本机在同一个小项目中反复执行 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__120 js_darkmode__text__501&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__502&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__503&quot;&gt;build&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__504&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__505&quot;&gt;no-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__506&quot;&gt;restore&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__507&quot;&gt;，开启和关闭服务器各测 8 次，取中位数。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin: 0px 0px 21px; padding: 16px 15px 17px; border-radius: 11px; background-color: rgb(244, 240, 246); color: rgb(62, 52, 73);&quot; class=&quot;js_darkmode__121 js_darkmode__text__508&quot;&gt;&lt;p style=&quot;margin:0 0 13px;padding-bottom:8px;border-bottom:1px solid #e1d7e8;color:#5a4d65;font-size:12px;line-height:1.5em;font-weight:600;letter-spacing:0.8px;&quot; class=&quot;js_darkmode__122 js_darkmode__text__509&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__510&quot;&gt;重复构建耗时中位数&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;display:inline-block;vertical-align:top;width:50%;box-sizing:border-box;padding:0 9px 0 0;&quot; class=&quot;js_darkmode__text__511&quot;&gt;&lt;span style=&quot;display:block;color:#5a4d65;font-size:13px;font-weight:600;line-height:1.5em;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__512&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__513&quot;&gt;服务器启用&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display: block; font-size: 26px; font-weight: 700; line-height: 1.35em; margin: 3px 0px; overflow-wrap: anywhere;&quot; class=&quot;js_darkmode__text__514&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__515&quot;&gt;810 ms&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;color:#5a4d65;font-size:12px;line-height:1.55em;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__516&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__517&quot;&gt;默认，复用服务器进程&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:inline-block;vertical-align:top;width:50%;box-sizing:border-box;padding-left:13px;border-left:1px solid #e1d7e8;&quot; class=&quot;js_darkmode__123 js_darkmode__text__518&quot;&gt;&lt;span style=&quot;display:block;color:#5a4d65;font-size:13px;font-weight:600;line-height:1.5em;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__519&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__520&quot;&gt;服务器禁用&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display: block; font-size: 26px; font-weight: 700; line-height: 1.35em; margin: 3px 0px; overflow-wrap: anywhere;&quot; class=&quot;js_darkmode__text__521&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__522&quot;&gt;1,077 ms&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;color:#5a4d65;font-size:12px;line-height:1.55em;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__523&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__524&quot;&gt;关闭服务器复用&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__124 js_darkmode__text__525&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__526&quot;&gt;构建完成后，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__125 js_darkmode__text__527&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__528&quot;&gt;ps&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__529&quot;&gt; 仍能看到带有 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__126 js_darkmode__text__530&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__531&quot;&gt;/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__532&quot;&gt;nodemode:&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__533&quot;&gt;8&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__534&quot;&gt; 的 MSBuild 服务器进程。要禁用它，可以设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__127 js_darkmode__text__535&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__536&quot;&gt;DOTNET_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__537&quot;&gt;CLI_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__538&quot;&gt;USE_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__539&quot;&gt;MSBUILD_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__540&quot;&gt;SERVER=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__541&quot;&gt;false&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__542&quot;&gt;。如果未设置这个变量，CLI 会沿用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__128 js_darkmode__text__543&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__544&quot;&gt;MSBUILD&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__545&quot;&gt;USESERVER&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__546&quot;&gt; 的值；把它设成 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__129 js_darkmode__text__547&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__548&quot;&gt;0&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__549&quot;&gt; 也能禁用服务器。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__130 js_darkmode__text__550&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__551&quot;&gt;SDK 安装包去重&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__131 js_darkmode__text__552&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__553&quot;&gt;SDK 按内容哈希查找重复的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__132 js_darkmode__text__554&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__555&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__556&quot;&gt;dll&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__557&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__133 js_darkmode__text__558&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__559&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__560&quot;&gt;exe&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__561&quot;&gt;，每组只保留一份文件，其余路径通过&lt;span class=&quot;&quot; link-id=&quot;link-1795355092519-0.1985019983062285&quot;&gt;符号链接&lt;/span&gt;指向它。微软分析一份早期构建时发现，SDK 目录里有 35% 是重复文件。在 Linux x64 上，这 816 个文件占用 140 MB 磁盘空间，压缩后为 53 MB。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__134 js_darkmode__text__562&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__563&quot;&gt;下面是微软公布的 Linux x64 构建体积对照。&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;js_darkmode__135 js_darkmode__text__564&quot; width=&quot;100&quot;&gt;&lt;thead class=&quot;js_darkmode__text__565&quot;&gt;&lt;tr class=&quot;js_darkmode__text__566 firstRow&quot;&gt;&lt;th style=&quot;padding: 9px 10px; background-color: rgb(244, 240, 246); border-bottom: 1px solid rgb(228, 220, 233); color: rgb(73, 61, 86); line-height: 1.55em; text-align: left; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__136 js_darkmode__text__567&quot;&gt;&lt;section class=&quot;js_darkmode__text__568&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__569&quot;&gt;格式&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;padding: 9px 10px; background-color: rgb(244, 240, 246); border-bottom: 1px solid rgb(228, 220, 233); color: rgb(73, 61, 86); line-height: 1.55em; text-align: right; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__137 js_darkmode__text__570&quot;&gt;&lt;section class=&quot;js_darkmode__text__571&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__572&quot;&gt;.NET 10&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;padding: 9px 10px; background-color: rgb(244, 240, 246); border-bottom: 1px solid rgb(228, 220, 233); color: rgb(73, 61, 86); line-height: 1.55em; text-align: right; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__138 js_darkmode__text__573&quot;&gt;&lt;section class=&quot;js_darkmode__text__574&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__575&quot;&gt;.NET 11&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;padding: 9px 10px; background-color: rgb(244, 240, 246); border-bottom: 1px solid rgb(228, 220, 233); color: rgb(73, 61, 86); line-height: 1.55em; text-align: right; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__139 js_darkmode__text__576&quot;&gt;&lt;section class=&quot;js_darkmode__text__577&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__578&quot;&gt;降幅&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody class=&quot;js_darkmode__text__579&quot;&gt;&lt;tr class=&quot;js_darkmode__text__580&quot;&gt;&lt;td style=&quot;padding: 9px 10px; background-color: rgb(255, 254, 254); border-bottom: 1px solid rgb(239, 234, 242); color: rgb(48, 44, 56); line-height: 1.65em; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__140 js_darkmode__text__581&quot;&gt;&lt;section class=&quot;js_darkmode__text__582&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__583&quot;&gt;tarball&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__141 js_darkmode__text__584&quot;&gt;&lt;section class=&quot;js_darkmode__text__585&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__586&quot;&gt;230 MB&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__142 js_darkmode__text__587&quot;&gt;&lt;section class=&quot;js_darkmode__text__588&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__589&quot;&gt;189 MB&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__143 js_darkmode__text__590&quot;&gt;&lt;section class=&quot;js_darkmode__text__591&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__592&quot;&gt;17.8%&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;js_darkmode__text__593&quot;&gt;&lt;td style=&quot;padding: 9px 10px; background-color: rgb(255, 254, 254); border-bottom: 1px solid rgb(239, 234, 242); color: rgb(48, 44, 56); line-height: 1.65em; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__144 js_darkmode__text__594&quot;&gt;&lt;section class=&quot;js_darkmode__text__595&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__596&quot;&gt;deb&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__145 js_darkmode__text__597&quot;&gt;&lt;section class=&quot;js_darkmode__text__598&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__599&quot;&gt;164 MB&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__146 js_darkmode__text__600&quot;&gt;&lt;section class=&quot;js_darkmode__text__601&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__602&quot;&gt;122 MB&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__147 js_darkmode__text__603&quot;&gt;&lt;section class=&quot;js_darkmode__text__604&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__605&quot;&gt;25.6%&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;js_darkmode__text__606&quot;&gt;&lt;td style=&quot;padding: 9px 10px; background-color: rgb(255, 254, 254); border-bottom: 1px solid rgb(239, 234, 242); color: rgb(48, 44, 56); line-height: 1.65em; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__148 js_darkmode__text__607&quot;&gt;&lt;section class=&quot;js_darkmode__text__608&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__609&quot;&gt;rpm&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__149 js_darkmode__text__610&quot;&gt;&lt;section class=&quot;js_darkmode__text__611&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__612&quot;&gt;165 MB&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__150 js_darkmode__text__613&quot;&gt;&lt;section class=&quot;js_darkmode__text__614&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__615&quot;&gt;122 MB&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__151 js_darkmode__text__616&quot;&gt;&lt;section class=&quot;js_darkmode__text__617&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__618&quot;&gt;26.0%&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__152 js_darkmode__text__619&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__620&quot;&gt;微软公布的容器镜像体积降幅为 8%～17%。仅出现在 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__153 js_darkmode__text__621&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__622&quot;&gt;Dotnet&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__623&quot;&gt;Tools/&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__624&quot;&gt; 下的程序集还会跳过 crossgen 预编译，使 Linux x64 的 tar 归档进一步缩小 23.6 MB。去重适用于 Linux 和 macOS 的安装包，包括 macOS 的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__154 js_darkmode__text__625&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__626&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__627&quot;&gt;pkg&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__628&quot;&gt;。复制 SDK 目录时应保留符号链接，才能维持去重效果。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__155 js_darkmode__text__629&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__630&quot;&gt;CLI 遥测与移动工作负载&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__156 js_darkmode__text__631&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__632&quot;&gt;为了适配 Native AOT，CLI 遥测改用 &lt;span class=&quot;&quot; link-id=&quot;link-1795355092519-0.17451432203211237&quot;&gt;OpenTelemetry&lt;/span&gt;。采集范围和以前一样，仍可用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__157 js_darkmode__text__633&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__634&quot;&gt;DOTNET_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__635&quot;&gt;CLI_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__636&quot;&gt;TELEMETRY_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__637&quot;&gt;OPTOUT&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__638&quot;&gt; 关闭。跟踪一次跨宿主的命令调用时，AOT 宿主和托管 CLI 发出的跨度（span）会保留父子关系。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__158 js_darkmode__text__639&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__640&quot;&gt;除了 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__159 js_darkmode__text__641&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__642&quot;&gt;DOTNET_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__643&quot;&gt;CLI_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__644&quot;&gt;TELEMETRY_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__645&quot;&gt;ENABLE_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__646&quot;&gt;EXPORTER&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__647&quot;&gt;，标准的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__160 js_darkmode__text__648&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__649&quot;&gt;OTEL_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__650&quot;&gt;EXPORTER_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__651&quot;&gt;OTLP_*&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__652&quot;&gt; 环境变量也能启用 OTLP 导出器。端点、协议、请求头和超时都有对应的变量，链路追踪和指标也有各自的专用变量。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__161 js_darkmode__text__653&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__654&quot;&gt;移动工作负载还可以用局部 ReadyToRun（Partial R2R）缩短调试时的启动耗时。例如，Debug 构建可以只预编译生成的 XAML 程序集，并把它们排除在复合 R2R 映像之外。这项设置供 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__162 js_darkmode__text__655&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__656&quot;&gt;dotnet/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__657&quot;&gt;macios&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__658&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__163 js_darkmode__text__659&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__660&quot;&gt;dotnet/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__661&quot;&gt;maui&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__662&quot;&gt; 等工作负载的构建目标使用。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:34px 0 15px;padding:7px 10px;background-color:#f4eef8;border:1px solid #e8dcef;border-radius:7px;&quot; class=&quot;js_darkmode__164 js_darkmode__text__663&quot;&gt;&lt;h2 style=&quot;font-size: 19px; color: rgb(72, 52, 93); margin: 0px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 28px; display: table; table-layout: fixed; width: 100%;&quot; class=&quot;js_darkmode__text__664&quot;&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;width:35px;&quot; class=&quot;js_darkmode__text__665&quot;&gt;&lt;span style=&quot;display: block; width: 26px; margin: 2px 0px 0px; background-color: #E8DCF2; border-radius: 5px; text-align: center; color: #604778; font-size: 13px; line-height: 24px; font-variant-numeric: tabular-nums;&quot; class=&quot;js_darkmode__165 js_darkmode__text__666&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__667&quot;&gt;03&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__668&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__669&quot;&gt;测试：MTP 与整轮测试选项&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__166 js_darkmode__text__670&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__671&quot;&gt;先确认运行器&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__167 js_darkmode__text__672&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__673&quot;&gt;在 SDK 11.0.100 中，直接执行 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__168 js_darkmode__text__674&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__675&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__676&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__677&quot;&gt;xunit&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__678&quot;&gt; 仍会创建使用 &lt;span class=&quot;&quot; link-id=&quot;link-1795355092520-0.5559180733539941&quot;&gt;VSTest&lt;/span&gt; 的 xUnit v2 项目。指定 v3 时，模板默认使用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__169 js_darkmode__text__679&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__680&quot;&gt;Microsoft.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__681&quot;&gt;Testing.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__682&quot;&gt;Platform&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__683&quot;&gt;（MTP）。找一个本身及上级目录都没有 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__170 js_darkmode__text__684&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__685&quot;&gt;global.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__686&quot;&gt;json&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__687&quot;&gt; 或解决方案文件的目录，可以这样验证：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__171 js_darkmode__text__688&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__172 js_darkmode__text__689&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__690&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__691&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__692&quot;&gt;&amp;nbsp;创建并运行 xUnit v3 项目&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__693&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__694&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__695&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__696&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__697&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__698&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__699&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__700&quot;&gt;xunit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__701&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__702&quot;&gt;--xunit-version&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__703&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__704&quot;&gt;v3&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__705&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__706&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__707&quot;&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__708&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__709&quot;&gt;&amp;nbsp; -o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__710&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__711&quot;&gt;Sdk11Tests&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__712&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__713&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__714&quot;&gt;cd&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__715&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__716&quot;&gt;Sdk11Tests&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__717&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__718&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__719&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__720&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__721&quot;&gt;test&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__722&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__723&quot;&gt;--timeout&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__724&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__725&quot;&gt;60s&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__173 js_darkmode__text__726&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__727&quot;&gt;刚生成的项目自带一个示例测试用例，运行摘要会显示该测试已通过。每个程序集还有一行类似 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__174 js_darkmode__text__728&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__729&quot;&gt;[+1/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__730&quot;&gt;x0/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__731&quot;&gt;?0]&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__732&quot;&gt; 的统计，依次是通过、失败和跳过的用例数。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__175 js_darkmode__text__733&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__734&quot;&gt;生成的项目将输出类型设为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__176 js_darkmode__text__735&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__736&quot;&gt;Exe&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__737&quot;&gt;，设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__177 js_darkmode__text__738&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__739&quot;&gt;Use&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__740&quot;&gt;Microsoft&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__741&quot;&gt;Testing&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__742&quot;&gt;Platform&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__743&quot;&gt;Runner=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__744&quot;&gt;true&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__745&quot;&gt;，并引用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__178 js_darkmode__text__746&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__747&quot;&gt;xunit.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__748&quot;&gt;v3.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__749&quot;&gt;mtp-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__750&quot;&gt;v2&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__751&quot;&gt; 3.2.2。模板还会创建或更新 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__179 js_darkmode__text__752&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__753&quot;&gt;global.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__754&quot;&gt;json&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__755&quot;&gt;，让 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__180 js_darkmode__text__756&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__757&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__758&quot;&gt;test&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__759&quot;&gt; 选择 MTP。这个示例把配置写在 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__181 js_darkmode__text__760&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__761&quot;&gt;Sdk11&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__762&quot;&gt;Tests/&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__763&quot;&gt; 下。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__182 js_darkmode__text__764&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__183 js_darkmode__text__765&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__766&quot;&gt;json&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__767&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__768&quot;&gt;&amp;nbsp;Sdk11Tests/global.json&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__769&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__770&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__771&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__772&quot;&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__773&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__774&quot;&gt;&amp;nbsp; &amp;quot;test&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__775&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__776&quot;&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__777&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__778&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;quot;runner&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__779&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__780&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__781&quot;&gt;&amp;quot;Microsoft.Testing.Platform&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__782&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__783&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__784&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__785&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__184 js_darkmode__text__786&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__185 js_darkmode__text__787&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__788&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__789&quot;&gt;test&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__790&quot;&gt; 先读取 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__186 js_darkmode__text__791&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__792&quot;&gt;DOTNET_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__793&quot;&gt;TEST_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__794&quot;&gt;RUNNER&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__795&quot;&gt;，再读取 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__187 js_darkmode__text__796&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__797&quot;&gt;global.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__798&quot;&gt;json&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__799&quot;&gt; 中的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__188 js_darkmode__text__800&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__801&quot;&gt;test.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__802&quot;&gt;runner&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__803&quot;&gt;。两处都未选定运行器时，使用默认的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__189 js_darkmode__text__804&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__805&quot;&gt;VS&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__806&quot;&gt;Test&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__807&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align:center;margin:20px 0;&quot; class=&quot;js_darkmode__text__808&quot;&gt;&lt;span style=&quot;display: block; margin: 0px;&quot; class=&quot;js_darkmode__text__809&quot;&gt;&lt;span leaf=&quot;&quot;&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/PwADIYPgTmIqYKhAFKcjmSg79Q0ES8RoEBYfZnMP2kGsJAGz2UBAFyw81UhOQNoiazIPJp3tkhCuJcN6HgmS2LqeQfvCwaamPPb8ZpIZKSW8/640?wx_fmt=png#imgIndex=0&quot; alt=&quot;指定测试项目时，CLI 仍从当前工作目录向上查找 global.json。&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.6111111111111112&quot; data-w=&quot;1080&quot; height=&quot;221&quot; style=&quot;display: block; width: 384px !important; height: auto !important; border-radius: 8px; margin: 0px auto; visibility: visible !important;&quot; width=&quot;361&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;display:block;width:100%;height:auto;border-radius:8px;margin:0 auto;&quot; data-index=&quot;0&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/PwADIYPgTmIqYKhAFKcjmSg79Q0ES8RoEBYfZnMP2kGsJAGz2UBAFyw81UhOQNoiazIPJp3tkhCuJcN6HgmS2LqeQfvCwaamPPb8ZpIZKSW8/640?wx_fmt=png&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1#imgIndex=0&quot; _width=&quot;100%&quot; __sec_open_place_holder__=&quot;true&quot; data-before-load-time=&quot;1795356292855&quot; data-report-img-idx=&quot;0&quot; data-fail=&quot;0&quot;/&gt;&lt;/span&gt;&lt;span style=&quot;display: block; font-size: 13px; line-height: 1.6em; color: #6E667D; margin: 8px 0px 0px; letter-spacing: 0.2px;&quot; class=&quot;js_darkmode__text__810&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__811&quot;&gt;指定测试项目时，CLI 仍从当前工作目录向上查找 global.json。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__190 js_darkmode__text__812&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__191 js_darkmode__text__813&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__814&quot;&gt;DOTNET_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__815&quot;&gt;TEST_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__816&quot;&gt;RUNNER&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__817&quot;&gt; 从 .NET 11 起可用，接受 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__192 js_darkmode__text__818&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__819&quot;&gt;VS&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__820&quot;&gt;Test&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__821&quot;&gt; 或 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__193 js_darkmode__text__822&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__823&quot;&gt;Microsoft.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__824&quot;&gt;Testing.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__825&quot;&gt;Platform&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__826&quot;&gt;，不区分大小写。值为空或无法识别时，CLI 会继续读取 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__194 js_darkmode__text__827&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__828&quot;&gt;global.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__829&quot;&gt;json&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__830&quot;&gt; 中的设置。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__195 js_darkmode__text__831&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__832&quot;&gt;如果未设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__196 js_darkmode__text__833&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__834&quot;&gt;DOTNET_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__835&quot;&gt;TEST_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__836&quot;&gt;RUNNER&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__837&quot;&gt;，回到示例项目的父目录执行下面的命令，CLI 找不到子目录里的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__197 js_darkmode__text__838&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__839&quot;&gt;global.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__840&quot;&gt;json&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__841&quot;&gt;，就会使用 VSTest。本机实测，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__198 js_darkmode__text__842&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__843&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__844&quot;&gt;timeout&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__845&quot;&gt; 被当成未知选项，MSBuild 报 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__199 js_darkmode__text__846&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__847&quot;&gt;MSB1001&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__848&quot;&gt;，退出码为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__200 js_darkmode__text__849&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__850&quot;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__851&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__201 js_darkmode__text__852&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__202 js_darkmode__text__853&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__854&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__855&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__856&quot;&gt;&amp;nbsp;在父目录运行，复现 MSB1001&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__857&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__858&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__859&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__860&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__861&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__862&quot;&gt;test&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__863&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__864&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__865&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__866&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__867&quot;&gt;&amp;nbsp; Sdk11Tests/Sdk11Tests.csproj&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__868&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__869&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__870&quot;&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__871&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__872&quot;&gt;&amp;nbsp; --timeout&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__873&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__874&quot;&gt;60s&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__203 js_darkmode__text__875&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__876&quot;&gt;模板可能会在项目或解决方案目录里创建或修改 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__204 js_darkmode__text__877&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__878&quot;&gt;global.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__879&quot;&gt;json&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__880&quot;&gt;。本机在已有解决方案的目录里建子项目时，配置文件会落在解决方案旁边。改 CI 前先核对配置文件的位置和命令的工作目录。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__205 js_darkmode__text__881&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__882&quot;&gt;如果要在父目录临时使用 MTP，可以把 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__206 js_darkmode__text__883&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__884&quot;&gt;DOTNET_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__885&quot;&gt;TEST_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__886&quot;&gt;RUNNER&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__887&quot;&gt; 设为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__207 js_darkmode__text__888&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__889&quot;&gt;Microsoft.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__890&quot;&gt;Testing.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__891&quot;&gt;Platform&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__892&quot;&gt;，再用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__208 js_darkmode__text__893&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__894&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__895&quot;&gt;project&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__896&quot;&gt; 或 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__209 js_darkmode__text__897&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__898&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__899&quot;&gt;solution&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__900&quot;&gt; 指定目标。同一次调用中的测试项目都要支持 MTP。仓库同时包含 VSTest 项目时，两类项目应分开运行。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__210 js_darkmode__text__901&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__902&quot;&gt;创建 xUnit v3 项目时，也可以用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__211 js_darkmode__text__903&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__904&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__905&quot;&gt;test-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__906&quot;&gt;runner&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__907&quot;&gt;VS&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__908&quot;&gt;Test&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__909&quot;&gt;。NUnit 可用同一个模板选项选择 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__212 js_darkmode__text__910&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__911&quot;&gt;Microsoft.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__912&quot;&gt;Testing.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__913&quot;&gt;Platform&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__914&quot;&gt;。这两个模板选项都支持 C#、F# 和 VB。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__213 js_darkmode__text__915&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__916&quot;&gt;超时、失败上限和最少用例数&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__214 js_darkmode__text__917&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__918&quot;&gt;整轮测试的选项写在 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__215 js_darkmode__text__919&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__920&quot;&gt;--&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__921&quot;&gt; 之前。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__216 js_darkmode__text__922&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__923&quot;&gt;--&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__924&quot;&gt; 之后的参数会传给每个测试模块。&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;js_darkmode__217 js_darkmode__text__925&quot; width=&quot;100&quot;&gt;&lt;thead class=&quot;js_darkmode__text__926&quot;&gt;&lt;tr class=&quot;js_darkmode__text__927 firstRow&quot;&gt;&lt;th style=&quot;padding: 9px 10px; background-color: rgb(244, 240, 246); border-bottom: 1px solid rgb(228, 220, 233); color: rgb(73, 61, 86); line-height: 1.55em; text-align: left; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__218 js_darkmode__text__928&quot;&gt;&lt;section class=&quot;js_darkmode__text__929&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__930&quot;&gt;MTP 选项&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;padding: 9px 10px; background-color: rgb(244, 240, 246); border-bottom: 1px solid rgb(228, 220, 233); color: rgb(73, 61, 86); line-height: 1.55em; text-align: right; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__219 js_darkmode__text__931&quot;&gt;&lt;section class=&quot;js_darkmode__text__932&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__933&quot;&gt;触发时的退出码&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody class=&quot;js_darkmode__text__934&quot;&gt;&lt;tr class=&quot;js_darkmode__text__935&quot;&gt;&lt;td style=&quot;padding: 9px 10px; background-color: rgb(255, 254, 254); border-bottom: 1px solid rgb(239, 234, 242); color: rgb(48, 44, 56); line-height: 1.65em; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__220 js_darkmode__text__936&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__221 js_darkmode__text__937&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__938&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__939&quot;&gt;timeout&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__222 js_darkmode__text__940&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__223 js_darkmode__text__941&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__942&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;js_darkmode__text__943&quot;&gt;&lt;td style=&quot;padding: 9px 10px; background-color: rgb(255, 254, 254); border-bottom: 1px solid rgb(239, 234, 242); color: rgb(48, 44, 56); line-height: 1.65em; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__224 js_darkmode__text__944&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__225 js_darkmode__text__945&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__946&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__947&quot;&gt;maximum-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__948&quot;&gt;failed-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__949&quot;&gt;tests&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__226 js_darkmode__text__950&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__227 js_darkmode__text__951&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__952&quot;&gt;13&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;js_darkmode__text__953&quot;&gt;&lt;td style=&quot;padding: 9px 10px; background-color: rgb(255, 254, 254); border-bottom: 1px solid rgb(239, 234, 242); color: rgb(48, 44, 56); line-height: 1.65em; overflow-wrap: break-word; word-break: normal;&quot; class=&quot;js_darkmode__228 js_darkmode__text__954&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__229 js_darkmode__text__955&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__956&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__957&quot;&gt;minimum-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__958&quot;&gt;expected-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__959&quot;&gt;tests&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;padding:9px 10px;background-color:#fffefe;border-bottom:1px solid #efeaf2;color:#302c38;line-height:1.65em;text-align:right;overflow-wrap:break-word;word-break:normal;&quot; class=&quot;js_darkmode__230 js_darkmode__text__960&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__231 js_darkmode__text__961&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__962&quot;&gt;9&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__232 js_darkmode__text__963&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__233 js_darkmode__text__964&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__965&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__966&quot;&gt;test&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__967&quot;&gt; 的 MTP 模式从 .NET 10 SDK 起可用，要求 MTP 1.7 或更高版本。整轮的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__234 js_darkmode__text__968&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__969&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__970&quot;&gt;minimum-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__971&quot;&gt;expected-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__972&quot;&gt;tests&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__973&quot;&gt; 也是从 .NET 10 SDK 开始支持的。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__235 js_darkmode__text__974&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__975&quot;&gt;超时和失败上限是 .NET 11 SDK 新增的，微软标注的最低支持版本是 MTP 2.4。本机模板所用的 MTP 2.0.2 也能执行这两个选项。给 CI 配置版本时，以官方支持要求为准。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__236 js_darkmode__text__976&quot;&gt;&lt;span style=&quot;font-weight:700;color:#6c3e27;&quot; class=&quot;js_darkmode__237 js_darkmode__text__977&quot;&gt;超时。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__238 js_darkmode__text__979&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__980&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__981&quot;&gt;timeout&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__982&quot;&gt;90s&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__983&quot;&gt; 从第一个测试模块开始执行时计时，构建和依赖还原的耗时不计入。到时后，CLI 停止调度新模块，并向已启动的模块发送取消请求。本机用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__239 js_darkmode__text__984&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__985&quot;&gt;Thread.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__986&quot;&gt;Sleep&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__987&quot;&gt; 让一个用例同步等待 10 秒，再设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__240 js_darkmode__text__988&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__989&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__990&quot;&gt;timeout&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__991&quot;&gt;3s&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__992&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:0 0 22px;border:1px solid #d6e6de;border-radius:9px;background-color:#f6faf8;&quot; class=&quot;js_darkmode__241 js_darkmode__text__993&quot;&gt;&lt;p style=&quot;margin: 0px; padding: 7px 12px; background-color: rgb(234, 243, 239); border-radius: 8px 8px 0px 0px; border-bottom: 1px solid rgb(214, 230, 222); color: rgb(49, 90, 75); font-size: 12px; font-weight: 600; line-height: 1.5em;&quot; class=&quot;js_darkmode__242 js_darkmode__text__994&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__995&quot;&gt;输出 · 整轮超时，退出码 3&lt;/span&gt;&lt;/p&gt;&lt;code style=&quot;display: block; padding: 9px 12px 11px; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; line-height: 1.7em; color: rgb(41, 62, 55); white-space: pre-wrap; overflow-wrap: anywhere;&quot; class=&quot;js_darkmode__text__996&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__997&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__998&quot;&gt;Test run summary: Aborted&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__999&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1000&quot;&gt;&amp;nbsp; total: 1&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1001&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1002&quot;&gt;&amp;nbsp; failed: 0&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1003&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1004&quot;&gt;&amp;nbsp; succeeded: 1&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1005&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1006&quot;&gt;&amp;nbsp; skipped: 0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__243 js_darkmode__text__1007&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__244 js_darkmode__text__1008&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1009&quot;&gt;succeeded:&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1010&quot;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1011&quot;&gt; 表示这个用例本身通过了。由于 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__245 js_darkmode__text__1012&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1013&quot;&gt;Thread.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1014&quot;&gt;Sleep&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1015&quot;&gt; 不响应取消，CLI 等了约 10 秒才结束，整轮结果仍是 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__246 js_darkmode__text__1016&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1017&quot;&gt;Aborted&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1018&quot;&gt;，退出码为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__247 js_darkmode__text__1019&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1020&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1021&quot;&gt;。要让 xUnit 用例响应取消，可以把 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__248 js_darkmode__text__1022&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1023&quot;&gt;Test&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1024&quot;&gt;Context.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1025&quot;&gt;Current.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1026&quot;&gt;Cancellation&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1027&quot;&gt;Token&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1028&quot;&gt; 传给支持取消的操作，例如 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__249 js_darkmode__text__1029&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1030&quot;&gt;Task.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1031&quot;&gt;Delay&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1032&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__250 js_darkmode__text__1033&quot;&gt;&lt;span style=&quot;font-weight:700;color:#6c3e27;&quot; class=&quot;js_darkmode__251 js_darkmode__text__1034&quot;&gt;失败上限。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__252 js_darkmode__text__1036&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1037&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1038&quot;&gt;maximum-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1039&quot;&gt;failed-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1040&quot;&gt;tests&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1041&quot;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1042&quot;&gt; 会把失败、异常、超时和取消的用例都计入失败数。达到上限后，CLI 会停止调度新模块。本机用三个用例验证，其中两个失败。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:0 0 22px;border:1px solid #d6e6de;border-radius:9px;background-color:#f6faf8;&quot; class=&quot;js_darkmode__253 js_darkmode__text__1043&quot;&gt;&lt;p style=&quot;margin: 0px; padding: 7px 12px; background-color: rgb(234, 243, 239); border-radius: 8px 8px 0px 0px; border-bottom: 1px solid rgb(214, 230, 222); color: rgb(49, 90, 75); font-size: 12px; font-weight: 600; line-height: 1.5em;&quot; class=&quot;js_darkmode__254 js_darkmode__text__1044&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1045&quot;&gt;输出 · 达到失败上限，退出码 13&lt;/span&gt;&lt;/p&gt;&lt;code style=&quot;display: block; padding: 9px 12px 11px; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; line-height: 1.7em; color: rgb(41, 62, 55); white-space: pre-wrap; overflow-wrap: anywhere;&quot; class=&quot;js_darkmode__text__1046&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1047&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1048&quot;&gt;Test run summary: Aborted&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1049&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1050&quot;&gt;&amp;nbsp; total: 3&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1051&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1052&quot;&gt;&amp;nbsp; failed: 2&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1053&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1054&quot;&gt;&amp;nbsp; succeeded: 1&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1055&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1056&quot;&gt;&amp;nbsp; skipped: 0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__255 js_darkmode__text__1057&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1058&quot;&gt;即使上限设为 1，停止生效前仍可能收到两条失败结果，所以最终计数可以超过上限。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__256 js_darkmode__text__1059&quot;&gt;&lt;span style=&quot;font-weight:700;color:#6c3e27;&quot; class=&quot;js_darkmode__257 js_darkmode__text__1060&quot;&gt;最少用例数。&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1062&quot;&gt; 筛选条件过严时，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__258 js_darkmode__text__1063&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1064&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1065&quot;&gt;minimum-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1066&quot;&gt;expected-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1067&quot;&gt;tests&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1068&quot;&gt; 可以防止 CI 在用例不足的情况下通过。本机把最少用例数设为 5，唯一的用例通过了，整轮仍因数量不足返回 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__259 js_darkmode__text__1069&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1070&quot;&gt;9&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1071&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__260 js_darkmode__text__1072&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1073&quot;&gt;对整轮测试计数时，跳过的用例也算在内。把同名选项放在 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__261 js_darkmode__text__1074&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1075&quot;&gt;--&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1076&quot;&gt; 之后，则由各模块分别检查用例数，跳过的用例不计入各模块的结果。&lt;/span&gt;&lt;/p&gt;&lt;blockquote style=&quot;background-color: rgb(250, 246, 241); border-width: 1px 1px 1px 2px; border-style: solid; border-color: rgb(235, 223, 212) rgb(235, 223, 212) rgb(235, 223, 212) rgb(189, 148, 117); border-image: none; border-radius: 0px 7px 7px 0px; padding: 12px 13px; margin: 21px 0px; color: rgb(81, 59, 50); font-size: 15px; line-height: 1.75em;&quot; class=&quot;js_darkmode__262 js_darkmode__text__1077&quot;&gt;&lt;span style=&quot;font-weight:700;&quot; class=&quot;js_darkmode__text__1078&quot;&gt;模块和整轮的退出码可能不同。&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__1080&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1081&quot;&gt;&amp;nbsp;用模板自带的 MTP 2.0.2 运行一个只有跳过用例的项目时，模块报告 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__263 js_darkmode__text__1082&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1083&quot;&gt;8&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1084&quot;&gt;，整轮返回 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__264 js_darkmode__text__1085&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1086&quot;&gt;0&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1087&quot;&gt;。按微软文档，未设置最少用例数时，整轮全部跳过应返回 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__265 js_darkmode__text__1088&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1089&quot;&gt;8&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1090&quot;&gt;。&lt;/span&gt;&lt;/section&gt;&lt;/blockquote&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__266 js_darkmode__text__1091&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1092&quot;&gt;MTP 2.3 起提供 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__267 js_darkmode__text__1093&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1094&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1095&quot;&gt;zero-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1096&quot;&gt;tests-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1097&quot;&gt;policy&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1098&quot;&gt;，可设置模块在用例全部跳过时的行为。如果 CI 要把这种情况判为失败，先用 CI 实际安装的 SDK 和 MTP 版本验证整轮退出码。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__268 js_darkmode__text__1099&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1100&quot;&gt;多项目、报告和设备测试&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;margin: 12px 0px 16px; padding-left: 22px; font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.75em; letter-spacing: 0.3px;&quot; class=&quot;js_darkmode__269 js_darkmode__text__1101 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__1103&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1104&quot;&gt;输出与报告：&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__271 js_darkmode__text__1105&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1106&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1107&quot;&gt;artifacts-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1108&quot;&gt;path&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1109&quot;&gt; 设置 artifacts 路径。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__272 js_darkmode__text__1110&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1111&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1112&quot;&gt;results-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1113&quot;&gt;directory-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1114&quot;&gt;layout&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1115&quot;&gt;per-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1116&quot;&gt;module&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1117&quot;&gt; 为各模块分开存放报告，默认是 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__273 js_darkmode__text__1118&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1119&quot;&gt;flat&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1120&quot;&gt;。启用 SDK artifacts 布局时，报告、覆盖率和诊断默认写入 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__274 js_darkmode__text__1121&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1122&quot;&gt;&amp;lt;Artifacts&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1123&quot;&gt;Path&amp;gt;/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1124&quot;&gt;test/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1125&quot;&gt;&amp;lt;project&amp;gt;/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1126&quot;&gt;&amp;lt;pivot&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1127&quot;&gt;。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__1129&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1130&quot;&gt;构建与筛选：&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__276 js_darkmode__text__1131&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1132&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1133&quot;&gt;no-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1134&quot;&gt;dependencies&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1135&quot;&gt; 跳过项目引用的构建，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__277 js_darkmode__text__1136&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1137&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1138&quot;&gt;ucr&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1139&quot;&gt; 按当前运行时还原和构建。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__278 js_darkmode__text__1140&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1141&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1142&quot;&gt;test-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1143&quot;&gt;modules&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1144&quot;&gt; 支持用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__279 js_darkmode__text__1145&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1146&quot;&gt;!&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1147&quot;&gt; 排除匹配项，用分号分隔多个模式。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__1149&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1150&quot;&gt;列出测试用例：&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__281 js_darkmode__text__1151&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1152&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1153&quot;&gt;list-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1154&quot;&gt;tests&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1155&quot;&gt;json&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1156&quot;&gt; 输出带版本号的 JSON，按程序集、目标框架和体系结构分组，包含可用的测试标识、源代码位置、方法和特征。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__1158&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1159&quot;&gt;终端日志：&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__283 js_darkmode__text__1160&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1161&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1162&quot;&gt;nologo&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1163&quot;&gt; 对应 MTP 的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__284 js_darkmode__text__1164&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1165&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1166&quot;&gt;no-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1167&quot;&gt;banner&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1168&quot;&gt;。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__285 js_darkmode__text__1169&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1170&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1171&quot;&gt;tl&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1172&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__286 js_darkmode__text__1173&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1174&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1175&quot;&gt;terminallogger&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1176&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__287 js_darkmode__text__1177&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1178&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1179&quot;&gt;tlp&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1180&quot;&gt; 转发给 MSBuild。支持协议 1.1.0 的测试宿主会把 stdout、stderr 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__288 js_darkmode__text__1181&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1182&quot;&gt;I&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1183&quot;&gt;Output&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1184&quot;&gt;Device&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1185&quot;&gt; 消息实时转到终端。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__1187&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1188&quot;&gt;遍历项目：&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__290 js_darkmode__text__1189&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1190&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1191&quot;&gt;test&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1192&quot;&gt;dirs.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1193&quot;&gt;proj&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1194&quot;&gt; 支持 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__291 js_darkmode__text__1195&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1196&quot;&gt;Microsoft.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1197&quot;&gt;Build.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1198&quot;&gt;Traversal&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1199&quot;&gt; 项目，递归展开嵌套引用、去重，并按引用里配的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__292 js_darkmode__text__1200&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1201&quot;&gt;Configuration&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1202&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__293 js_darkmode__text__1203&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1204&quot;&gt;Platform&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1205&quot;&gt; 执行。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__1207&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1208&quot;&gt;构建诊断：多项目、多目标框架和设备测试共用一个 MSBuild 会话，用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__295 js_darkmode__text__1209&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1210&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1211&quot;&gt;test&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1212&quot;&gt;-bl&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1213&quot;&gt; 可在同一份二进制日志中查看设备选择、部署与运行参数。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__296 js_darkmode__text__1214&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1215&quot;&gt;这版还提供实验性的受影响测试流程，可只运行受代码改动影响的用例。使用前要单独安装 MTP 扩展，并设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__297 js_darkmode__text__1216&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1217&quot;&gt;DOTNET_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1218&quot;&gt;CLI_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1219&quot;&gt;ENABLE_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1220&quot;&gt;AFFECTED_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1221&quot;&gt;TESTS=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1222&quot;&gt;1&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1223&quot;&gt;。先用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__298 js_darkmode__text__1224&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1225&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1226&quot;&gt;collect-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1227&quot;&gt;test-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1228&quot;&gt;map&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1229&quot;&gt; 收集映射，再单独用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__299 js_darkmode__text__1230&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1231&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1232&quot;&gt;affected-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1233&quot;&gt;tests&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1234&quot;&gt; 运行测试。这两个选项都不能与设备测试、并行模块或最少用例数策略组合。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__300 js_darkmode__text__1235&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1236&quot;&gt;交互终端的进度区会显示正在执行的测试；Ctrl+C 改为两阶段：第一次停止调度并请求协作取消，第二次强制终止子进程。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__301 js_darkmode__text__1237&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1238&quot;&gt;Android、iOS、macOS 和 Mac Catalyst 的工作负载测试模板默认使用 MSTest。Android 和 iOS 可以用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__302 js_darkmode__text__1239&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1240&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1241&quot;&gt;test&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1242&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1243&quot;&gt;device&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1244&quot;&gt;&amp;lt;id&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1245&quot;&gt; 选择设备、模拟器或仿真器，只有一个可用设备时会自动选中。部署或获取运行参数失败时，CLI 会把 MSBuild 的原始错误显示出来。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:34px 0 15px;padding:7px 10px;background-color:#f4eef8;border:1px solid #e8dcef;border-radius:7px;&quot; class=&quot;js_darkmode__303 js_darkmode__text__1246&quot;&gt;&lt;h2 style=&quot;font-size: 19px; color: rgb(72, 52, 93); margin: 0px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 28px; display: table; table-layout: fixed; width: 100%;&quot; class=&quot;js_darkmode__text__1247&quot;&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;width:35px;&quot; class=&quot;js_darkmode__text__1248&quot;&gt;&lt;span style=&quot;display: block; width: 26px; margin: 2px 0px 0px; background-color: #E8DCF2; border-radius: 5px; text-align: center; color: #604778; font-size: 13px; line-height: 24px; font-variant-numeric: tabular-nums;&quot; class=&quot;js_darkmode__304 js_darkmode__text__1249&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1250&quot;&gt;04&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__1251&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1252&quot;&gt;解决方案：.slnx 与 .slnf&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__305 js_darkmode__text__1253&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1254&quot;&gt;新建和迁移解决方案&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__306 js_darkmode__text__1255&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1256&quot;&gt;从 .NET 10 起，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__307 js_darkmode__text__1257&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1258&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1259&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1260&quot;&gt;sln&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1261&quot;&gt; 就默认生成 XML 格式的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__308 js_darkmode__text__1262&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1263&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1264&quot;&gt;slnx&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1265&quot;&gt;。.NET 11 保持这个默认值，同时补齐了创建和编辑 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__309 js_darkmode__text__1266&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1267&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1268&quot;&gt;slnf&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1269&quot;&gt; 筛选器的命令。用一个控制台项目就能看清这两个文件的关系。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__310 js_darkmode__text__1270&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__311 js_darkmode__text__1271&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1272&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__1273&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1274&quot;&gt;&amp;nbsp;创建 Demo.slnx 并添加项目&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__1275&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1276&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1277&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1278&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1279&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1280&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1281&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1282&quot;&gt;sln&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1283&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1284&quot;&gt;-n&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1285&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1286&quot;&gt;Demo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1287&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1288&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1289&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1290&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1291&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1292&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1293&quot;&gt;console&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1294&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1295&quot;&gt;-o&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1296&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1297&quot;&gt;App&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1298&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1299&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1300&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1301&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1302&quot;&gt;sln&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1303&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1304&quot;&gt;Demo.slnx&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1305&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1306&quot;&gt;add&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1307&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1308&quot;&gt;App/App.csproj&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__312 js_darkmode__text__1309&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1310&quot;&gt;添加项目后的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__313 js_darkmode__text__1311&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1312&quot;&gt;Demo.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1313&quot;&gt;slnx&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1314&quot;&gt; 是一段很短的 XML。需要旧格式时，可以在创建解决方案时显式传 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__314 js_darkmode__text__1315&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1316&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1317&quot;&gt;format&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1318&quot;&gt;sln&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1319&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__315 js_darkmode__text__1320&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__316 js_darkmode__text__1321&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1322&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__1323&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1324&quot;&gt;&amp;nbsp;Demo.slnx&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__1325&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1326&quot;&gt;&lt;span style=&quot;color:#A7A2B8;&quot; class=&quot;js_darkmode__text__1327&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1328&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot; class=&quot;js_darkmode__text__1329&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1330&quot;&gt;Solution&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#A7A2B8;&quot; class=&quot;js_darkmode__text__1331&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1332&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1333&quot;&gt;&lt;span style=&quot;color:#A7A2B8;&quot; class=&quot;js_darkmode__text__1334&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1335&quot;&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot; class=&quot;js_darkmode__text__1336&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1337&quot;&gt;Project&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE;&quot; class=&quot;js_darkmode__text__1338&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1339&quot;&gt;Path&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1340&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1341&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1342&quot;&gt;&amp;quot;App/App.csproj&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#A7A2B8;&quot; class=&quot;js_darkmode__text__1343&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1344&quot;&gt;&amp;nbsp;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1345&quot;&gt;&lt;span style=&quot;color:#A7A2B8;&quot; class=&quot;js_darkmode__text__1346&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1347&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#84BDF0;&quot; class=&quot;js_darkmode__text__1348&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1349&quot;&gt;Solution&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#A7A2B8;&quot; class=&quot;js_darkmode__text__1350&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1351&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__317 js_darkmode__text__1352&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1353&quot;&gt;用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__318 js_darkmode__text__1354&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1355&quot;&gt;migrate&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1356&quot;&gt; 可以把旧 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__319 js_darkmode__text__1357&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1358&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1359&quot;&gt;sln&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1360&quot;&gt; 转成 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__320 js_darkmode__text__1361&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1362&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1363&quot;&gt;slnx&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1364&quot;&gt;。例如，迁移 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__321 js_darkmode__text__1365&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1366&quot;&gt;Old.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1367&quot;&gt;sln&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1368&quot;&gt; 会生成同名的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__322 js_darkmode__text__1369&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1370&quot;&gt;Old.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1371&quot;&gt;slnx&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1372&quot;&gt;，并保留原文件。&lt;/span&gt;&lt;/p&gt;&lt;blockquote style=&quot;background-color: rgb(250, 246, 241); border-width: 1px 1px 1px 2px; border-style: solid; border-color: rgb(235, 223, 212) rgb(235, 223, 212) rgb(235, 223, 212) rgb(189, 148, 117); border-image: none; border-radius: 0px 7px 7px 0px; padding: 12px 13px; margin: 21px 0px; color: rgb(81, 59, 50); font-size: 15px; line-height: 1.75em;&quot; class=&quot;js_darkmode__323 js_darkmode__text__1373&quot;&gt;&lt;span style=&quot;font-weight:700;&quot; class=&quot;js_darkmode__text__1374&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1375&quot;&gt;迁移前先检查同名 &lt;/span&gt;&lt;code style=&quot;background-color: rgb(238, 243, 240); color: rgb(34, 91, 80); font-size: 90%; padding: 1px; border-radius: 2px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; letter-spacing: 0px; white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere;&quot; class=&quot;js_darkmode__324 js_darkmode__text__1376&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1377&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1378&quot;&gt;slnx&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1379&quot;&gt;。&lt;/span&gt;&lt;/span&gt;&lt;section class=&quot;js_darkmode__text__1380&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1381&quot;&gt;&amp;nbsp;微软文档说，目标 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__325 js_darkmode__text__1382&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1383&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1384&quot;&gt;slnx&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1385&quot;&gt; 已存在时命令会失败。本机 SDK 11.0.100 实测，AOT 宿主和托管 CLI 都覆盖了已有文件，退出码均为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__326 js_darkmode__text__1386&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1387&quot;&gt;0&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1388&quot;&gt;。&lt;/span&gt;&lt;/section&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__327 js_darkmode__text__1389&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__328 js_darkmode__text__1390&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1391&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__1392&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1393&quot;&gt;&amp;nbsp;把旧解决方案转换为 .slnx&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__1394&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1395&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1396&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1398&quot;&gt;sln&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1400&quot;&gt;Old.sln&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1402&quot;&gt;migrate&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__329 js_darkmode__text__1404&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1405&quot;&gt;两个文件并存时，构建脚本里要明确用哪个解决方案文件。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__330 js_darkmode__text__1406&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1407&quot;&gt;创建和维护解决方案筛选器&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__331 js_darkmode__text__1408&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1409&quot;&gt;解决方案筛选器（&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__332 js_darkmode__text__1410&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1411&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1412&quot;&gt;slnf&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1413&quot;&gt;）引用一个解决方案，并记录选中的项目。用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__333 js_darkmode__text__1414&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1415&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1416&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1417&quot;&gt;slnf&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1418&quot;&gt; 创建筛选器，再用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__334 js_darkmode__text__1419&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1420&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1421&quot;&gt;sln&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1422&quot;&gt; 添加、移除或列出其中的项目。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__335 js_darkmode__text__1423&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__336 js_darkmode__text__1424&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1425&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__1426&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1427&quot;&gt;&amp;nbsp;创建筛选器，添加并列出项目&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__1428&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1429&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1430&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1431&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1432&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1433&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1434&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1435&quot;&gt;slnf&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1436&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1437&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1438&quot;&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1439&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1440&quot;&gt;&amp;nbsp; --parent-solution&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1441&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1442&quot;&gt;Demo.slnx&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1443&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1444&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1445&quot;&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1446&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1447&quot;&gt;&amp;nbsp; --name&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1448&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1449&quot;&gt;AppOnly&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1450&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1451&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1452&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1453&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1454&quot;&gt;sln&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1455&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1456&quot;&gt;AppOnly.slnf&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1457&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1458&quot;&gt;add&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1459&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1460&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1461&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1462&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1463&quot;&gt;&amp;nbsp; App/App.csproj&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1464&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1465&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1466&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1467&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1468&quot;&gt;sln&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1469&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1470&quot;&gt;AppOnly.slnf&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1471&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1472&quot;&gt;list&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__337 js_darkmode__text__1473&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1474&quot;&gt;第一条命令生成一个 JSON 文件，里面的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__338 js_darkmode__text__1475&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1476&quot;&gt;projects&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1477&quot;&gt; 起初为空。添加后，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__339 js_darkmode__text__1478&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1479&quot;&gt;list&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1480&quot;&gt; 会输出 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__340 js_darkmode__text__1481&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1482&quot;&gt;App/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1483&quot;&gt;App.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1484&quot;&gt;csproj&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1485&quot;&gt;。如果要把这个项目移出筛选器，把添加命令中的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__341 js_darkmode__text__1486&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1487&quot;&gt;add&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1488&quot;&gt; 换成 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__342 js_darkmode__text__1489&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1490&quot;&gt;remove&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1491&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__343 js_darkmode__text__1492&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__344 js_darkmode__text__1493&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1494&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1495&quot;&gt;name&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1496&quot;&gt; 只需写基本文件名，模板会自动加上 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__345 js_darkmode__text__1497&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1498&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1499&quot;&gt;slnf&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1500&quot;&gt;。本机传入 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__346 js_darkmode__text__1501&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1502&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1503&quot;&gt;name&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1504&quot;&gt;My&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1505&quot;&gt;App.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1506&quot;&gt;slnf&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1507&quot;&gt; 时，生成的文件名变成了 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__347 js_darkmode__text__1508&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1509&quot;&gt;My&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1510&quot;&gt;App.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1511&quot;&gt;slnf.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1512&quot;&gt;slnf&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1513&quot;&gt;。省略 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__348 js_darkmode__text__1514&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1515&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1516&quot;&gt;parent-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1517&quot;&gt;solution&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1518&quot;&gt; 时，模板默认引用同名的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__349 js_darkmode__text__1519&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1520&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1521&quot;&gt;slnx&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1522&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__350 js_darkmode__text__1523&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1524&quot;&gt;筛选器只记录项目路径，所以对 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__351 js_darkmode__text__1525&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1526&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1527&quot;&gt;slnf&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1528&quot;&gt; 执行 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__352 js_darkmode__text__1529&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1530&quot;&gt;add&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1531&quot;&gt; 时没有 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__353 js_darkmode__text__1532&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1533&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1534&quot;&gt;in-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1535&quot;&gt;root&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1536&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__354 js_darkmode__text__1537&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1538&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1539&quot;&gt;solution-&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1540&quot;&gt;folder&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1541&quot;&gt; 选项。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__355 js_darkmode__text__1542&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1543&quot;&gt;list&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1544&quot;&gt; 从 .NET SDK 9.0.3xx 起就能读取 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__356 js_darkmode__text__1545&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1546&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1547&quot;&gt;slnf&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1548&quot;&gt;，.NET 11 新增的是 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__357 js_darkmode__text__1549&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1550&quot;&gt;slnf&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1551&quot;&gt; 模板以及对筛选器的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__358 js_darkmode__text__1552&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1553&quot;&gt;add&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1554&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__359 js_darkmode__text__1555&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1556&quot;&gt;remove&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1557&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:34px 0 15px;padding:7px 10px;background-color:#f4eef8;border:1px solid #e8dcef;border-radius:7px;&quot; class=&quot;js_darkmode__360 js_darkmode__text__1558&quot;&gt;&lt;h2 style=&quot;font-size: 19px; color: rgb(72, 52, 93); margin: 0px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 28px; display: table; table-layout: fixed; width: 100%;&quot; class=&quot;js_darkmode__text__1559&quot;&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;width:35px;&quot; class=&quot;js_darkmode__text__1560&quot;&gt;&lt;span style=&quot;display: block; width: 26px; margin: 2px 0px 0px; background-color: #E8DCF2; border-radius: 5px; text-align: center; color: #604778; font-size: 13px; line-height: 24px; font-variant-numeric: tabular-nums;&quot; class=&quot;js_darkmode__361 js_darkmode__text__1561&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1562&quot;&gt;05&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__1563&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1564&quot;&gt;发布：容器与 Native AOT&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__362 js_darkmode__text__1565&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1566&quot;&gt;固定容器镜像的时间戳&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__363 js_darkmode__text__1567&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1568&quot;&gt;同一份源码发布两次，也可能因为时间戳、归档头或文件顺序的差异，得到不同的镜像摘要。.NET 11 支持在发布时用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__364 js_darkmode__text__1569&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1570&quot;&gt;SOURCE_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1571&quot;&gt;DATE_&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1572&quot;&gt;EPOCH&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1573&quot;&gt; 固定时间戳。下面以当前 Git 提交的 Unix 时间戳为例，在项目目录中将 Linux x64 镜像发布为本地归档。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__365 js_darkmode__text__1574&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__366 js_darkmode__text__1575&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1576&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__1577&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1578&quot;&gt;&amp;nbsp;按 Git 提交时间发布镜像归档&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__1579&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1580&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1581&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1582&quot;&gt;EPOCH=$(git&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1583&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1584&quot;&gt;log&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1585&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1586&quot;&gt;-1&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1587&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1588&quot;&gt;--format=%ct)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1589&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1590&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1591&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1592&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1593&quot;&gt;publish&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1594&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1595&quot;&gt;--os&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1596&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1597&quot;&gt;linux&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1598&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1599&quot;&gt;--arch&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1600&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1601&quot;&gt;x64&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1602&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1603&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1604&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1605&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1606&quot;&gt;&amp;nbsp; /t:PublishContainer&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1607&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1608&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1609&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1610&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1611&quot;&gt;&amp;nbsp; -p:SOURCE_DATE_EPOCH=&amp;quot;$EPOCH&amp;quot;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1612&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1613&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1614&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1615&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1616&quot;&gt;&amp;nbsp; -p:ContainerArchiveOutputPath=app.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__367 js_darkmode__text__1617&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1618&quot;&gt;输出本地归档无需安装容器运行时。要让两次发布生成相同的镜像摘要，还要保持基础镜像、依赖和构建参数一致。同一个镜像标签（tag）可能指向不同版本，做对照时可用镜像摘要（digest）固定基础镜像。本节示例依据微软文档。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__368 js_darkmode__text__1619&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1620&quot;&gt;本地容器运行时与远程推送&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__369 js_darkmode__text__1621&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1622&quot;&gt;发布到本地运行时，Windows 优先查找 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__370 js_darkmode__text__1623&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1624&quot;&gt;wslc&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1625&quot;&gt;，macOS 优先查找 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__371 js_darkmode__text__1626&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1627&quot;&gt;container&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1628&quot;&gt;，找不到时再尝试 Docker 或 Podman。需要指定运行时时，在项目或发布配置里设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__372 js_darkmode__text__1629&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1630&quot;&gt;Local&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1631&quot;&gt;Registry&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1632&quot;&gt;。Podman 也能发布多架构镜像，在 Linux 上可以用 rootless 模式运行。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__373 js_darkmode__text__1633&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1634&quot;&gt;推送到远程仓库时，SDK 会先检查仓库是否已有相同的镜像清单。若已存在，SDK 会跳过对镜像层和配置的重复处理，仍会应用本次指定的所有标签。设为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__374 js_darkmode__text__1635&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1636&quot;&gt;Container&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1637&quot;&gt;Push&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1638&quot;&gt;No&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1639&quot;&gt;Cache=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1640&quot;&gt;true&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1641&quot;&gt; 可以跳过清单检查，SDK 仍会逐项检查镜像层和配置对象是否已存在。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__375 js_darkmode__text__1642&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1643&quot;&gt;单独启用 Native AOT 优化发布&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__376 js_darkmode__text__1644&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1645&quot;&gt;.NET 11 对 Native AOT 应用仍默认执行完整的构建流程。已设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__377 js_darkmode__text__1646&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1647&quot;&gt;Publish&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1648&quot;&gt;Aot=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1649&quot;&gt;true&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1650&quot;&gt; 的项目可另外设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__378 js_darkmode__text__1651&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1652&quot;&gt;Use&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1653&quot;&gt;Optimized&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1654&quot;&gt;Publish=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1655&quot;&gt;true&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1656&quot;&gt;（默认 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__379 js_darkmode__text__1657&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1658&quot;&gt;false&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1659&quot;&gt;），只执行编译和发布所需的目标。自定义 MSBuild 目标如果挂在完整的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__380 js_darkmode__text__1660&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1661&quot;&gt;Build&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1662&quot;&gt; 目标链上，启用优化前要确认它们是否仍会执行。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__381 js_darkmode__text__1663&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1664&quot;&gt;SDK 还修复了重复执行单文件发布时误删上一次留下的原生 DLL 的问题。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:34px 0 15px;padding:7px 10px;background-color:#f4eef8;border:1px solid #e8dcef;border-radius:7px;&quot; class=&quot;js_darkmode__382 js_darkmode__text__1665&quot;&gt;&lt;h2 style=&quot;font-size: 19px; color: rgb(72, 52, 93); margin: 0px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 28px; display: table; table-layout: fixed; width: 100%;&quot; class=&quot;js_darkmode__text__1666&quot;&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;width:35px;&quot; class=&quot;js_darkmode__text__1667&quot;&gt;&lt;span style=&quot;display: block; width: 26px; margin: 2px 0px 0px; background-color: #E8DCF2; border-radius: 5px; text-align: center; color: #604778; font-size: 13px; line-height: 24px; font-variant-numeric: tabular-nums;&quot; class=&quot;js_darkmode__383 js_darkmode__text__1668&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1669&quot;&gt;06&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__1670&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1671&quot;&gt;NuGet、分析器与开发工具&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__384 js_darkmode__text__1672&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1673&quot;&gt;为 NuGet 包源设置发布冷却期&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__385 js_darkmode__text__1674&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1675&quot;&gt;NuGet 8.0、.NET SDK 11.0.100 和 Visual Studio 18.12 起支持为包源设置发布冷却期。设为 48 小时后，自动选版本的命令会在这个源中排除发布未满 48 小时的版本，配置了例外的包除外。下面以 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__386 js_darkmode__text__1676&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1677&quot;&gt;nuget.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1678&quot;&gt;config&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1679&quot;&gt; 中已有的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__387 js_darkmode__text__1680&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1681&quot;&gt;localtest&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1682&quot;&gt; 源为例。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__388 js_darkmode__text__1683&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__389 js_darkmode__text__1684&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1685&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__1686&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1687&quot;&gt;&amp;nbsp;将包源的发布冷却期设为 48 小时&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__1688&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1689&quot;&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1690&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1691&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1692&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1693&quot;&gt;nuget&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1694&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1695&quot;&gt;update&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1696&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1697&quot;&gt;source&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1698&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1699&quot;&gt;localtest&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1700&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1701&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1702&quot;&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1703&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1704&quot;&gt;&amp;nbsp; --min-publish-age-hours&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1705&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1706&quot;&gt;48&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DDA88E;&quot; class=&quot;js_darkmode__text__1707&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1708&quot;&gt;\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1709&quot;&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1710&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1711&quot;&gt;&amp;nbsp; --configfile&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1712&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1713&quot;&gt;nuget.config&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__390 js_darkmode__text__1714&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__391 js_darkmode__text__1715&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1716&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1717&quot;&gt;nuget&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1718&quot;&gt;add&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1719&quot;&gt;source&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1720&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__392 js_darkmode__text__1721&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1722&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1723&quot;&gt;nuget&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1724&quot;&gt;update&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1725&quot;&gt;source&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1726&quot;&gt; 都会把这个选项写入包源的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__393 js_darkmode__text__1727&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1728&quot;&gt;min&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1729&quot;&gt;Publish&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1730&quot;&gt;Age&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1731&quot;&gt;Hours&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1732&quot;&gt; 属性。更新时设为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__394 js_darkmode__text__1733&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1734&quot;&gt;0&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1735&quot;&gt; 可关闭限制，省略该选项则保留原值。本机更新本地包源时，CLI 还把 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__395 js_darkmode__text__1736&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1737&quot;&gt;./&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1738&quot;&gt;localfeed&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1739&quot;&gt; 写成了绝对路径。提交配置前可以检查这一处变化。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__396 js_darkmode__text__1740&quot;&gt;&lt;span style=&quot;font-weight:700;color:#6c3e27;&quot; class=&quot;js_darkmode__397 js_darkmode__text__1741&quot;&gt;添加或更新包时。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__398 js_darkmode__text__1743&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1744&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1745&quot;&gt;package&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1746&quot;&gt;add&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1747&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__399 js_darkmode__text__1748&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1749&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1750&quot;&gt;package&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1751&quot;&gt;update&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1752&quot;&gt; 自动选版本时会应用冷却期，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__400 js_darkmode__text__1753&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1754&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1755&quot;&gt;package&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1756&quot;&gt;update&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1757&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1758&quot;&gt;vulnerable&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1759&quot;&gt; 自动选择修复版本时也一样。显式指定版本会绕过冷却期检查。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__401 js_darkmode__text__1760&quot;&gt;&lt;span style=&quot;font-weight:700;color:#6c3e27;&quot; class=&quot;js_darkmode__402 js_darkmode__text__1761&quot;&gt;还原依赖时。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__403 js_darkmode__text__1763&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1764&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1765&quot;&gt;restore&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1766&quot;&gt; 不按发布时间过滤非浮动引用和传递依赖。对 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__404 js_darkmode__text__1767&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1768&quot;&gt;1.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1769&quot;&gt;2.*&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1770&quot;&gt; 这样的浮动版本，只要有适用的源启用了冷却期，而且包未匹配例外规则，还原就会报 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__405 js_darkmode__text__1771&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1772&quot;&gt;NU1020&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1773&quot;&gt;。本机用同一个包和同一个源做对照，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__406 js_darkmode__text__1774&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1775&quot;&gt;1.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1776&quot;&gt;2.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1777&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1778&quot;&gt; 可以还原，改成 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__407 js_darkmode__text__1779&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1780&quot;&gt;1.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1781&quot;&gt;2.*&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1782&quot;&gt; 后即报错。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__408 js_darkmode__text__1783&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1784&quot;&gt;遇到 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__409 js_darkmode__text__1785&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1786&quot;&gt;NU1020&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1787&quot;&gt; 时，可以改用固定版本，或在 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__410 js_darkmode__text__1788&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1789&quot;&gt;min&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1790&quot;&gt;Publish&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1791&quot;&gt;Age&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1792&quot;&gt;Exceptions&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1793&quot;&gt; 中给指定包添加例外。规则支持按包 ID 或前缀匹配，当前配置的例外列表会整表覆盖继承来的列表。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__411 js_darkmode__text__1794&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1795&quot;&gt;项目求值与分析器&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__412 js_darkmode__text__1796&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1797&quot;&gt;MSBuild 在项目求值阶段改用新的通配符匹配器。微软在 Windows 上测试了四组项目求值负载，项目求值耗时缩短 10%～13%，内存分配减少 16%～34%。包含和排除规则重叠时收益更明显，例如用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__413 js_darkmode__text__1798&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1799&quot;&gt;**/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1800&quot;&gt;*.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1801&quot;&gt;cs&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1802&quot;&gt; 收集源文件，同时排除 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__414 js_darkmode__text__1803&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1804&quot;&gt;bin&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1805&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__415 js_darkmode__text__1806&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1807&quot;&gt;obj&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1808&quot;&gt;。这组数据衡量的是项目求值阶段。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__416 js_darkmode__text__1809&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1810&quot;&gt;规则 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__417 js_darkmode__text__1811&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1812&quot;&gt;CA1873&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1813&quot;&gt; 会提示日志参数求值可能带来的额外开销。现在它默认只报告 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__418 js_darkmode__text__1814&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1815&quot;&gt;Information&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1816&quot;&gt; 及更低级别日志中的问题，属性访问及调用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__419 js_darkmode__text__1817&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1818&quot;&gt;Get&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1819&quot;&gt;Type()&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1820&quot;&gt;、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__420 js_darkmode__text__1821&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1822&quot;&gt;Get&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1823&quot;&gt;Hash&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1824&quot;&gt;Code()&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1825&quot;&gt; 或 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__421 js_darkmode__text__1826&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1827&quot;&gt;Get&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1828&quot;&gt;Timestamp()&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1829&quot;&gt; 也不会触发这条诊断。诊断消息会注明原因，例如 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__422 js_darkmode__text__1830&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1831&quot;&gt;(method&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1832&quot;&gt;invocation)&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1833&quot;&gt; 表示该参数需要先执行一次方法调用。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__423 js_darkmode__text__1834&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__424 js_darkmode__text__1835&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1836&quot;&gt;CA1515&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1837&quot;&gt; 和 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__425 js_darkmode__text__1838&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1839&quot;&gt;CA1034&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1840&quot;&gt; 修复了涉及 C# 扩展成员的误报，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__426 js_darkmode__text__1841&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1842&quot;&gt;CA1859&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1843&quot;&gt; 修正了对默认接口实现的处理。&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__427 js_darkmode__text__1844&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1845&quot;&gt;Analysis&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1846&quot;&gt;Level=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1847&quot;&gt;latest&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1848&quot;&gt; 也改为使用 .NET 11 的规则集，修复了误用 .NET 9 规则集的问题。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__428 js_darkmode__text__1849&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1850&quot;&gt;工具打包新增 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__429 js_darkmode__text__1851&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1852&quot;&gt;NETSDK1235&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1853&quot;&gt;。项目同时设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__430 js_darkmode__text__1854&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1855&quot;&gt;Pack&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1856&quot;&gt;As&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1857&quot;&gt;Tool=&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1858&quot;&gt;true&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1859&quot;&gt; 和自定义 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__431 js_darkmode__text__1860&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1861&quot;&gt;Nuspec&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1862&quot;&gt;File&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1863&quot;&gt; 时，SDK 会提示自定义清单可能不符合 .NET 工具包的布局或标识约定。打包不会中断。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__432 js_darkmode__text__1864&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1865&quot;&gt;格式化单文件&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__433 js_darkmode__text__1866&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1867&quot;&gt;将第一块代码保存为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__434 js_darkmode__text__1868&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1869&quot;&gt;messy.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1870&quot;&gt;cs&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1871&quot;&gt;，执行 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__435 js_darkmode__text__1872&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1873&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1874&quot;&gt;format&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1875&quot;&gt;messy.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1876&quot;&gt;cs&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1877&quot;&gt;，就能看到第二块的效果。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__436 js_darkmode__text__1878&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__437 js_darkmode__text__1879&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1880&quot;&gt;csharp&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__1881&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1882&quot;&gt;&amp;nbsp;messy.cs · 格式化前&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__1883&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1884&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot; class=&quot;js_darkmode__text__1885&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1886&quot;&gt;var &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE;&quot; class=&quot;js_darkmode__text__1887&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1888&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1889&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1890&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1891&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1892&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1893&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot; class=&quot;js_darkmode__text__1894&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1895&quot;&gt;Console&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1896&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1897&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1898&quot;&gt;WriteLine&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1899&quot;&gt;( &amp;nbsp; x );&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;section style=&quot;background-color: rgb(34, 34, 56); color: rgb(230, 226, 242); font-size: 12px; line-height: 1.8em; padding: 10px 12px 14px; margin: 0px 0px 18px; border: 1px solid rgb(54, 54, 80); box-sizing: border-box; border-radius: 10px; overflow-x: auto; font-family: &amp;quot;Cascadia Code&amp;quot;, &amp;quot;JetBrains Mono&amp;quot;, &amp;quot;Fira Code&amp;quot;, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Source Code Pro&amp;quot;, &amp;quot;Sarasa Mono SC&amp;quot;, &amp;quot;Maple Mono NF CN&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: &amp;quot;liga&amp;quot;, &amp;quot;calt&amp;quot;; font-variant-ligatures: contextual; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;&quot; class=&quot;js_darkmode__438 js_darkmode__text__1900&quot;&gt;&lt;span style=&quot;display: block; color: #B9B5CF; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 0px 0px 9px; padding: 0px 0px 7px 1px; border-bottom: 1px solid #484463; line-height: 1.4em;&quot; class=&quot;js_darkmode__439 js_darkmode__text__1901&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1902&quot;&gt;csharp&lt;/span&gt;&lt;span style=&quot;margin-left:10px;color:#d0c8df;font-size:12px;font-weight:600;letter-spacing:0;text-transform:none;&quot; class=&quot;js_darkmode__text__1903&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1904&quot;&gt;&amp;nbsp;messy.cs · 格式化后&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;js_darkmode__text__1905&quot;&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1906&quot;&gt;&lt;span style=&quot;color:#84BDF0;&quot; class=&quot;js_darkmode__text__1907&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1908&quot;&gt;var&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE;&quot; class=&quot;js_darkmode__text__1909&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1910&quot;&gt;x&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1911&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#BDD5AD;&quot; class=&quot;js_darkmode__text__1912&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1913&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1914&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:block;&quot; class=&quot;js_darkmode__text__1915&quot;&gt;&lt;span style=&quot;color:#72CDBD;&quot; class=&quot;js_darkmode__text__1916&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1917&quot;&gt;Console&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1918&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA;&quot; class=&quot;js_darkmode__text__1919&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1920&quot;&gt;WriteLine&lt;/span&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1921&quot;&gt;(x);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__440 js_darkmode__text__1922&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1923&quot;&gt;在文件夹模式下，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__441 js_darkmode__text__1924&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1925&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1926&quot;&gt;format&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1927&quot;&gt; 只沿待格式化文件的父目录查找 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__442 js_darkmode__text__1928&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1929&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1930&quot;&gt;editorconfig&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1931&quot;&gt;。微软在一个单体仓库中测得，格式化单个文件的耗时从 1.09 s 降到 0.55 s。需要对整个仓库生效的配置可以放到 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__443 js_darkmode__text__1932&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1933&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1934&quot;&gt;globalconfig&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1935&quot;&gt;。多目标项目还可以用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__444 js_darkmode__text__1936&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1937&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1938&quot;&gt;framework&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1939&quot;&gt; 选择目标框架。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16.5px; color: rgb(82, 68, 94); padding-left: 8px; border-left: 2px solid rgb(198, 178, 214); margin: 20px 0px 9px; line-height: 1.52em;&quot; class=&quot;js_darkmode__445 js_darkmode__text__1940&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1941&quot;&gt;热重载与静态资源&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__446 js_darkmode__text__1942&quot;&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__447 js_darkmode__text__1943&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1944&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1945&quot;&gt;watch&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1946&quot;&gt; 支持 Aspire AppHost。应用崩溃后，再次修改相关文件时，&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__448 js_darkmode__text__1947&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1948&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1949&quot;&gt;watch&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1950&quot;&gt; 会重启应用。MAUI 和移动项目可用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__449 js_darkmode__text__1951&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1952&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1953&quot;&gt;watch&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1954&quot;&gt;--&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1955&quot;&gt;device&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1956&quot;&gt;&amp;lt;id&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1957&quot;&gt; 指定设备。存在多个可用设备时，也可以在终端中选择。所选设备需要额外的运行时标识符（RID）时，SDK 会再执行一次依赖还原。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__450 js_darkmode__text__1958&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1959&quot;&gt;这次也修复了 Windows 桌面应用的 Ctrl+C 问题、Blazor Web App 静态 SSR 页面的自动刷新，以及 iOS 上的热重载死锁。iOS 模拟器项目依然需要设置 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__451 js_darkmode__text__1960&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1961&quot;&gt;&amp;lt;Mtouch&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1962&quot;&gt;Link&amp;gt;None&amp;lt;/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1963&quot;&gt;Mtouch&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1964&quot;&gt;Link&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1965&quot;&gt; 才能使用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__452 js_darkmode__text__1966&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1967&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1968&quot;&gt;watch&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1969&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__453 js_darkmode__text__1970&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1971&quot;&gt;静态 Web 资源（Static Web Assets）新增资源组，相关资源可以共享发布信息、指纹和端点元数据。组件作者可以用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__454 js_darkmode__text__1972&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1973&quot;&gt;Additional&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1974&quot;&gt;Endpoint&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1975&quot;&gt;Definitions&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1976&quot;&gt; 声明额外的端点，例如为 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__455 js_darkmode__text__1977&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1978&quot;&gt;**/&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1979&quot;&gt;index.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1980&quot;&gt;html&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1981&quot;&gt; 定义默认文档路由。Razor 类库用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__456 js_darkmode__text__1982&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1983&quot;&gt;Microsoft.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1984&quot;&gt;Type&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1985&quot;&gt;Script.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1986&quot;&gt;MS&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1987&quot;&gt;Build&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1988&quot;&gt; 编译生成的文件也会纳入静态资源处理流程，支持压缩、生成指纹以及按需重新生成。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin:34px 0 15px;padding:7px 10px;background-color:#f4eef8;border:1px solid #e8dcef;border-radius:7px;&quot; class=&quot;js_darkmode__457 js_darkmode__text__1989&quot;&gt;&lt;h2 style=&quot;font-size: 19px; color: rgb(72, 52, 93); margin: 0px; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 28px; display: table; table-layout: fixed; width: 100%;&quot; class=&quot;js_darkmode__text__1990&quot;&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;width:35px;&quot; class=&quot;js_darkmode__text__1991&quot;&gt;&lt;span style=&quot;display: block; width: 26px; margin: 2px 0px 0px; background-color: #E8DCF2; border-radius: 5px; text-align: center; color: #604778; font-size: 13px; line-height: 24px; font-variant-numeric: tabular-nums;&quot; class=&quot;js_darkmode__458 js_darkmode__text__1992&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1993&quot;&gt;07&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;display:table-cell;vertical-align:top;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__text__1994&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1995&quot;&gt;升级后先检查什么&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/section&gt;&lt;/p&gt;&lt;ol style=&quot;margin: 12px 0px 16px; padding-left: 22px; font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.75em; letter-spacing: 0.3px;&quot; class=&quot;js_darkmode__459 js_darkmode__text__1996 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__1998&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__1999&quot;&gt;本地运行。临时传给应用的环境变量可以用 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__461 js_darkmode__text__2000&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2001&quot;&gt;dotnet&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2002&quot;&gt;run&amp;nbsp;&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2003&quot;&gt;-e&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2004&quot;&gt; 设置。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__2006&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2007&quot;&gt;CI 测试。给整轮测试加选项前，确认命令的工作目录、&lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__463 js_darkmode__text__2008&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2009&quot;&gt;global.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2010&quot;&gt;json&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2011&quot;&gt; 的位置和当前选中的运行器。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__2013&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2014&quot;&gt;解决方案。迁移前检查同名 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__465 js_darkmode__text__2015&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2016&quot;&gt;.&lt;/span&gt;&lt;wbr/&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2017&quot;&gt;slnx&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2018&quot;&gt;，切换后在脚本中明确使用哪个文件。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section class=&quot;js_darkmode__text__2020&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2021&quot;&gt;发布。比较镜像摘要时，固定时间戳和构建输入。启用 Native AOT 优化发布前，检查自定义目标是否依赖完整的 &lt;/span&gt;&lt;code style=&quot;background-color:#eef3f0;color:#225b50;font-size:90%;padding:1px 1px;border-radius:2px;font-family:-apple-system,BlinkMacSystemFont,&amp;#39;Segoe UI&amp;#39;,&amp;#39;PingFang SC&amp;#39;,&amp;#39;Hiragino Sans GB&amp;#39;,&amp;#39;Microsoft YaHei&amp;#39;,Arial,sans-serif;font-weight:600;letter-spacing:0;white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;&quot; class=&quot;js_darkmode__467 js_darkmode__text__2022&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2023&quot;&gt;Build&lt;/span&gt;&lt;/code&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2024&quot;&gt; 目标链。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;font-size: 16px; color: rgb(48, 44, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; line-height: 1.78em; margin: 0px 0px 16px; letter-spacing: 0.2px; overflow-wrap: break-word; word-break: break-all;&quot; class=&quot;js_darkmode__468 js_darkmode__text__2025&quot;&gt;&lt;span leaf=&quot;&quot; class=&quot;js_darkmode__text__2026&quot;&gt;正文里的实测都在 .NET SDK 11.0.100（macOS arm64）上完成。微软公布的数据和容器发布行为，都来自下面这些官方资料。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Sun, 22 Nov 2026 22:04:41 +0800</pubDate></item><item><title>.NET 11 来了，.NET 8 和 9 死了：一篇讲清该升还是观望</title><link>https://www.codepub.top/post/738.html</link><description>&lt;p style=&quot;font-size: 16px; line-height: 1.85; color: rgb(51, 51, 51); margin: 0px 0px 18px; visibility: visible;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__0&quot;&gt;&lt;span leaf=&quot;&quot; style=&quot;visibility: visible;&quot;&gt;11 月 10 日，.NET Conf 2026 开幕，.NET 11 正式发布。同一天，.NET 8 和 .NET 9 停止支持。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;text-align: center; visibility: visible;&quot; nodeleaf=&quot;&quot;&gt;&lt;img class=&quot;rich_pages wxw-img&quot; data-aistatus=&quot;1&quot; data-imgfileid=&quot;100005224&quot; data-ratio=&quot;0.5312117503059975&quot; data-s=&quot;300,640&quot; data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/cabVK80FcH6eqzwXrtq5jnCH3FeDKgZuVM5yoYmA3lUa4S9XUQtI3sQLe7siaQVTQG9oUwQ0I4lEf7IcUPsWHJZ7DOTJgFvz679g8eQ0fymk/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=1&quot; data-type=&quot;png&quot; data-w=&quot;817&quot; type=&quot;block&quot; data-original-style=&quot;null&quot; data-index=&quot;3&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/cabVK80FcH6eqzwXrtq5jnCH3FeDKgZuVM5yoYmA3lUa4S9XUQtI3sQLe7siaQVTQG9oUwQ0I4lEf7IcUPsWHJZ7DOTJgFvz679g8eQ0fymk/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=1&quot; _width=&quot;384px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 383.984px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1795176538738&quot; data-report-img-idx=&quot;1&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;span leaf=&quot;&quot;&gt;我把官方文档和两篇发布会报道对了一遍，下面只列已公开的信息。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:46px 0 0;&quot;&gt;&lt;span style=&quot;display:inline-block;background:#a63d2f;color:#ffffff;font-size:17px;font-weight:bold;padding:4px 14px;border-radius:6px;letter-spacing:1px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;01&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:20px;font-weight:bold;color:#a63d2f;margin:14px 0 22px;border-bottom:2px solid #a63d2f;padding-bottom:9px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;支持期：STS 两年，和 .NET 10 几乎同时到期&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 16px;&quot; class=&quot;js_darkmode__2&quot;&gt;&lt;span leaf=&quot;&quot;&gt;.NET 11 是 STS（标准期限支持）版本，官方支持两年。.NET 10 是 LTS 版本，支持到 2028 年 11 月 14 日。&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;js_darkmode__3&quot; width=&quot;100&quot;&gt;&lt;tbody&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); background: rgb(250, 246, 244); padding: 9px 8px; font-weight: bold; color: rgb(166, 61, 47);&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;版本&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); background: rgb(250, 246, 244); padding: 9px 8px; font-weight: bold; color: rgb(166, 61, 47);&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;支持类型&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); background: rgb(250, 246, 244); padding: 9px 8px; font-weight: bold; color: rgb(166, 61, 47);&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;到期时间&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); padding: 9px 8px;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;.NET 11&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); padding: 9px 8px;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;STS&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); padding: 9px 8px;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;2028 年 11 月&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); padding: 9px 8px;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;.NET 10&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); padding: 9px 8px;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;LTS&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); padding: 9px 8px;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;2028 年 11 月 14 日&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); padding: 9px 8px; color: rgb(192, 57, 43);&quot; class=&quot;js_darkmode__13&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;.NET 8 / 9&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); padding: 9px 8px; color: rgb(192, 57, 43);&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;已停止支持&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border-color: rgb(232, 224, 220); padding: 9px 8px; color: rgb(192, 57, 43);&quot; class=&quot;js_darkmode__15&quot;&gt;&lt;section&gt;&lt;span leaf=&quot;&quot;&gt;2026 年 11 月 10 日&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;span leaf=&quot;&quot;&gt;停止支持之后，应用不会被强制卸载，运行库、SDK、容器镜像仍然可以下载。但此后影响运行时和基础类库的漏洞，官方不再提供服务、安全修复和技术支持。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;mpcpc manual-insert=&quot;1&quot;&gt;&lt;iframe src=&quot;https://wxa.wxs.qq.com/tmpl/qh/base_tmpl.html&quot; scrolling=&quot;no&quot; class=&quot;iframe_ad_container iframe_adv_ad_container&quot; style=&quot;height: 157px;&quot;&gt;&lt;/iframe&gt;&lt;/mpcpc&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;span leaf=&quot;&quot;&gt;构建机上还有一个变化：Visual Studio 2022 的后续服务更新，会把 .NET 8 和 .NET 9 组件标记为不支持，并在更新时询问是否移除。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__18&quot;&gt;&lt;span leaf=&quot;&quot;&gt;迁移路径上，.NET 8 可以直接升到 .NET 10，不需要经过 .NET 9。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:46px 0 0;&quot;&gt;&lt;span style=&quot;display:inline-block;background:#a63d2f;color:#ffffff;font-size:17px;font-weight:bold;padding:4px 14px;border-radius:6px;letter-spacing:1px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;02&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:20px;font-weight:bold;color:#a63d2f;margin:14px 0 22px;border-bottom:2px solid #a63d2f;padding-bottom:9px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;C# 15：六个特性不再是 preview&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__19&quot;&gt;&lt;span leaf=&quot;&quot;&gt;在面向 net11.0 的项目里，C# 15 是默认语言版本。除内存安全外，新特性基本不需要 preview 开关。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 12px;&quot; class=&quot;js_darkmode__20&quot;&gt;&lt;strong style=&quot;color:#a63d2f;&quot;&gt;联合类型&lt;/strong&gt;&lt;span leaf=&quot;&quot;&gt;：一个值可以是若干种已声明类型之一，switch 表达式的穷尽性由编译器保证，漏掉任何一种都会编译报错。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span leaf=&quot;&quot;&gt;public union Payment(Card, Transfer, Voucher);&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;Payment payment = new Transfer(&amp;quot;DE89 3704 0044 0532 0130 00&amp;quot;);&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;string description = payment switch&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;{&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; Card c =&amp;gt; $&amp;quot;卡支付，尾号 {c.Last4}&amp;quot;,&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; Transfer t =&amp;gt; $&amp;quot;转账，IBAN {t.Iban}&amp;quot;,&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&amp;nbsp; &amp;nbsp; Voucher v =&amp;gt; $&amp;quot;优惠券 {v.Code}&amp;quot;,&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;};&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__21&quot;&gt;&lt;strong style=&quot;color:#a63d2f;&quot;&gt;封闭层次结构&lt;/strong&gt;&lt;span leaf=&quot;&quot;&gt;：给类加 closed 修饰符后，子类只能在同一程序集内声明，编译器因此知道全部直接后代，switch 不再需要永远走不到的 default。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__22&quot;&gt;&lt;span leaf=&quot;&quot;&gt;它是上下文关键字，封闭类隐式抽象，不能和 sealed、static 或显式 abstract 一起使用。封闭性不会自动传递，中间层要再拆分，中间层也得标 closed。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 12px;&quot; class=&quot;js_darkmode__23&quot;&gt;&lt;strong style=&quot;color:#a63d2f;&quot;&gt;集合表达式参数&lt;/strong&gt;&lt;span leaf=&quot;&quot;&gt;：用 with(...) 把容量、比较器这些构造参数直接写进集合表达式。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span leaf=&quot;&quot;&gt;List&amp;lt;int&amp;gt; buffer = [with(capacity: 100), .. incoming];&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;HashSet&amp;lt;string&amp;gt; tags = [with(StringComparer.OrdinalIgnoreCase), &amp;quot;C#&amp;quot;, &amp;quot;.NET&amp;quot;, &amp;quot;c#&amp;quot;];&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;// &amp;quot;C#&amp;quot; 和 &amp;quot;c#&amp;quot; 只保留一个&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__24&quot;&gt;&lt;span leaf=&quot;&quot;&gt;另外三项是扩展索引器、带标签的 break 和 continue、非虚静态接口成员。内存安全仍是预览特性，需要同时开启 preview 语言版本和 updated-memory-safety-rules 特性标志。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:46px 0 0;&quot;&gt;&lt;span style=&quot;display:inline-block;background:#a63d2f;color:#ffffff;font-size:17px;font-weight:bold;padding:4px 14px;border-radius:6px;letter-spacing:1px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;03&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:20px;font-weight:bold;color:#a63d2f;margin:14px 0 22px;border-bottom:2px solid #a63d2f;padding-bottom:9px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;ASP.NET Core 与 Blazor&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__25&quot;&gt;&lt;span leaf=&quot;&quot;&gt;C# 联合类型在所有经过 System.Text.Json 的地方生效，包括 Minimal API 和 MVC 的请求响应体，OpenAPI 文档用 anyOf 表达。路由、查询字符串、表单绑定不在此列。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__26&quot;&gt;&lt;span leaf=&quot;&quot;&gt;异步验证配合新的异步 DataAnnotations，验证逻辑里可以 await 数据库查询，不再阻塞线程。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__27&quot;&gt;&lt;span leaf=&quot;&quot;&gt;OpenAPI 3.2 成为默认，可以描述 SSE 流里每个事件的载荷。工具链还没跟上 3.2 的话，可以手动指定旧版本。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__28&quot;&gt;&lt;span leaf=&quot;&quot;&gt;&lt;span class=&quot;&quot; link-id=&quot;link-1795176538679-0.24323478987725433&quot;&gt;SignalR&lt;/span&gt; 支持认证刷新：长连接不用断开重连就能更新身份，Blazor Interactive Server 组件能收到新身份并响应。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__29&quot;&gt;&lt;span leaf=&quot;&quot;&gt;Blazor 新增 CacheView 组件，静态 &lt;span class=&quot;&quot; link-id=&quot;link-1795176538680-0.5038553736636702&quot;&gt;SSR&lt;/span&gt; 时缓存某个组件子树的渲染结果，命中就直接回放 HTML，子组件不创建。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__30&quot;&gt;&lt;span leaf=&quot;&quot;&gt;交互式 Server 应用可以配置线路自动暂停，标签页不活跃超过设定时长就释放它占用的服务器内存和连接。默认不开，需要显式配置。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__31&quot;&gt;&lt;span leaf=&quot;&quot;&gt;还有一套实验性的 &lt;span class=&quot;&quot; link-id=&quot;link-1795176538680-0.9564069203227827&quot;&gt;Blazor AI&lt;/span&gt; 组件，包括流式聊天、工具渲染、审批流，配合 AG-UI 协议使用。官方说明整个 .NET 11 周期内都是预发布状态。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:46px 0 0;&quot;&gt;&lt;span style=&quot;display:inline-block;background:#a63d2f;color:#ffffff;font-size:17px;font-weight:bold;padding:4px 14px;border-radius:6px;letter-spacing:1px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;04&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:20px;font-weight:bold;color:#a63d2f;margin:14px 0 22px;border-bottom:2px solid #a63d2f;padding-bottom:9px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;SDK 与运行时&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__32&quot;&gt;&lt;span leaf=&quot;&quot;&gt;SDK 默认启用 Native AOT 的 CLI 宿主，dotnet --help、查版本这类命令不用再拉起托管运行时。MSBuild 服务器在命令之间保持驻留。Linux 和 macOS 安装包因为程序集去重也变小了。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 10px;&quot; class=&quot;js_darkmode__33&quot;&gt;&lt;span leaf=&quot;&quot;&gt;其他官方列出的变化：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 5px;&quot; class=&quot;js_darkmode__34&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— 文件级应用支持 #:include 拆分成多个源文件；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 5px;&quot; class=&quot;js_darkmode__35&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— dotnet watch 能接 Aspire 应用宿主，支持崩溃恢复和移动设备选择；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 5px;&quot; class=&quot;js_darkmode__36&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— dotnet test 加了运行级超时和失败次数上限；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 5px;&quot; class=&quot;js_darkmode__37&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— 容器发布支持 SOURCE_DATE_EPOCH 生成可复现镜像摘要，已有清单不重复推层；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__38&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— NuGet 源可以配置包发布最小年龄，新版本要等几天才会被还原选中。官方说明这只是供应链防护的辅助手段，替代不了漏洞扫描。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__39&quot;&gt;&lt;span leaf=&quot;&quot;&gt;公共预览的 dotnetup 用来在用户目录下管理多个 SDK 版本。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__40&quot;&gt;&lt;span leaf=&quot;&quot;&gt;运行时方面，Stephen Toub 的年度性能文列出了几百项 JIT 和类库优化：更多边界检查和冗余分支被消除、去虚拟化更激进、常量折叠范围更大，编译期能确定输入的 SequenceEqual 也能直接优化。Native AOT 的接口分派改用共享辅助代码。x64 和 Arm64 上 Half 类型用上了 FP16 指令。进程内崩溃报告从移动平台扩展到 Linux 和 macOS。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__41&quot;&gt;&lt;span leaf=&quot;&quot;&gt;Runtime Async 仍是预览，需要显式打开：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span leaf=&quot;&quot;&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&amp;nbsp; &amp;lt;Features&amp;gt;runtime-async=on&amp;lt;/Features&amp;gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&lt;br/&gt;&lt;/span&gt;&lt;span leaf=&quot;&quot;&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__42&quot;&gt;&lt;span leaf=&quot;&quot;&gt;官方文档同时说明，这版&lt;/span&gt;&lt;strong style=&quot;color:#a63d2f;&quot;&gt;提高了最低硬件要求&lt;/strong&gt;&lt;span leaf=&quot;&quot;&gt;：x86/x64 和 Arm64 都要求使用更现代的指令集，以提高性能并降低维护复杂度。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;mpcpc manual-insert=&quot;1&quot;&gt;&lt;iframe src=&quot;https://wxa.wxs.qq.com/tmpl/qh/base_tmpl.html&quot; scrolling=&quot;no&quot; class=&quot;iframe_ad_container iframe_adv_ad_container&quot; style=&quot;height: 138px;&quot;&gt;&lt;/iframe&gt;&lt;/mpcpc&gt;&lt;/p&gt;&lt;p style=&quot;margin:46px 0 0;&quot;&gt;&lt;span style=&quot;display:inline-block;background:#a63d2f;color:#ffffff;font-size:17px;font-weight:bold;padding:4px 14px;border-radius:6px;letter-spacing:1px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;05&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:20px;font-weight:bold;color:#a63d2f;margin:14px 0 22px;border-bottom:2px solid #a63d2f;padding-bottom:9px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;类库与 EF Core 11&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 10px;&quot; class=&quot;js_darkmode__43&quot;&gt;&lt;span leaf=&quot;&quot;&gt;官方列出的几项：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 5px;&quot; class=&quot;js_darkmode__44&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— Process 新增一次性执行并捕获输出和退出码的方法，高级场景支持句柄继承、挂起启动、发信号；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 5px;&quot; class=&quot;js_darkmode__45&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— System.IO.Compression 内置 Zstandard，ZIP 读取加了 CRC32 校验；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 5px;&quot; class=&quot;js_darkmode__46&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— 四个内存流适配器：ReadOnlyMemoryStream、WritableMemoryStream、ReadOnlySequenceStream、StringStream；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 5px;&quot; class=&quot;js_darkmode__47&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— System.Text.Json 支持联合类型和 F# &lt;span class=&quot;&quot; link-id=&quot;link-1795176538680-0.35900825075348164&quot;&gt;判别联合&lt;/span&gt;，异步序列可以直接输出 JSON Lines；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__48&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— LINQ 新增 FullJoin，两侧没匹配上的元素都会保留。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__49&quot;&gt;&lt;span leaf=&quot;&quot;&gt;EF Core 11 的查询翻译继续优化，更多场景能去掉多余 JOIN，GroupBy 翻译更好，FullJoin 在支持的关系库上也能翻译。复杂类型和 JSON 列可以用在 TPT/TPC 继承上。SQL Server 增加向量索引和&lt;span class=&quot;&quot; link-id=&quot;link-1795176538681-0.004982560999469476&quot;&gt;近似向量搜索&lt;/span&gt;，官方标注为实验性。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__50&quot;&gt;&lt;span leaf=&quot;&quot;&gt;需要注意，EF Core 11 只跑在 .NET 11 上，升级前先确认数据库提供程序已经跟上。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:46px 0 0;&quot;&gt;&lt;span style=&quot;display:inline-block;background:#a63d2f;color:#ffffff;font-size:17px;font-weight:bold;padding:4px 14px;border-radius:6px;letter-spacing:1px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;06&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:20px;font-weight:bold;color:#a63d2f;margin:14px 0 22px;border-bottom:2px solid #a63d2f;padding-bottom:9px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;MAUI 与 AI 开发链路&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__51&quot;&gt;&lt;span leaf=&quot;&quot;&gt;MAUI 这版把默认运行时统一成 CoreCLR，移动端、桌面端和其他工作负载共用同一套运行时基座。Apple 平台不允许 JIT，走预编译加解释器。Native AOT 仍是可选项，Android 上官方标注为实验性质。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__52&quot;&gt;&lt;span leaf=&quot;&quot;&gt;XAML 增量热重载是预览，Debug 默认开启，能直接改活着的页面实例。XAML 文件不用再重复写命名空间声明，Windows 默认使用新的 CollectionView2 处理器。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__53&quot;&gt;&lt;span leaf=&quot;&quot;&gt;一个破坏性变化：Microsoft.Maui.Controls.Compatibility 包不再发布，依赖它的应用需要先迁移。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 10px;&quot; class=&quot;js_darkmode__54&quot;&gt;&lt;span leaf=&quot;&quot;&gt;AI 开发这块，官方铺的是一条链路：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 5px;&quot; class=&quot;js_darkmode__55&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— MEAI（Microsoft.Extensions.AI）提供 IChatClient、IEmbeddingGenerator 等抽象，以 NuGet 包形式提供；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 5px;&quot; class=&quot;js_darkmode__56&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— SDK 自带 MCP 服务器模板，基于官方 MCP C# SDK；&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__57&quot;&gt;&lt;span leaf=&quot;&quot;&gt;— Microsoft Agent Framework 在上两层基础上做智能体和工作流编排，可以通过 ASP.NET Core 的 AG-UI 端点接 Blazor 前端。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span leaf=&quot;&quot;&gt;dotnet new mcpserver -o MyMcpServer&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__58&quot;&gt;&lt;span leaf=&quot;&quot;&gt;工具侧还有 .NET Skills（给编码智能体提供官方指引）、DevFlow（实验性，让智能体查看和操作运行中的 MAUI 应用）、Upgrade 画布（可视化跟踪 Copilot 升级进度）。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin:46px 0 0;&quot;&gt;&lt;span style=&quot;display:inline-block;background:#a63d2f;color:#ffffff;font-size:17px;font-weight:bold;padding:4px 14px;border-radius:6px;letter-spacing:1px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;07&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:20px;font-weight:bold;color:#a63d2f;margin:14px 0 22px;border-bottom:2px solid #a63d2f;padding-bottom:9px;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;升级要确认的四件事&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 12px;&quot; class=&quot;js_darkmode__59&quot;&gt;&lt;strong style=&quot;color:#a63d2f;&quot;&gt;一、global.json。&lt;/strong&gt;&lt;span leaf=&quot;&quot;&gt;仓库里有这个文件的话先改它，开发机和 CI 上装对应 SDK，避免版本漂移。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 12px;&quot; class=&quot;js_darkmode__60&quot;&gt;&lt;strong style=&quot;color:#a63d2f;&quot;&gt;二、目标框架。&lt;/strong&gt;&lt;span leaf=&quot;&quot;&gt;改成 net11.0，把包和工作负载升到兼容版本。官方特别说明：只装新 SDK 不会自动改目标框架。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 12px;&quot; class=&quot;js_darkmode__61&quot;&gt;&lt;strong style=&quot;color:#a63d2f;&quot;&gt;三、破坏性变更和硬件要求。&lt;/strong&gt;&lt;span leaf=&quot;&quot;&gt;过一遍官方变更列表，重点看最低 CPU 要求。容器镜像、自包含、Native AOT 这些发布方式都要实际验证。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 24px;&quot; class=&quot;js_darkmode__62&quot;&gt;&lt;strong style=&quot;color:#a63d2f;&quot;&gt;四、第三方包。&lt;/strong&gt;&lt;span leaf=&quot;&quot;&gt;在隔离环境跑一次 dotnet list package --outdated，重点查带原生组件的包是否支持 net11.0。从 RC 升上来的，记得换正式版。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 12px;&quot; class=&quot;js_darkmode__63&quot;&gt;&lt;span leaf=&quot;&quot;&gt;先看清自己在哪个版本：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span leaf=&quot;&quot;&gt;dotnet --list-sdks&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 14px;&quot; class=&quot;js_darkmode__64&quot;&gt;&lt;span leaf=&quot;&quot;&gt;官方公布的数据：.NET 11 由七千多名贡献者参与，NuGet 上现在有超过 58.9 万个包，累计下载量 1.1 万亿次。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:16px;line-height:1.85;color:#333;margin:0 0 26px;&quot; class=&quot;js_darkmode__65&quot;&gt;&lt;span leaf=&quot;&quot;&gt;这版没有颠覆性的单点变化，语言、工具链、AI 开发链路几条线都在往前走。要不要升、什么时候升，按上面的支持期和兼容性清单自己判断。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size:12.5px;color:#86909c;margin:24px 0 0;text-align:center;&quot;&gt;&lt;span leaf=&quot;&quot;&gt;资料来源：Microsoft Learn《What&amp;#39;s new in .NET 11》、.NET 官方博客发布公告、.NET Conf 2026 报道。具体参数以官方文档为准。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Fri, 20 Nov 2026 20:14:18 +0800</pubDate></item><item><title>都是 AI 写代码，为什么 C# 比 Java 少绕两圈</title><link>https://www.codepub.top/post/737.html</link><description>&lt;section style=&quot;font-family: -apple-system-font, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei UI&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, Arial, sans-serif; font-size: 16px; line-height: 1.75; text-align: left; visibility: visible;&quot;&gt;&lt;section style=&quot;font-style: normal; padding: 1em; border-left: 4px solid rgb(15, 76, 129); border-radius: 6px; color: rgb(63, 63, 63); background: rgb(247, 247, 247); margin: 0px 0px 1em; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;p style=&quot;display: block; font-size: 1em; letter-spacing: 0.1em; color: rgb(63, 63, 63); margin: 0px; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;AI 不是偏爱 C#，它只是偏爱“能读、能跑、能验证”的项目。&lt;/span&gt;&lt;/p&gt;&lt;/section&gt;&lt;p style=&quot;margin: 1.5em 8px; letter-spacing: 0.1em; color: rgb(63, 63, 63); visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;我是豪彡，做 C# / .NET 的二次开发和上位机。&lt;span class=&quot;&quot;&gt;AutoCAD&lt;/span&gt;、SolidWorks、NX、Revit 的插件写过，产线上的设备采集程序也写过，手上大部分还是 .NET Framework 4.x 的老项目。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px; letter-spacing: 0.1em; color: rgb(63, 63, 63); visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;最近大半年，我基本是“AI 写一半，我改一半”的节奏。有意思的是，同一个需求，丢给 AI 之后，C# 那边经常一次编译通过，Java 那边却要来回问四轮。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px; letter-spacing: 0.1em; color: rgb(63, 63, 63); visibility: visible;&quot; class=&quot;js_darkmode__8&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;不是一次两次，是反复如此。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px; letter-spacing: 0.1em; color: rgb(63, 63, 63); visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;我一开始以为是模型对 C# 的训练数据更多，后来发现这个解释站不住——Java 的公开代码量一点都不少。真正的原因，藏在&lt;/span&gt;&lt;strong style=&quot;color: rgb(15, 76, 129); font-weight: bold; font-size: inherit; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;项目把信息写在哪里&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;border-style: solid;border-width: 2px 0 0;border-color: rgba(0, 0, 0, 0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;&quot; class=&quot;js_darkmode__11&quot;/&gt;&lt;h2 data-heading=&quot;true&quot; style=&quot;display: block;padding: 0px 0.2em;margin: 4em auto 2em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);font-size: 19.2px;font-weight: bold;text-align: center;width: fit-content;max-width: 100%;box-sizing: border-box;white-space: normal;word-break: break-word;&quot;&gt;一、先看两个真实回合&lt;/h2&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__12&quot;&gt;上个月我给一个上位机加“设备状态查询”接口，同时手上有个 Java 写的 MES 对接服务，要加同样的字段。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__13&quot;&gt;我给 AI 的描述几乎一样：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__14&quot;&gt;在现有查询接口里加上设备状态字段，数据从&amp;nbsp;PLC&amp;nbsp;读取，不要改动其他逻辑。&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__15&quot;&gt;C# 那边：AI 改了两个文件，&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__16&quot;&gt;dotnet build&lt;/code&gt;&amp;nbsp;一次过，&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__17&quot;&gt;dotnet test&lt;/code&gt;&amp;nbsp;全绿，我review 完就合了。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__18&quot;&gt;Java 那边，来回四轮：&lt;/p&gt;&lt;ol style=&quot;padding-left: 1em;margin-left: 0;color: #3f3f3f;&quot; class=&quot;js_darkmode__19 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;1. 第一轮：AI 加了个&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__21&quot;&gt;@Autowired&lt;/code&gt;&amp;nbsp;字段，编译过了，启动报&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__22&quot;&gt;NoSuchBeanDefinitionException&lt;/code&gt;——它注入的接口有两个实现，容器不知道该给哪个；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;2. 第二轮：我告诉它用&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__24&quot;&gt;@Qualifier&lt;/code&gt;，它改对了，但事务没生效——它在同一个类里自调用了带&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__25&quot;&gt;@Transactional&lt;/code&gt;&amp;nbsp;的方法；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;3. 第三轮：事务改对了，本地还是起不来——项目依赖配置中心，我本机没那套中间件；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;4. 第四轮：我干脆让它先写单测，绕开启动，才算验证成功。&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__28&quot;&gt;四轮下来，AI 没犯什么“低级错误”，它每一步给出的代码单看都是对的。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__29&quot;&gt;问题是：&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__30&quot;&gt;它看不到那些决定行为的隐性信息。&lt;/strong&gt;&lt;/p&gt;&lt;hr style=&quot;border-style: solid;border-width: 2px 0 0;border-color: rgba(0, 0, 0, 0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;&quot; class=&quot;js_darkmode__31&quot;/&gt;&lt;h2 data-heading=&quot;true&quot; style=&quot;display: block;padding: 0px 0.2em;margin: 4em auto 2em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);font-size: 19.2px;font-weight: bold;text-align: center;width: fit-content;max-width: 100%;box-sizing: border-box;white-space: normal;word-break: break-word;&quot;&gt;二、差距的本质：信息写没写在代码里&lt;/h2&gt;&lt;figure style=&quot;margin: 1.5em 8px;color: #3f3f3f;&quot; class=&quot;js_darkmode__32&quot;&gt;&lt;br/&gt;&lt;/figure&gt;&lt;/section&gt;&lt;p&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/WCDkSduXsqenn3CT7LSHX2CfzBN7kNPOeugR4jBPGfY0a9h85EibTc50iaEN5ibHWMWSZEhKlwR4P98zxrZF0ZLcLDDlJkTh6QWLDqqoZYnBl4/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=1&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.5&quot; data-s=&quot;300,640&quot; data-type=&quot;png&quot; data-w=&quot;1080&quot; type=&quot;block&quot; data-imgfileid=&quot;100000823&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;null&quot; data-index=&quot;3&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/WCDkSduXsqenn3CT7LSHX2CfzBN7kNPOeugR4jBPGfY0a9h85EibTc50iaEN5ibHWMWSZEhKlwR4P98zxrZF0ZLcLDDlJkTh6QWLDqqoZYnBl4/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=1&quot; _width=&quot;584px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 584px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1794892977968&quot; data-report-img-idx=&quot;1&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;section style=&quot;font-family: -apple-system-font, BlinkMacSystemFont, &amp;#39;Helvetica Neue&amp;#39;, &amp;#39;PingFang SC&amp;#39;, &amp;#39;Hiragino Sans GB&amp;#39;, &amp;#39;Microsoft YaHei UI&amp;#39;, &amp;#39;Microsoft YaHei&amp;#39;, Arial, sans-serif;font-size: 16px;line-height: 1.75;text-align: left;&quot;&gt;&lt;figure style=&quot;margin: 1.5em 8px;color: #3f3f3f;&quot; class=&quot;js_darkmode__33&quot;&gt;&lt;figcaption style=&quot;text-align: center;color: color-mix(in srgb, #3f3f3f 50%, transparent);font-size: 0.8em;&quot; class=&quot;js_darkmode__34&quot;&gt;四个维度的差距&lt;/figcaption&gt;&lt;/figure&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__35&quot;&gt;把这几轮回合拆开，差距集中在四个地方：&lt;/p&gt;&lt;section style=&quot;font-family: -apple-system-font, BlinkMacSystemFont, &amp;#39;Helvetica Neue&amp;#39;, &amp;#39;PingFang SC&amp;#39;, &amp;#39;Hiragino Sans GB&amp;#39;, &amp;#39;Microsoft YaHei UI&amp;#39;, &amp;#39;Microsoft YaHei&amp;#39;, Arial, sans-serif;font-size: 16px;line-height: 1.75;text-align: left;max-width: 100%;overflow: auto;-webkit-overflow-scrolling: touch;&quot; data-ignore-width=&quot;&quot;&gt;&lt;table class=&quot;js_darkmode__36&quot;&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;background: color-mix(in srgb, #3f3f3f 5%, transparent);text-align: left;&quot; class=&quot;js_darkmode__37&quot;&gt;&lt;section&gt;维度&lt;/section&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;background: color-mix(in srgb, #3f3f3f 5%, transparent);text-align: left;&quot; class=&quot;js_darkmode__38&quot;&gt;&lt;section&gt;C# 的默认姿势&lt;/section&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;background: color-mix(in srgb, #3f3f3f 5%, transparent);text-align: left;&quot; class=&quot;js_darkmode__39&quot;&gt;&lt;section&gt;Java 的常见姿势&lt;/section&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;background: color-mix(in srgb, #3f3f3f 5%, transparent);text-align: left;&quot; class=&quot;js_darkmode__40&quot;&gt;&lt;section&gt;对 AI 的影响&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__41&quot;&gt;&lt;section&gt;依赖关系&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__42&quot;&gt;&lt;section&gt;集中注册，一行行读得出来&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__43&quot;&gt;&lt;section&gt;注解自动装配，最终结果取决于配置&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__44&quot;&gt;&lt;section&gt;读源码重建不出依赖图&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__45&quot;&gt;&lt;section&gt;执行路径&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__46&quot;&gt;&lt;section&gt;中间件按顺序写在管道里&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__47&quot;&gt;&lt;section&gt;切面在运行时织入&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__48&quot;&gt;&lt;section&gt;静态阅读看不到真实调用链&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__49&quot;&gt;&lt;section&gt;本地运行&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__50&quot;&gt;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__51&quot;&gt;dotnet run&lt;/code&gt;&lt;section&gt;&amp;nbsp;一条命令&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__52&quot;&gt;&lt;section&gt;常依赖配置中心、注册中心、消息队列&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__53&quot;&gt;&lt;section&gt;改完无法自我验证&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__54&quot;&gt;&lt;section&gt;项目结构&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__55&quot;&gt;&lt;section&gt;相对扁平，约定统一&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__56&quot;&gt;&lt;section&gt;分层细、选型多、生成代码多&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__57&quot;&gt;&lt;section&gt;上下文窗口被结构吃掉&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__58&quot;&gt;注意，这四条里没有一条是“语言特性优劣”。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__59&quot;&gt;C# 也能写成依赖满天飞的样子，Java 也能写成一条命令跑起来的样子。真正影响 AI 效率的，是&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__60&quot;&gt;这些知识是显式写在代码里，还是藏在注解、配置、约定和人的脑子里&lt;/strong&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__61&quot;&gt;下面一条条说。&lt;/p&gt;&lt;hr style=&quot;border-style: solid;border-width: 2px 0 0;border-color: rgba(0, 0, 0, 0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;&quot; class=&quot;js_darkmode__62&quot;/&gt;&lt;h2 data-heading=&quot;true&quot; style=&quot;display: block;padding: 0px 0.2em;margin: 4em auto 2em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);font-size: 19.2px;font-weight: bold;text-align: center;width: fit-content;max-width: 100%;box-sizing: border-box;white-space: normal;word-break: break-word;&quot;&gt;三、依赖注入：一张注册表，还是一道推理题&lt;/h2&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__63&quot;&gt;C# 这边：答案就在&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__64&quot;&gt;Program.cs&lt;/code&gt;&lt;/h3&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__65&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;var&lt;/span&gt;&amp;nbsp;builder = WebApplication.CreateBuilder(&lt;span style=&quot;color: #ff7b72;&quot;&gt;args&lt;/span&gt;);&lt;span style=&quot;color: #8b949e;&quot;&gt;&lt;br/&gt;&lt;br/&gt;// 接口 → 实现，全部集中在这里&lt;/span&gt;&lt;br/&gt;builder.Services.AddSingleton&amp;lt;IDeviceChannel, TcpChannel&amp;gt;();&lt;br/&gt;builder.Services.AddScoped&amp;lt;IPlcReader, S7PlcReader&amp;gt;();&lt;br/&gt;builder.Services.AddScoped&amp;lt;DeviceService&amp;gt;();&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&lt;br/&gt;var&lt;/span&gt;&amp;nbsp;app = builder.Build();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__66&quot;&gt;消费方靠构造函数声明需求：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__67&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;sealed&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;class&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;DeviceService&lt;/span&gt;&lt;br/&gt;{&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; private&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;readonly&lt;/span&gt;&amp;nbsp;IPlcReader _plc;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff7b72;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;DeviceService&lt;/span&gt;(IPlcReader plc)&lt;br/&gt;&amp;nbsp; &amp;nbsp; {&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _plc = plc;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff7b72;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #ffa657;&quot;&gt;&amp;nbsp;string&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;ReadStatus&lt;/span&gt;()&amp;nbsp;=&amp;gt; _plc.Read(&lt;span style=&quot;color: #a5d6ff;&quot;&gt;&amp;quot;DB1.DBD0&amp;quot;&lt;/span&gt;);&lt;br/&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__68&quot;&gt;AI 要搞清楚“&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__69&quot;&gt;DeviceService&lt;/code&gt;&amp;nbsp;实际用的是哪个实现”，只需要做两件事：读&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__70&quot;&gt;DeviceService&lt;/code&gt;&amp;nbsp;的构造函数，再去注册区搜&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__71&quot;&gt;IPlcReader&lt;/code&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__72&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__73&quot;&gt;这两个动作都是纯文本匹配，不需要推理，更不需要猜运行时状态。&lt;/strong&gt;&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__74&quot;&gt;Java 这边：注解很省事，但答案分散&lt;/h3&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__75&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #79c0ff;&quot;&gt;@Service&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;public&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;class&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;DeviceService&lt;/span&gt;&amp;nbsp;{&lt;span style=&quot;color: #79c0ff;&quot;&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; @Autowired&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; private&lt;/span&gt;&amp;nbsp;PlcReader plcReader;&lt;span style=&quot;color: #8b949e;&quot;&gt;&amp;nbsp; &amp;nbsp;// 谁实现了 PlcReader？&lt;/span&gt;&lt;span style=&quot;color: #79c0ff;&quot;&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; @Transactional&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; public&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;void&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;SyncStatus&lt;/span&gt;()&amp;nbsp;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; plcReader.Read(&lt;span style=&quot;color: #a5d6ff;&quot;&gt;&amp;quot;DB1.DBD0&amp;quot;&lt;/span&gt;);&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__76&quot;&gt;字段注入的写法，人看着确实清爽。但对 AI 来说，这才刚开始：&lt;/p&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__77 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__79&quot;&gt;PlcReader&lt;/code&gt;&amp;nbsp;有几个实现类？分别在哪个包？&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 有没有&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__81&quot;&gt;@Primary&lt;/code&gt;？&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 有没有&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__83&quot;&gt;@Qualifier&lt;/code&gt;&amp;nbsp;在别处指定？&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 有没有&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__85&quot;&gt;@ConditionalOnProperty&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__86&quot;&gt;@Profile&lt;/code&gt;&amp;nbsp;让某个实现只在特定环境生效？&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 有没有&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__88&quot;&gt;@ComponentScan&lt;/code&gt;&amp;nbsp;根本没扫到那个包？&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__89&quot;&gt;这些问题，单看&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__90&quot;&gt;DeviceService.java&lt;/code&gt;&amp;nbsp;一个都答不出来。AI 必须把整个工程扫一遍，还得理解 Spring 的装配优先级规则，才可能给出正确答案。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__91&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__92&quot;&gt;人靠经验知道“我们项目里默认用 S7 那个实现”，AI 没有这份经验。&lt;/strong&gt;&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__93&quot;&gt;但也别把 C# 想得太干净&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__94&quot;&gt;说实话，C# 的依赖注册一样能写成迷宫：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__95&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #8b949e;&quot;&gt;// 开放泛型注册：具体类型要运行时才确定&lt;/span&gt;&lt;br/&gt;builder.Services.AddScoped(&lt;span style=&quot;color: #ff7b72;&quot;&gt;typeof&lt;/span&gt;(IRepository&amp;lt;&amp;gt;),&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;typeof&lt;/span&gt;(EfRepository&amp;lt;&amp;gt;));&lt;span style=&quot;color: #8b949e;&quot;&gt;&lt;br/&gt;&lt;br/&gt;// 程序集扫描：哪些类被注册，得看扫描规则&lt;/span&gt;&lt;br/&gt;builder.Services.Scan(scan =&amp;gt; scan&lt;br/&gt;&amp;nbsp; &amp;nbsp; .FromAssemblyOf&amp;lt;Program&amp;gt;()&lt;br/&gt;&amp;nbsp; &amp;nbsp; .AddClasses(c =&amp;gt; c.AssignableTo&amp;lt;IPlugin&amp;gt;())&lt;br/&gt;&amp;nbsp; &amp;nbsp; .AsImplementedInterfaces());&lt;span style=&quot;color: #8b949e;&quot;&gt;&lt;br/&gt;&lt;br/&gt;// Keyed Service：同一个接口多个实现，靠 key 区分&lt;/span&gt;&lt;br/&gt;builder.Services.AddKeyedSingleton&amp;lt;IPlcReader, S7PlcReader&amp;gt;(&lt;span style=&quot;color: #a5d6ff;&quot;&gt;&amp;quot;s7&amp;quot;&lt;/span&gt;);&lt;br/&gt;builder.Services.AddKeyedSingleton&amp;lt;IPlcReader, ModbusReader&amp;gt;(&lt;span style=&quot;color: #a5d6ff;&quot;&gt;&amp;quot;modbus&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__96&quot;&gt;这几种写法，AI 一样会看错。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__97&quot;&gt;所以准确的说法是：&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__98&quot;&gt;C# 的默认姿势更显式&lt;/strong&gt;，而不是“C# 一定显式”。默认姿势很重要——因为绝大多数项目就是照着默认姿势写的，而 AI 面对的正是这些“绝大多数”。&lt;/p&gt;&lt;hr style=&quot;border-style: solid;border-width: 2px 0 0;border-color: rgba(0, 0, 0, 0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;&quot; class=&quot;js_darkmode__99&quot;/&gt;&lt;h2 data-heading=&quot;true&quot; style=&quot;display: block;padding: 0px 0.2em;margin: 4em auto 2em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);font-size: 19.2px;font-weight: bold;text-align: center;width: fit-content;max-width: 100%;box-sizing: border-box;white-space: normal;word-break: break-word;&quot;&gt;四、执行路径：管道能顺着读，切面只能靠脑补&lt;/h2&gt;&lt;figure style=&quot;margin: 1.5em 8px;color: #3f3f3f;&quot; class=&quot;js_darkmode__100&quot;&gt;&lt;br/&gt;&lt;/figure&gt;&lt;/section&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/WCDkSduXsqdyKw4l8ntN9OialHXDwjaAjcYyOwFJ6GG9ZRflHJ3R9qP7zTwulb3oD6DdAiahfL1E2hsdObRftznrcvNrMyGCx51JFp8uPrRts/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=2&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.575&quot; data-s=&quot;300,640&quot; data-type=&quot;png&quot; data-w=&quot;1080&quot; type=&quot;block&quot; data-imgfileid=&quot;100000824&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;null&quot; data-index=&quot;4&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/WCDkSduXsqdyKw4l8ntN9OialHXDwjaAjcYyOwFJ6GG9ZRflHJ3R9qP7zTwulb3oD6DdAiahfL1E2hsdObRftznrcvNrMyGCx51JFp8uPrRts/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=2&quot; _width=&quot;584px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 583.984px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1794893026443&quot; data-report-img-idx=&quot;2&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;section style=&quot;font-family: -apple-system-font, BlinkMacSystemFont, &amp;#39;Helvetica Neue&amp;#39;, &amp;#39;PingFang SC&amp;#39;, &amp;#39;Hiragino Sans GB&amp;#39;, &amp;#39;Microsoft YaHei UI&amp;#39;, &amp;#39;Microsoft YaHei&amp;#39;, Arial, sans-serif;font-size: 16px;line-height: 1.75;text-align: left;&quot;&gt;&lt;figure style=&quot;margin: 1.5em 8px;color: #3f3f3f;&quot; class=&quot;js_darkmode__101&quot;&gt;&lt;figcaption style=&quot;text-align: center;color: color-mix(in srgb, #3f3f3f 50%, transparent);font-size: 0.8em;&quot; class=&quot;js_darkmode__102&quot;&gt;管道与切面&lt;/figcaption&gt;&lt;/figure&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__103&quot;&gt;C# 的请求处理链，是代码里的一串语句&lt;/h3&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__104&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;var&lt;/span&gt;&amp;nbsp;app = builder.Build();&lt;br/&gt;&lt;br/&gt;app.UseExceptionHandler(&lt;span style=&quot;color: #a5d6ff;&quot;&gt;&amp;quot;/error&amp;quot;&lt;/span&gt;);&lt;span style=&quot;color: #8b949e;&quot;&gt;&amp;nbsp; &amp;nbsp;// 1. 异常兜底&lt;/span&gt;&lt;br/&gt;app.UseAuthentication();&lt;span style=&quot;color: #8b949e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 2. 认证&lt;/span&gt;&lt;br/&gt;app.UseAuthorization();&lt;span style=&quot;color: #8b949e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 3. 授权&lt;/span&gt;&lt;br/&gt;app.UseMiddleware&amp;lt;AuditMiddleware&amp;gt;();&lt;span style=&quot;color: #8b949e;&quot;&gt;// 4. 审计&lt;/span&gt;&lt;br/&gt;app.MapControllers();&lt;span style=&quot;color: #8b949e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 5. 进控制器&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__105&quot;&gt;这段代码从上往下读，就是一次请求从上往下的执行顺序。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__106&quot;&gt;AI 要判断“未登录的请求会不会先被审计记一笔”，顺着这个顺序看就行。它甚至能直接指出问题：审计在授权之后，未授权的请求根本走不到审计。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__107&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__108&quot;&gt;这是纯静态阅读就能得出的结论，不需要运行。&lt;/strong&gt;&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__109&quot;&gt;Java 的切面，写在源码之外&lt;/h3&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__110&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #79c0ff;&quot;&gt;@RestController&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;public&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;class&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;DeviceController&lt;/span&gt;&amp;nbsp;{&lt;span style=&quot;color: #79c0ff;&quot;&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; @PreAuthorize(&amp;quot;hasRole(&amp;#39;ADMIN&amp;#39;)&amp;quot;)&lt;/span&gt;&lt;span style=&quot;color: #79c0ff;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; @Transactional&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; public&lt;/span&gt;&amp;nbsp;Result&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;Sync&lt;/span&gt;()&amp;nbsp;{&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return&lt;/span&gt;&amp;nbsp;service.SyncStatus();&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__111&quot;&gt;读这段代码，你能看到“有权限校验”“有事务”，但看不到它们&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__112&quot;&gt;什么时候执行、以什么顺序执行、失败了回滚什么&lt;/strong&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__113&quot;&gt;这些都在 &lt;span class=&quot;&quot;&gt;Spring AOP&lt;/span&gt; 的代理里，运行时才织入。更麻烦的是几个经典陷阱：&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__114&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__115&quot;&gt;陷阱一：同类自调用，事务不生效。&lt;/strong&gt;&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__116&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #79c0ff;&quot;&gt;@Service&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;public&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;class&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;DeviceService&lt;/span&gt;&amp;nbsp;{&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; public&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;void&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;Outer&lt;/span&gt;()&amp;nbsp;{&lt;span style=&quot;color: #ffa657;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this&lt;/span&gt;.Inner();&lt;span style=&quot;color: #8b949e;&quot;&gt;&amp;nbsp; &amp;nbsp;// 直接 this 调用，不走代理，@Transactional 失效&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;span style=&quot;color: #79c0ff;&quot;&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; @Transactional&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; public&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;void&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;Inner&lt;/span&gt;()&amp;nbsp;{&lt;span style=&quot;color: #8b949e;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 这里的事务注解形同虚设&lt;/span&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; }&lt;br/&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__117&quot;&gt;AI 静态读代码，看到&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__118&quot;&gt;Inner()&lt;/code&gt;&amp;nbsp;上有&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__119&quot;&gt;@Transactional&lt;/code&gt;，很可能认为它有事务保护，然后基于这个错误前提改业务逻辑。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__120&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__121&quot;&gt;陷阱二：默认只对运行时异常回滚。&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__122&quot;&gt;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__123&quot;&gt;@Transactional&lt;/code&gt;&amp;nbsp;默认遇到受检异常（Checked Exception）是不回滚的。这一点藏在注解的默认属性里，不查文档看不出来。AI 生成的代码如果抛受检异常，业务上“以为回滚了”，实际没有。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__124&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__125&quot;&gt;陷阱三：切面顺序不写在业务代码里。&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__126&quot;&gt;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__127&quot;&gt;@Order&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__128&quot;&gt;Ordered&lt;/code&gt;&amp;nbsp;接口、XML 配置、自动配置类，都可能影响多个切面的先后。这些信息散落在各处，AI 很难拼出全貌。&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__129&quot;&gt;C# 也不是没有隐式的东西&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__130&quot;&gt;ASP.NET Core 的&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__131&quot;&gt;IActionFilter&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__132&quot;&gt;IAsyncActionFilter&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__133&quot;&gt;IResultFilter&lt;/code&gt;，注册在 MVC 选项里，同样不在控制器代码上：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__134&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;builder.Services.AddControllers(options =&amp;gt;&lt;br/&gt;{&lt;br/&gt;&amp;nbsp; &amp;nbsp; options.Filters.Add&amp;lt;AuditFilter&amp;gt;();&lt;span style=&quot;color: #8b949e;&quot;&gt;&amp;nbsp; &amp;nbsp;// 全局过滤器，控制器里看不到&lt;/span&gt;&lt;br/&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__135&quot;&gt;还有&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__136&quot;&gt;[Authorize]&lt;/code&gt;&amp;nbsp;这种特性，处理逻辑也在框架内部。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__137&quot;&gt;区别在于：&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__138&quot;&gt;C# 的过滤器是挂在一条可读的管道上的，顺序大体能追；Java 的切面是织进代理对象的，追起来要跨更多层抽象。&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__139&quot;&gt;对 AI 来说，前者是“多读两个文件”，后者是“得先在脑子里模拟一遍 Spring 的代理机制”。&lt;/p&gt;&lt;hr style=&quot;border-style: solid;border-width: 2px 0 0;border-color: rgba(0, 0, 0, 0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;&quot; class=&quot;js_darkmode__140&quot;/&gt;&lt;h2 data-heading=&quot;true&quot; style=&quot;display: block;padding: 0px 0.2em;margin: 4em auto 2em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);font-size: 19.2px;font-weight: bold;text-align: center;width: fit-content;max-width: 100%;box-sizing: border-box;white-space: normal;word-break: break-word;&quot;&gt;五、本地能跑起来，这条差距最大&lt;/h2&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__141&quot;&gt;前面两条还只是“读得懂读不懂”，这一条直接决定 AI 能不能自我纠错。&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__142&quot;&gt;C# 的闭环很短&lt;/h3&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__143&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;dotnet build&lt;span style=&quot;color: #8b949e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# 编译错误 → 直接反馈给 AI&lt;/span&gt;&lt;br/&gt;dotnet&lt;span style=&quot;color: #ffa657;&quot;&gt;&amp;nbsp;test&lt;/span&gt;&lt;span style=&quot;color: #8b949e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; # 测试结果 → 直接反馈给 AI&lt;/span&gt;&lt;br/&gt;dotnet run&lt;span style=&quot;color: #8b949e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# 起服务 → 自己发个请求验证&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__144&quot;&gt;AI 改完代码，跑一次&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__145&quot;&gt;dotnet build&lt;/code&gt;，报错信息里带着文件名、行号、错误码。它读完就能改，改完再跑。&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__146&quot;&gt;这个循环它自己能转，不需要我在中间传话。&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__147&quot;&gt;更重要的是，C# 的编译期检查比较厚：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__148&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;sealed&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;record&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;DeviceStatus&lt;/span&gt;(&lt;span style=&quot;color: #ffa657;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; string&lt;/span&gt;&amp;nbsp;DeviceName,&lt;span style=&quot;color: #ffa657;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; double&lt;/span&gt;&amp;nbsp;Temperature,&lt;br/&gt;&amp;nbsp; &amp;nbsp; DateTimeOffset CollectedAt);&lt;span style=&quot;color: #8b949e;&quot;&gt;&lt;br/&gt;&lt;br/&gt;// 少传一个参数、类型不对，编译期就报错&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;var&lt;/span&gt;&amp;nbsp;status =&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;new&lt;/span&gt;&amp;nbsp;DeviceStatus(&lt;span style=&quot;color: #a5d6ff;&quot;&gt;&amp;quot;1&lt;a class=&quot;wx_topic_link js_darkmode__149&quot; style=&quot;color: rgb(87, 107, 149);&quot; data-topic=&quot;1&quot; data-recommend=&quot;&quot;&gt;#PLC&lt;/a&gt;&amp;quot;&lt;/span&gt;,&lt;span style=&quot;color: #79c0ff;&quot;&gt;&amp;nbsp;36.5&lt;/span&gt;, DateTimeOffset.Now);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__150 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;• 可空引用类型（&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__152&quot;&gt;string?&lt;/code&gt;）能在编译期提示空引用风险；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__154&quot;&gt;record&lt;/code&gt;&amp;nbsp;的构造参数是强制的，少一个就编译不过；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__156&quot;&gt;switch&lt;/code&gt;&amp;nbsp;表达式对枚举做穷尽检查，少写一个分支会有警告；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;•&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__158&quot;&gt;init&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__159&quot;&gt;required&lt;/code&gt;&amp;nbsp;把“必须赋值”写进了类型系统。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__160&quot;&gt;这些检查的意义不是“C# 更安全”，而是&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__161&quot;&gt;AI 的试错成本更低&lt;/strong&gt;——错误在编译期就暴露，不用等到运行时才发现。&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__162&quot;&gt;Java 的闭环经常断在“起不来”&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__163&quot;&gt;Java 项目当然也能&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__164&quot;&gt;mvn test&lt;/code&gt;。但实际项目里，一个微服务要跑起来，往往需要：&lt;/p&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__165 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;• 配置中心（Nacos / Apollo / Config Server）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 注册中心（Eureka / Nacos）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 缓存（Redis）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 消息队列（Kafka / RocketMQ）&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 数据库和一堆初始化脚本&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__171&quot;&gt;少一样，启动就失败。AI 在本地环境里，大概率连不上这些依赖，于是：&lt;/p&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__172 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;• 它没法运行，只能“看起来对”；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 它没法验证，只能基于静态阅读猜测；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 猜错了也不会立刻发现，要等我把代码拉到有环境的地方才知道。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__176&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__177&quot;&gt;这就是“快半拍”和“绕两圈”的真正来源。&lt;/strong&gt;&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__178&quot;&gt;但这条也不是 Java 的专利&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__179&quot;&gt;我自己手上就有反例，下面单开一节说。&lt;/p&gt;&lt;hr style=&quot;border-style: solid;border-width: 2px 0 0;border-color: rgba(0, 0, 0, 0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;&quot; class=&quot;js_darkmode__180&quot;/&gt;&lt;h2 data-heading=&quot;true&quot; style=&quot;display: block;padding: 0px 0.2em;margin: 4em auto 2em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);font-size: 19.2px;font-weight: bold;text-align: center;width: fit-content;max-width: 100%;box-sizing: border-box;white-space: normal;word-break: break-word;&quot;&gt;六、反过来说：老 .NET Framework 项目，AI 一样会绕圈&lt;/h2&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__181&quot;&gt;我做建造业的项目，客户那边的真实环境是这样的：&lt;/p&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot;js_darkmode__182 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;• 操作系统还是 Windows 7 SP1；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• 装的 CAD 是 2014 甚至更早；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;• .NET Framework 是 4.0 / 4.5，不是 .NET 8。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__186&quot;&gt;这类项目长这样：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__187&quot;&gt;&amp;lt;TargetFrameworkVersion&amp;gt;v4.5&amp;lt;/TargetFrameworkVersion&amp;gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__188&quot;&gt;外加&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__189&quot;&gt;packages.config&lt;/code&gt;&amp;nbsp;管依赖、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__190&quot;&gt;msbuild&lt;/code&gt;&amp;nbsp;编译、手改&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__191&quot;&gt;.csproj&lt;/code&gt;，插件还必须是&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__192&quot;&gt;net40&lt;/code&gt;&amp;nbsp;或&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__193&quot;&gt;net45&lt;/code&gt;&amp;nbsp;的类库，发布时得把 DLL 丢进 CAD 的安装目录，用&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__194&quot;&gt;NETLOAD&lt;/code&gt;&amp;nbsp;加载。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__195&quot;&gt;这种项目，AI 的优势会打不少折扣：&lt;/p&gt;&lt;ol style=&quot;padding-left: 1em;margin-left: 0;color: #3f3f3f;&quot; class=&quot;js_darkmode__196 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;1.&amp;nbsp;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__198&quot;&gt;没有&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__199&quot;&gt;dotnet run&lt;/code&gt;&lt;/strong&gt;：只能&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__200&quot;&gt;msbuild&lt;/code&gt;，编译失败信息比&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__201&quot;&gt;dotnet build&lt;/code&gt;&amp;nbsp;啰嗦得多；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;2.&amp;nbsp;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__203&quot;&gt;必须装 CAD 才能验证&lt;/strong&gt;：AI 的沙箱里没有 AutoCAD，&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__204&quot;&gt;.dwg&lt;/code&gt;&amp;nbsp;打不开，API 调用对不对只能靠推测；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;3.&amp;nbsp;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__206&quot;&gt;API 版本敏感&lt;/strong&gt;：同一个&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__207&quot;&gt;Transaction&lt;/code&gt;，2010 版和 2024 版的命名空间、可用成员不完全一样，AI 很容易按新版写，然后在老版本编译不过；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;4.&amp;nbsp;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__209&quot;&gt;COM Interop 的坑&lt;/strong&gt;：&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__210&quot;&gt;Application&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__211&quot;&gt;Document&lt;/code&gt;&amp;nbsp;这些对象要释放，不释放 CAD 就残留进程，AI 生成的代码经常漏掉&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__212&quot;&gt;Marshal.ReleaseComObject&lt;/code&gt;；&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;5.&amp;nbsp;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__214&quot;&gt;依赖包老&lt;/strong&gt;：&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__215&quot;&gt;Newtonsoft.Json&lt;/code&gt;&amp;nbsp;的版本、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__216&quot;&gt;System.ValueTuple&lt;/code&gt;&amp;nbsp;要不要单独装包，都是玄学。&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__217&quot;&gt;所以我的结论很明确：&lt;/p&gt;&lt;section style=&quot;font-style: normal;padding: 1em;border-left: 4px solid #0F4C81;border-radius: 6px;color: #3f3f3f;background: #f7f7f7;margin-bottom: 1em;margin-left: 0;margin-right: 0;margin-top: 0;&quot; class=&quot;js_darkmode__218&quot;&gt;&lt;p style=&quot;display: block;font-size: 1em;letter-spacing: 0.1em;color: #3f3f3f;margin: 0;&quot; class=&quot;js_darkmode__219&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__220&quot;&gt;决定 AI 效率的，不是“C# 还是 Java”，而是“能不能本地跑通 + 结构是否显式”。&lt;/strong&gt;&lt;/p&gt;&lt;/section&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__221&quot;&gt;老 .NET Framework 项目在这两条上都不占优，AI 一样要从头问到尾。反过来，一个结构清晰、能一条命令跑起来的 Java 项目，AI 也能改得很顺。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__222&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__223&quot;&gt;语言只是外壳，闭环才是内核。&lt;/strong&gt;&lt;/p&gt;&lt;hr style=&quot;border-style: solid;border-width: 2px 0 0;border-color: rgba(0, 0, 0, 0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;&quot; class=&quot;js_darkmode__224&quot;/&gt;&lt;h2 data-heading=&quot;true&quot; style=&quot;display: block;padding: 0px 0.2em;margin: 4em auto 2em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);font-size: 19.2px;font-weight: bold;text-align: center;width: fit-content;max-width: 100%;box-sizing: border-box;white-space: normal;word-break: break-word;&quot;&gt;七、生态与结构：全家桶省心，选型迷宫费上下文&lt;/h2&gt;&lt;figure style=&quot;margin: 1.5em 8px;color: #3f3f3f;&quot; class=&quot;js_darkmode__225&quot;&gt;&lt;br/&gt;&lt;/figure&gt;&lt;/section&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/WCDkSduXsqecvEohe1Dh6moc40Rez4iaP79jPZ2IsB37qia9Jj8typMc5pHhQmkrTd2veOicqicx3SLhfP6Zw54bLnyX2uPGC6yYnyws7melayI/640?wx_fmt=png&amp;amp;from=appmsg&amp;amp;watermark=1#imgIndex=3&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.5666666666666667&quot; data-s=&quot;300,640&quot; data-type=&quot;png&quot; data-w=&quot;1080&quot; type=&quot;block&quot; data-imgfileid=&quot;100000825&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;null&quot; data-index=&quot;5&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/WCDkSduXsqecvEohe1Dh6moc40Rez4iaP79jPZ2IsB37qia9Jj8typMc5pHhQmkrTd2veOicqicx3SLhfP6Zw54bLnyX2uPGC6yYnyws7melayI/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1&amp;watermark=1#imgIndex=3&quot; _width=&quot;584px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 583.969px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1794893026840&quot; data-report-img-idx=&quot;3&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;section style=&quot;font-family: -apple-system-font, BlinkMacSystemFont, &amp;#39;Helvetica Neue&amp;#39;, &amp;#39;PingFang SC&amp;#39;, &amp;#39;Hiragino Sans GB&amp;#39;, &amp;#39;Microsoft YaHei UI&amp;#39;, &amp;#39;Microsoft YaHei&amp;#39;, Arial, sans-serif;font-size: 16px;line-height: 1.75;text-align: left;&quot;&gt;&lt;figure style=&quot;margin: 1.5em 8px;color: #3f3f3f;&quot; class=&quot;js_darkmode__226&quot;&gt;&lt;figcaption style=&quot;text-align: center;color: color-mix(in srgb, #3f3f3f 50%, transparent);font-size: 0.8em;&quot; class=&quot;js_darkmode__227&quot;&gt;闭环与清单&lt;/figcaption&gt;&lt;/figure&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__228&quot;&gt;C# 的“全家桶”确实省事&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__229&quot;&gt;写一个 ASP.NET Core 服务，常用的东西基本都在微软自己的体系里：&lt;/p&gt;&lt;section style=&quot;font-family: -apple-system-font, BlinkMacSystemFont, &amp;#39;Helvetica Neue&amp;#39;, &amp;#39;PingFang SC&amp;#39;, &amp;#39;Hiragino Sans GB&amp;#39;, &amp;#39;Microsoft YaHei UI&amp;#39;, &amp;#39;Microsoft YaHei&amp;#39;, Arial, sans-serif;font-size: 16px;line-height: 1.75;text-align: left;max-width: 100%;overflow: auto;-webkit-overflow-scrolling: touch;&quot; data-ignore-width=&quot;&quot;&gt;&lt;table class=&quot;js_darkmode__230&quot;&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;background: color-mix(in srgb, #3f3f3f 5%, transparent);text-align: left;&quot; class=&quot;js_darkmode__231&quot;&gt;&lt;section&gt;需求&lt;/section&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;background: color-mix(in srgb, #3f3f3f 5%, transparent);text-align: left;&quot; class=&quot;js_darkmode__232&quot;&gt;&lt;section&gt;常用方案&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__233&quot;&gt;&lt;section&gt;Web 框架&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__234&quot;&gt;&lt;section&gt;ASP.NET Core&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__235&quot;&gt;&lt;section&gt;数据访问&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__236&quot;&gt;&lt;section&gt;EF Core / Dapper&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__237&quot;&gt;&lt;section&gt;JSON&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__238&quot;&gt;&lt;section&gt;System.Text.Json&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__239&quot;&gt;&lt;section&gt;配置&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__240&quot;&gt;&lt;section&gt;Microsoft.Extensions.Configuration&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__241&quot;&gt;&lt;section&gt;日志&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__242&quot;&gt;&lt;section&gt;Microsoft.Extensions.Logging&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__243&quot;&gt;&lt;section&gt;DI&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__244&quot;&gt;&lt;section&gt;Microsoft.Extensions.DependencyInjection&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__245&quot;&gt;&lt;section&gt;测试&lt;/section&gt;&lt;/td&gt;&lt;td align=&quot;left&quot; style=&quot;border: 1px solid color-mix(in srgb, #3f3f3f 15%, transparent);padding: 0.25em 0.5em;color: #3f3f3f;word-break: keep-all;text-align: left;&quot; class=&quot;js_darkmode__246&quot;&gt;&lt;section&gt;xUnit / NUnit +&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__247&quot;&gt;dotnet test&lt;/code&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__248&quot;&gt;好处是&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__249&quot;&gt;版本组合基本不用操心&lt;/strong&gt;，配置方式、生命周期、日志接口都是一套风格。AI 生成代码时，上下文里塞一套约定就够了。&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__250&quot;&gt;Java 的选型多，版本组合是隐形成本&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__251&quot;&gt;Java 生态繁荣是优点，但对 AI 来说，意味着更多“必须记住的前提”：&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__252&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__253&quot;&gt;坑一：&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__254&quot;&gt;javax&lt;/code&gt;&amp;nbsp;和&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__255&quot;&gt;jakarta&lt;/code&gt;&amp;nbsp;的命名空间迁移。&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__256&quot;&gt;Spring Boot 3 之后，&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__257&quot;&gt;javax.persistence&lt;/code&gt;&amp;nbsp;全部换成了&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__258&quot;&gt;jakarta.persistence&lt;/code&gt;：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__259&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #8b949e;&quot;&gt;// Spring Boot 2.x&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;import&lt;/span&gt;&amp;nbsp;javax.persistence.Entity;&lt;span style=&quot;color: #8b949e;&quot;&gt;&lt;br/&gt;&lt;br/&gt;// Spring Boot 3.x&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;import&lt;/span&gt;&amp;nbsp;jakarta.persistence.Entity;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__260&quot;&gt;AI 训练数据里两种写法都大量存在。如果它没看清你的&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__261&quot;&gt;pom.xml&lt;/code&gt;&amp;nbsp;是 Boot 3，很容易给你生成&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__262&quot;&gt;javax&lt;/code&gt;&amp;nbsp;的 import，然后编译报“找不到符号”。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__263&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__264&quot;&gt;坑二：Lombok 把类的形状藏起来了。&lt;/strong&gt;&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__265&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #79c0ff;&quot;&gt;@Data&lt;/span&gt;&lt;span style=&quot;color: #79c0ff;&quot;&gt;&lt;br/&gt;@Builder&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;public&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;class&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;DeviceDto&lt;/span&gt;&amp;nbsp;{&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; private&lt;/span&gt;&amp;nbsp;String name;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; private&lt;/span&gt;&amp;nbsp;Double temperature;&lt;br/&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__266&quot;&gt;源码里只有两个字段。但编译后，这个类有一堆 getter、setter、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__267&quot;&gt;builder()&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__268&quot;&gt;equals()&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__269&quot;&gt;hashCode()&lt;/code&gt;。AI 静态阅读时看到的是一个“只有字段的类”，它可能不知道&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__270&quot;&gt;getTemperature()&lt;/code&gt;&amp;nbsp;存在，也可能重复生成一个已经由 Lombok 提供的方法。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__271&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__272&quot;&gt;坑三：MapStruct 之类的生成代码，源码里根本不存在。&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__273&quot;&gt;转换逻辑写在接口上，实现类是编译期生成的。AI 读不到实现，就很难判断字段映射对不对。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__274&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__275&quot;&gt;坑四：分层太细，一个字段要改六个文件。&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__276&quot;&gt;典型的 Java 分层是&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__277&quot;&gt;Controller → Service → Manager → DAO → Mapper → Entity → DTO → VO&lt;/code&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__278&quot;&gt;加一个“设备状态”字段，可能要动：&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__279&quot;&gt;Entity&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__280&quot;&gt;DTO&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__281&quot;&gt;VO&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__282&quot;&gt;Mapper&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__283&quot;&gt;Converter&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__284&quot;&gt;Controller&lt;/code&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__285&quot;&gt;C# 项目也分层，但很多团队会用&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__286&quot;&gt;record&lt;/code&gt;&amp;nbsp;+ 最小 API 把链路压短：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__287&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;sealed&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;record&lt;/span&gt;&lt;span style=&quot;color: #d2a8ff;&quot;&gt;&amp;nbsp;DeviceStatusDto&lt;/span&gt;(&lt;span style=&quot;color: #ffa657;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; string&lt;/span&gt;&amp;nbsp;Name,&lt;span style=&quot;color: #ffa657;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; double&lt;/span&gt;&amp;nbsp;Temperature,&lt;br/&gt;&amp;nbsp; &amp;nbsp; DateTimeOffset CollectedAt);&lt;br/&gt;&lt;br/&gt;app.MapGet(&lt;span style=&quot;color: #a5d6ff;&quot;&gt;&amp;quot;/devices/{name}/status&amp;quot;&lt;/span&gt;,&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;async&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #ffa657;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; string&lt;/span&gt;&amp;nbsp;name,&lt;br/&gt;&amp;nbsp; &amp;nbsp; IPlcReader plc,&lt;br/&gt;&amp;nbsp; &amp;nbsp; CancellationToken ct) =&amp;gt;&lt;br/&gt;{&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; var&lt;/span&gt;&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;value&lt;/span&gt;&amp;nbsp;=&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;await&lt;/span&gt;&amp;nbsp;plc.ReadAsync(&lt;span style=&quot;color: #a5d6ff;&quot;&gt;$&amp;quot;&lt;span style=&quot;color: #c9d1d9;&quot;&gt;{name}&lt;/span&gt;.DB1.DBD0&amp;quot;&lt;/span&gt;, ct);&lt;span style=&quot;color: #ff7b72;&quot;&gt;&lt;br/&gt;&amp;nbsp; &amp;nbsp; return&lt;/span&gt;&amp;nbsp;Results.Ok(&lt;span style=&quot;color: #ff7b72;&quot;&gt;new&lt;/span&gt;&amp;nbsp;DeviceStatusDto(name,&lt;span style=&quot;color: #ff7b72;&quot;&gt;&amp;nbsp;value&lt;/span&gt;, DateTimeOffset.Now));&lt;br/&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__288&quot;&gt;不是说这样一定更好，而是&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__289&quot;&gt;同样的业务，代码更短、层级更少，AI 需要读的上下文就少&lt;/strong&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__290&quot;&gt;上下文窗口是有限资源。省下来的每一百行，都可以用来装真正的业务规则。&lt;/p&gt;&lt;hr style=&quot;border-style: solid;border-width: 2px 0 0;border-color: rgba(0, 0, 0, 0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;&quot; class=&quot;js_darkmode__291&quot;/&gt;&lt;h2 data-heading=&quot;true&quot; style=&quot;display: block;padding: 0px 0.2em;margin: 4em auto 2em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);font-size: 19.2px;font-weight: bold;text-align: center;width: fit-content;max-width: 100%;box-sizing: border-box;white-space: normal;word-break: break-word;&quot;&gt;八、把项目改造成“AI 友好”的七个动作&lt;/h2&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__292&quot;&gt;说了这么多差距，其实都能靠工程手段补。下面这七条，不分语言，Java 项目照做一样有效。&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__293&quot;&gt;1. 一条命令能跑起来&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__294&quot;&gt;README 的第一段就写清楚：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__295&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;git&lt;span style=&quot;color: #ffa657;&quot;&gt;&amp;nbsp;clone&lt;/span&gt;&amp;nbsp;...&lt;br/&gt;dotnet run --project src/Web&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__296&quot;&gt;或者：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__297&quot;&gt;docker&amp;nbsp;compose&amp;nbsp;up&amp;nbsp;-d&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;mvn&amp;nbsp;spring-boot:run&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__298&quot;&gt;关键是&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__299&quot;&gt;别让人（和 AI）在第三步就卡住&lt;/strong&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__300&quot;&gt;本地依赖尽量用替身：内存数据库、Mock 配置中心、SQLite 代替 Oracle。真正的中间件留给集成环境。&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__301&quot;&gt;2. 依赖注册集中在一个文件&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__302&quot;&gt;C# 放&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__303&quot;&gt;Program.cs&lt;/code&gt;&amp;nbsp;或&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__304&quot;&gt;CompositionRoot.cs&lt;/code&gt;；Java 尽量用&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__305&quot;&gt;@Configuration&lt;/code&gt;&amp;nbsp;类显式&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__306&quot;&gt;@Bean&lt;/code&gt;，少用字段注入。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__307&quot;&gt;目标只有一个：&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__308&quot;&gt;别人读完一个文件，就知道谁依赖谁。&lt;/strong&gt;&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__309&quot;&gt;3. 处理链按顺序写在代码里&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__310&quot;&gt;中间件、过滤器、拦截器，注册顺序要能一眼看出来。别把关键逻辑塞进自动配置类或 XML。&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__311&quot;&gt;4. 结构控制在三层以内&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__312&quot;&gt;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__313&quot;&gt;Controller → Service → Repository&lt;/code&gt;&amp;nbsp;大多数业务够用了。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__314&quot;&gt;多出来的&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__315&quot;&gt;Manager&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__316&quot;&gt;Helper&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__317&quot;&gt;Util&lt;/code&gt;、&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__318&quot;&gt;Facade&lt;/code&gt;，如果没有明确职责，往往只是把调用链拉长。&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__319&quot;&gt;5. 测试必须能脚本化&lt;/h3&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__320&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;dotnet&lt;span style=&quot;color: #ffa657;&quot;&gt;&amp;nbsp;test&lt;/span&gt;&lt;br/&gt;mvn -q&lt;span style=&quot;color: #ffa657;&quot;&gt;&amp;nbsp;test&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__321&quot;&gt;测试是 AI 唯一能自己拿到的“正确答案”。没有测试，它只能猜。&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__322&quot;&gt;6. 约定写成文件，别只写在人脑子里&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__323&quot;&gt;在仓库根目录放一份给 AI 看的约定，比如&amp;nbsp;&lt;code style=&quot;font-size: 90%;color: #0F4C81;background: color-mix(in srgb, #0F4C81 8%, transparent);padding: 3px 5px;border-radius: 4px;border: 1px solid color-mix(in srgb, #0F4C81 20%, transparent);&quot; class=&quot;js_darkmode__324&quot;&gt;AGENTS.md&lt;/code&gt;：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__325&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;&lt;span style=&quot;color: #1f6feb;font-weight: 700;&quot; class=&quot;js_darkmode__326&quot;&gt;# 项目约定&lt;/span&gt;&lt;span style=&quot;color: #f2cc60;&quot;&gt;&lt;br/&gt;&lt;br/&gt;-&lt;/span&gt;&amp;nbsp;目标框架：net8.0，禁止引入新的第三方包&lt;span style=&quot;color: #f2cc60;&quot;&gt;&lt;br/&gt;-&lt;/span&gt;&amp;nbsp;依赖注册只允许改 src/Web/Program.cs&lt;span style=&quot;color: #f2cc60;&quot;&gt;&lt;br/&gt;-&lt;/span&gt;&amp;nbsp;数据访问统一走 EF Core，不要写裸 SQL&lt;span style=&quot;color: #f2cc60;&quot;&gt;&lt;br/&gt;-&lt;/span&gt;&amp;nbsp;验收标准：dotnet build 零错误，dotnet test 全绿&lt;span style=&quot;color: #f2cc60;&quot;&gt;&lt;br/&gt;-&lt;/span&gt;&amp;nbsp;提交前必须运行 dotnet format&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__327&quot;&gt;这几行字的收益，比你在对话里反复解释十遍都高。&lt;/p&gt;&lt;h3 data-heading=&quot;true&quot; style=&quot;padding-left: 8px;border-left: 3px solid #0F4C81;margin: 2em 8px 0.75em 0;color: #3f3f3f;font-size: 17.6px;font-weight: bold;line-height: 1.2;&quot; class=&quot;js_darkmode__328&quot;&gt;7. 少用隐藏的代码生成，或者把生成物说清楚&lt;/h3&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__329&quot;&gt;Lombok、MapStruct、T4 模板、源生成器都不是原罪。但如果项目重度依赖它们，就在约定文件里写明白：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__330&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;本项目使用 Lombok，实体类不需要手写 getter/setter&lt;br/&gt;DTO 转换由 MapStruct 生成，不要手写 Converter&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__331&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__332&quot;&gt;隐性知识一旦显式化，AI 的命中率立刻上一个台阶。&lt;/strong&gt;&lt;/p&gt;&lt;hr style=&quot;border-style: solid;border-width: 2px 0 0;border-color: rgba(0, 0, 0, 0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;&quot; class=&quot;js_darkmode__333&quot;/&gt;&lt;h2 data-heading=&quot;true&quot; style=&quot;display: block;padding: 0px 0.2em;margin: 4em auto 2em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);font-size: 19.2px;font-weight: bold;text-align: center;width: fit-content;max-width: 100%;box-sizing: border-box;white-space: normal;word-break: break-word;&quot;&gt;九、给 AI 的任务描述，也值得改一改&lt;/h2&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__334&quot;&gt;工具再好，描述不清也白搭。我现在提需求基本按这个模板来：&lt;/p&gt;&lt;pre style=&quot;color: #c9d1d9;background: #0d1117;font-size: 90%;overflow-x: auto;border-radius: 8px;line-height: 1.5;margin: 10px 8px;padding: 0 !important;&quot; data-ignore-width=&quot;&quot; class=&quot;js_darkmode__335&quot;&gt;&lt;span style=&quot;display: flex;padding: 10px 14px 0;&quot;&gt;&lt;svg x=&quot;0px&quot; y=&quot;0px&quot; width=&quot;45&quot; height=&quot;13&quot; viewbox=&quot;0 0 450 130&quot; overflow=&quot;visible&quot; aria-label=&quot;插图&quot;&gt;&lt;ellipse cx=&quot;50&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(220,60,54)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(237,108,96)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;225&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(218,151,33)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(247,193,81)&quot;&gt;&lt;/ellipse&gt;&lt;ellipse cx=&quot;400&quot; cy=&quot;65&quot; rx=&quot;50&quot; ry=&quot;52&quot; stroke=&quot;rgb(27,161,37)&quot; stroke-width=&quot;2&quot; fill=&quot;rgb(100,200,86)&quot;&gt;&lt;/ellipse&gt;&lt;/svg&gt;&lt;/span&gt;&lt;code style=&quot;display: -webkit-box;padding: 0.5em 1em 1em;overflow-x: auto;text-indent: 0;color: inherit;background: none;white-space: nowrap;margin: 0;&quot;&gt;&lt;span style=&quot;display:block;&quot;&gt;【背景】ASP.NET Core 8 + EF Core，依赖注册在 Program.cs&lt;br/&gt;【目标】在 /devices/{name}/status 返回值里加 CollectedAt 字段&lt;br/&gt;【约束】不改数据库结构；不引入新包；只允许改 Devices 目录&lt;br/&gt;【验收】dotnet build 零错误；dotnet test 全绿；接口返回 ISO 8601 时间&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__336&quot;&gt;四行里，最重要的是【约束】和【验收】。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__337&quot;&gt;没有约束，AI 会“顺手优化”出一堆你没要的改动；没有验收标准，它不知道自己算不算做完了。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__338&quot;&gt;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__339&quot;&gt;这跟管人是一样的：目标、边界、验收标准，缺一不可。&lt;/strong&gt;&lt;/p&gt;&lt;hr style=&quot;border-style: solid;border-width: 2px 0 0;border-color: rgba(0, 0, 0, 0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);height: 0.4em;margin: 1.5em 0;&quot; class=&quot;js_darkmode__340&quot;/&gt;&lt;h2 data-heading=&quot;true&quot; style=&quot;display: block;padding: 0px 0.2em;margin: 4em auto 2em;color: rgb(255, 255, 255);background: rgb(15, 76, 129);font-size: 19.2px;font-weight: bold;text-align: center;width: fit-content;max-width: 100%;box-sizing: border-box;white-space: normal;word-break: break-word;&quot;&gt;十、最后&lt;/h2&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__341&quot;&gt;回到标题那个问题：都是 AI 写代码，为什么 C# 比 Java 少绕两圈？&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__342&quot;&gt;我的答案是三句话：&lt;/p&gt;&lt;ol style=&quot;padding-left: 1em;margin-left: 0;color: #3f3f3f;&quot; class=&quot;js_darkmode__343 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;1.&amp;nbsp;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__345&quot;&gt;不是语言优劣。&lt;/strong&gt;&amp;nbsp;C# 有它自己的隐式机制，Java 也有写得非常清爽的项目。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;2.&amp;nbsp;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__347&quot;&gt;是默认姿势的差异。&lt;/strong&gt;&amp;nbsp;C# 的默认姿势把依赖、管道、启动方式都摆在明面上；Java 的默认姿势更依赖注解、配置和运行时容器。&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;3.&amp;nbsp;&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__349&quot;&gt;真正的分水岭是闭环。&lt;/strong&gt;&amp;nbsp;能不能一条命令跑起来、能不能让 AI 自己验证，比用什么语言重要得多。&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__350&quot;&gt;AI 并不“喜欢”C#。它喜欢的只是&lt;strong style=&quot;color: #0F4C81;font-weight: bold;font-size: inherit;&quot; class=&quot;js_darkmode__351&quot;&gt;能读、能跑、能验证&lt;/strong&gt;。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__352&quot;&gt;谁先把那些藏在人脑子里的约定，变成机器能读的显式规则，谁的项目就先快起来。&lt;/p&gt;&lt;p style=&quot;margin: 1.5em 8px;letter-spacing: 0.1em;color: #3f3f3f;&quot; class=&quot;js_darkmode__353&quot;&gt;这件事，跟语言无关，跟工程习惯有关。&lt;/p&gt;&lt;/section&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Tue, 17 Nov 2026 13:23:31 +0800</pubDate></item><item><title>当 AI Agent 遇到 Nacos：OpenClaw.NET 集成入门</title><link>https://www.codepub.top/post/736.html</link><description>&lt;p style=&quot;margin: 10px auto; text-indent: 0px; line-height: 24px; color: rgb(51, 51, 51); font-family: verdana, 宋体, Arial; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; data-pm-slice=&quot;0 0 []&quot; class=&quot;js_darkmode__0&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 16px; visibility: visible;&quot;&gt;——不写一行 LLM 调用，让 Agent 确定性地发现并调用注册中心里的 &lt;span class=&quot;&quot;&gt;MCP&lt;/span&gt; 工具&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;section style=&quot;margin: 10px auto; text-indent: 0px; line-height: 24px; color: rgb(51, 51, 51); font-family: verdana, 宋体, Arial; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; class=&quot;js_darkmode__1&quot;&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/mmbiz_png/dyticMV2LHmsaDm5MOL5bcfVvaAffZI9henU5NkCMBcsLZOic1HWYlcZiaib8OSWxZAqy3aVVTWfOTh7Q8ZI0he05jd3kfOTjibx9noCR8m27ZQs/640?wx_fmt=png&amp;amp;from=appmsg#imgIndex=0&quot; alt=&quot;image&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;0.5648148148148148&quot; data-type=&quot;png&quot; data-w=&quot;1080&quot; style=&quot;border: 0px; max-width: 100%; cursor: zoom-in; height: auto !important; transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important; visibility: visible !important; width: 583.984px !important;&quot; data-imgfileid=&quot;506620394&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;border: 0px;max-width: 100%;height: auto !important;cursor: zoom-in;transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important;&quot; data-index=&quot;2&quot; src=&quot;https://mmbiz.qpic.cn/mmbiz_png/dyticMV2LHmsaDm5MOL5bcfVvaAffZI9henU5NkCMBcsLZOic1HWYlcZiaib8OSWxZAqy3aVVTWfOTh7Q8ZI0he05jd3kfOTjibx9noCR8m27ZQs/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1#imgIndex=0&quot; _width=&quot;584px&quot; data-before-load-time=&quot;1794532145581&quot; data-report-img-idx=&quot;0&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;/p&gt;&lt;hr style=&quot;border-top: rgba(0, 0, 0, 0.15); border-right-color: rgba(0, 0, 0, 0.15); border-bottom-color: rgba(0, 0, 0, 0.15); border-left-color: rgba(0, 0, 0, 0.15); margin: 5px 0px; font-family: verdana, 宋体, Arial; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; class=&quot;js_darkmode__2&quot;/&gt;&lt;h2 style=&quot;font-size: 21px; font-weight: bold; line-height: 1.5; margin: 10px 0px; color: rgb(51, 51, 51); font-family: verdana, 宋体, Arial; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; class=&quot;js_darkmode__3&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 16px; visibility: visible;&quot;&gt;从一个场景说起&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;margin: 10px auto; text-indent: 0px; line-height: 24px; color: rgb(51, 51, 51); font-family: verdana, 宋体, Arial; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; class=&quot;js_darkmode__4&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 16px; visibility: visible;&quot;&gt;假设你在写一个 AI Agent，它要&amp;quot;查一下杭州的天气&amp;quot;。天气服务不是你写的，它注册在公司的 Nacos 集群里，是一个标准的 MCP Server。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; text-indent: 0px; line-height: 24px; color: rgb(51, 51, 51); font-family: verdana, 宋体, Arial; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; class=&quot;js_darkmode__5&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 16px; visibility: visible;&quot;&gt;要完成这个任务，Agent 得做一串动作：发现服务、确认版本、拿到工具列表和参数 schema、发起调用、处理失败、留审计记录。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; text-indent: 0px; line-height: 24px; color: rgb(51, 51, 51); font-family: verdana, 宋体, Arial; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; class=&quot;js_darkmode__6&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 16px; visibility: visible;&quot;&gt;常见的做法是让大模型自己去摸索。实测下来，这种方式每轮要消耗上万个 input token，而且结果不稳定——如果注册表里的描述写着&amp;quot;天气&amp;quot;、后端实际只有时间工具，模型还可能直接编一个气温出来。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; text-indent: 0px; line-height: 24px; color: rgb(51, 51, 51); font-family: verdana, 宋体, Arial; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; class=&quot;js_darkmode__7&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 16px; visibility: visible;&quot;&gt;OpenClaw.NET 的做法是把这串动作做成一条确定性管线，全程不调用 LLM。本文介绍这套基于 &lt;span class=&quot;&quot;&gt;Nacos 3.2.4&lt;/span&gt; AI 注册中心和 MCP 协议的集成怎么用、背后是什么结构。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;border-top: rgba(0, 0, 0, 0.15); border-right-color: rgba(0, 0, 0, 0.15); border-bottom-color: rgba(0, 0, 0, 0.15); border-left-color: rgba(0, 0, 0, 0.15); margin: 5px 0px; font-family: verdana, 宋体, Arial; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; class=&quot;js_darkmode__8&quot;/&gt;&lt;h2 style=&quot;font-size: 21px; font-weight: bold; line-height: 1.5; margin: 10px 0px; color: rgb(51, 51, 51); font-family: verdana, 宋体, Arial; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; class=&quot;js_darkmode__9&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 16px; visibility: visible;&quot;&gt;一、Nacos AI 管理中心管什么&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;margin: 10px auto; text-indent: 0px; line-height: 24px; color: rgb(51, 51, 51); font-family: verdana, 宋体, Arial; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; visibility: visible;&quot; class=&quot;js_darkmode__10&quot;&gt;&lt;span style=&quot;visibility: visible;&quot;&gt;&lt;span style=&quot;font-size: 16px; visibility: visible;&quot;&gt;Nacos 3.x 把 AI 资源提升为与配置管理、服务发现并列的核心能力，叫 &lt;span class=&quot;&quot;&gt;AI Registry&lt;/span&gt;。它管的是：Skill、Agent、MCP Server、Prompt、AgentSpec 这些东西怎么注册进平台、怎么治理、怎么按版本发布、怎么被运行时发现。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__11&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;先建立一个认知，很多集成问题都出在这里：&lt;/span&gt;&lt;/p&gt;&lt;blockquote style=&quot;background-image: none;border-width: medium medium medium 3px;border-style: none none none solid;border-color: currentcolor currentcolor currentcolor rgb(226, 223, 223);border-image: none;padding: 5px 10px;margin: 10px 0px;color: rgb(85, 85, 85);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__12&quot;&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;AI 资源不是配置，也不是普通服务。&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__13&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;配置管理关心内容的发布和监听，服务发现关心实例健康。MCP Server 的治理重点是另外一些东西：协议类型、端点、版本，以及&amp;quot;工具开关&amp;quot;（toolSpec.ToolsMeta）——管理员可以在 Nacos 控制台直接关掉某个 MCP Server 的某个工具，运行时必须遵守。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__14&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;OpenClaw.NET 走的是 Nacos MCP Router 模式：由 Router 统一发现注册表中的 MCP Server，对外提供 search / add / use 三个工具。&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;border-top: rgba(0, 0, 0, 0.15);border-right-color: rgba(0, 0, 0, 0.15);border-bottom-color: rgba(0, 0, 0, 0.15);border-left-color: rgba(0, 0, 0, 0.15);margin: 5px 0px;font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__15&quot;/&gt;&lt;h2 style=&quot;font-size: 21px;font-weight: bold;line-height: 1.5;margin: 10px 0px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__16&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;二、架构：三层各管一摊&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__17&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;职责划分是这样的：&lt;/span&gt;&lt;/p&gt;&lt;blockquote style=&quot;background-image: none;border-width: medium medium medium 3px;border-style: none none none solid;border-color: currentcolor currentcolor currentcolor rgb(226, 223, 223);border-image: none;padding: 5px 10px;margin: 10px 0px;color: rgb(85, 85, 85);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__18&quot;&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Registry 决定&amp;quot;存在什么、谁可见&amp;quot;，Router 决定&amp;quot;如何被发现和连接&amp;quot;，OpenClaw Runtime 决定&amp;quot;何时、以何身份、经何审批执行&amp;quot;。&lt;/span&gt;&lt;/p&gt;&lt;section style=&quot;text-align: center;&quot;&gt;&lt;img data-src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/dyticMV2LHmuCCcfeWs9uDMdvzEp3l3jf8qqTQUw1t0EkrmKJGqaYgLIJkJ9VGHWdZrUiaXgLtaydicj8dMB7iaOzOIl4K2cN2OHPhlFCE2dESQ/640?wx_fmt=png&amp;amp;from=appmsg#imgIndex=1&quot; class=&quot;rich_pages wxw-img&quot; data-ratio=&quot;1.009049773755656&quot; data-s=&quot;300,640&quot; data-type=&quot;png&quot; data-w=&quot;663&quot; type=&quot;block&quot; data-imgfileid=&quot;506620395&quot; data-aistatus=&quot;1&quot; data-original-style=&quot;null&quot; data-index=&quot;3&quot; src=&quot;https://mmbiz.qpic.cn/sz_mmbiz_png/dyticMV2LHmuCCcfeWs9uDMdvzEp3l3jf8qqTQUw1t0EkrmKJGqaYgLIJkJ9VGHWdZrUiaXgLtaydicj8dMB7iaOzOIl4K2cN2OHPhlFCE2dESQ/640?wx_fmt=png&amp;from=appmsg&amp;tp=wxpic&amp;wxfrom=5&amp;wx_lazy=1#imgIndex=1&quot; _width=&quot;584px&quot; style=&quot;height: auto !important; visibility: visible !important; width: 560.984px !important;&quot; alt=&quot;图片&quot; data-before-load-time=&quot;1794532210780&quot; data-report-img-idx=&quot;1&quot; data-fail=&quot;0&quot;/&gt;&lt;/section&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;table&gt;&lt;thead&gt;&lt;tr class=&quot;firstRow&quot;&gt;&lt;th data-colwidth=&quot;114&quot; style=&quot;background-color: rgb(250, 250, 250);border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__19&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;层&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th data-colwidth=&quot;172&quot; style=&quot;background-color: rgb(250, 250, 250);border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__20&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;组件&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;th style=&quot;background-color: rgb(250, 250, 250);border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__21&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;职责&lt;/span&gt;&lt;/section&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td data-colwidth=&quot;114&quot; style=&quot;border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__22&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;注册中心&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td data-colwidth=&quot;172&quot; style=&quot;border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__23&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Nacos 3.2.4 AI 管理中心&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__24&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;托管 MCP Server 元数据、版本、端点、工具开关&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td data-colwidth=&quot;114&quot; style=&quot;border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__25&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;发现路由&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td data-colwidth=&quot;172&quot; style=&quot;border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__26&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;NacosMcpRouter&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__27&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;search（搜索 Server）→ add（安装连接）→ use（调用工具）&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td data-colwidth=&quot;114&quot; style=&quot;border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__28&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;运行时&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td data-colwidth=&quot;172&quot; style=&quot;border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__29&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;OpenClaw.NET&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(192, 192, 192);border-collapse: collapse;padding: 8px 14px;min-width: 50px;&quot; class=&quot;js_darkmode__30&quot;&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;能力解析、策略审批、缓存熔断、审计，全程零 LLM 调用&lt;/span&gt;&lt;/section&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;hr style=&quot;border-top: rgba(0, 0, 0, 0.15);border-right-color: rgba(0, 0, 0, 0.15);border-bottom-color: rgba(0, 0, 0, 0.15);border-left-color: rgba(0, 0, 0, 0.15);margin: 5px 0px;font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__31&quot;/&gt;&lt;h2 style=&quot;font-size: 21px;font-weight: bold;line-height: 1.5;margin: 10px 0px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__32&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;三、上手：Agent 侧只需要几行声明&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__33&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;接入的复杂工作都在 adapter 和运行时里。对 Agent 开发者来说，只需要在 skill 文件里声明一个能力引用：&lt;/span&gt;&lt;/p&gt;&lt;pre tabindex=&quot;0&quot; style=&quot;white-space:pre-wrap;transition-duration: 0.2s;transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color;overflow: auto;margin: 10px auto;&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace;transition-duration: 0.2s;transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color;color: rgb(17, 27, 39);background: none;text-align: left;word-spacing: normal;word-break: normal;overflow-wrap: normal;line-height: 1.5;tab-size: 4;hyphens: none;display: block;margin: 0px;&quot; class=&quot;js_darkmode__34&quot;&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__35&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;-&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__36&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;id&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__37&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;weather&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__38&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;kind&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__39&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;tool_call&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__40&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;capability_ref&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__41&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__42&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;provider&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__43&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;nacos&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__44&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;binding&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__45&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;dynamic&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__46&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;intent&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__47&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__48&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;task_description&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__49&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #116B00;&quot; class=&quot;js_darkmode__50&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;quot;查询杭州今天天气&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__51&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;keywords&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__52&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__53&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;[&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #116B00;&quot; class=&quot;js_darkmode__54&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;quot;天气&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__55&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #116B00;&quot; class=&quot;js_darkmode__56&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;quot;杭州&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__57&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__58&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;tool_args&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__59&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__60&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;city&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111B27;&quot; class=&quot;js_darkmode__61&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;杭州&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__62&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;几个字段的含义：&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__63 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;provider: nacos&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;：这个能力从 Nacos 注册中心解析，不是本地静态绑定；&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;binding: dynamic&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;：动态绑定，运行时按需搜索、选择最合适的 MCP Server 和工具；&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;intent&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;：给 Router 的检索意图。Router 内部用 ONNX 做本地向量检索，不依赖外部 LLM。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__64&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;解析和调用由&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;AgentRuntime&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;/&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;MafAgentRuntime&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;的同一条 capability 路径完成，没有 LLM 发现调用。你写的是意图，&amp;quot;找哪个 Server、调哪个工具、参数怎么填&amp;quot;由管线完成。&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;border-top: rgba(0, 0, 0, 0.15);border-right-color: rgba(0, 0, 0, 0.15);border-bottom-color: rgba(0, 0, 0, 0.15);border-left-color: rgba(0, 0, 0, 0.15);margin: 5px 0px;font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__65&quot;/&gt;&lt;h2 style=&quot;font-size: 21px;font-weight: bold;line-height: 1.5;margin: 10px 0px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__66&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;四、使用时会碰到的四个机制&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__67&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;使用侧很轻，但了解这几个机制对配置和排障有帮助。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16px;font-weight: bold;line-height: 1.5;margin: 10px 0px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__68&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;4.1 协议防腐层&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__69&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Router 的工具返回不是结构化 JSON，而是自然语言包裹 JSON 的&amp;quot;散文信封&amp;quot;，比如 search 的返回：&lt;/span&gt;&lt;/p&gt;&lt;pre tabindex=&quot;0&quot; style=&quot;white-space:pre-wrap;transition-duration: 0.2s;transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color;overflow: auto;margin: 10px auto;&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace;transition-duration: 0.2s;transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color;color: rgb(17, 27, 39);background: none;text-align: left;word-spacing: normal;word-break: normal;overflow-wrap: normal;line-height: 1.5;tab-size: 4;hyphens: none;display: block;margin: 0px;&quot; class=&quot;js_darkmode__70&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;## 获取查询天气的步骤如下:&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;### 1. 当前可用的mcp server列表为:{&amp;quot;weather-mcp&amp;quot;:{...}}&lt;/span&gt;&lt;br/&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;### 2. 从当前可用的mcp server列表中选择你需要的mcp server调add_mcp_server工具安装mcp server&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__71&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;OpenClaw.NET 把对这些中文&lt;span class=&quot;&quot;&gt;字面量&lt;/span&gt; marker 的解析收敛到一个独立的契约文件，并有测试钉住。上游协议变化的影响被限制在这一个点，业务代码不用动。同一套 adapter 同时兼容 Python 版和 .NET 版 Router。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__72&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;实际影响：升级 Router 或 Nacos 版本时，只需要看 adapter 的兼容性说明。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16px;font-weight: bold;line-height: 1.5;margin: 10px 0px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__73&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;4.2 缓存与世代&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__74&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;动态解析结果会缓存（TTL 300 秒、容量 1024、FIFO 驱逐），缓存键里编入了世代（generation）：&lt;/span&gt;&lt;/p&gt;&lt;pre tabindex=&quot;0&quot; style=&quot;white-space:pre-wrap;transition-duration: 0.2s;transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color;overflow: auto;margin: 10px auto;&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace;transition-duration: 0.2s;transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color;color: rgb(17, 27, 39);background: none;text-align: left;word-spacing: normal;word-break: normal;overflow-wrap: normal;line-height: 1.5;tab-size: 4;hyphens: none;display: block;margin: 0px;&quot; class=&quot;js_darkmode__75&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;key = &amp;quot;{provider.Id}:{generation}:{binding}:{intentKey}&amp;quot;&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__76&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Nacos 侧配置一变，世代 +1，旧键直接失效，旧世代的在途解析晚到了也写不进新缓存。如果填充完成后发现世代变了，返回&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;capability_stale_binding&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;让调用方重试，不会静默使用旧绑定。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16px;font-weight: bold;line-height: 1.5;margin: 10px 0px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__77&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;4.3 熔断&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__78&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;同一目标（安全域 + provider + 世代 + Server + 工具）连续失败 3 次，熔断 30 秒；成功一次立即复位；被策略阻止（Blocked）的失败不计入。熔断器容量满时，冷却中的熔断器不会被驱逐，只淘汰尚未熔断的条目。&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;font-size: 16px;font-weight: bold;line-height: 1.5;margin: 10px 0px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__79&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;4.4 失效事件&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__80&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Nacos 配置变更的监听链路：&lt;/span&gt;&lt;/p&gt;&lt;pre tabindex=&quot;0&quot; style=&quot;white-space:pre-wrap;transition-duration: 0.2s;transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color;overflow: auto;margin: 10px auto;&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace;transition-duration: 0.2s;transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color;color: rgb(17, 27, 39);background: none;text-align: left;word-spacing: normal;word-break: normal;overflow-wrap: normal;line-height: 1.5;tab-size: 4;hyphens: none;display: block;margin: 0px;&quot; class=&quot;js_darkmode__81&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Nacos 长轮询 → 内容 SHA-256 → 与上次哈希比对 → 不同则发布 CapabilityChange → 缓存全量清空&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__82&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;几点说明：&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot;js_darkmode__83 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;SHA-256 去重，防止 SDK 把初始快照当变更重复投递；&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;只保留 digest，失效通道不传输、不落地配置正文；&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;用保守的全量失效，正确性优先于缓存命中率。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;border-top: rgba(0, 0, 0, 0.15);border-right-color: rgba(0, 0, 0, 0.15);border-bottom-color: rgba(0, 0, 0, 0.15);border-left-color: rgba(0, 0, 0, 0.15);margin: 5px 0px;font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__84&quot;/&gt;&lt;h2 style=&quot;font-size: 21px;font-weight: bold;line-height: 1.5;margin: 10px 0px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__85&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;五、安全模型：句柄不等于授权&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__86&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;这套集成里有一条原则贯穿始终：&lt;/span&gt;&lt;/p&gt;&lt;blockquote style=&quot;background-image: none;border-width: medium medium medium 3px;border-style: none none none solid;border-color: currentcolor currentcolor currentcolor rgb(226, 223, 223);border-image: none;padding: 5px 10px;margin: 10px 0px;color: rgb(85, 85, 85);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__87&quot;&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;quot;A tool handle, never permission to execute.&amp;quot; 能力句柄只是句柄，授权在每次执行时重新检查。&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__88&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;具体体现：&lt;/span&gt;&lt;/p&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot;js_darkmode__89 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;整个能力解析与执行被包装成名为&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;resolve_capability&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;的工具，先经过 OpenClawToolExecutor 的治理链（审批、hooks、审计、工具策略），再执行目标工具；&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;userId / sessionId 随 MCP 请求的&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Meta&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;字段传给 Router，审计链路完整；&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;缓存命中后会复检：如果当前 skill 策略已不允许某工具，动态绑定丢弃缓存重新解析，静态绑定保持 pin、在执行阶段拒绝；&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;注册表元数据不等于真实能力。即使注册中心的描述和后端实际能力不符，Gateway 的本地策略与授权依然生效。&lt;/span&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ol&gt;&lt;hr style=&quot;border-top: rgba(0, 0, 0, 0.15);border-right-color: rgba(0, 0, 0, 0.15);border-bottom-color: rgba(0, 0, 0, 0.15);border-left-color: rgba(0, 0, 0, 0.15);margin: 5px 0px;font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__90&quot;/&gt;&lt;h2 style=&quot;font-size: 21px;font-weight: bold;line-height: 1.5;margin: 10px 0px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__91&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;六、上手 Checklist&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__92&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;按这个顺序把环境跑起来：&lt;/span&gt;&lt;/p&gt;&lt;ol style=&quot;list-style-type: decimal;&quot; class=&quot;js_darkmode__93 list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;准备 Nacos 3.2.4，在 AI 管理中心注册你的 MCP Server（元数据、端点、版本、工具开关）；&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;安装 Router（.NET global tool，不需要 Python 环境）：&lt;/span&gt;&lt;/p&gt;&lt;pre tabindex=&quot;0&quot; style=&quot;white-space:pre-wrap;transition-duration: 0.2s;transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color;overflow: auto;margin: 0.5em 0px;&quot;&gt;&lt;code style=&quot;white-space:pre-wrap;font-family: Consolas, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace;transition-duration: 0.2s;transition-property: background, font-size, border-color, border-radius, border-width, padding, margin, color;color: rgb(17, 27, 39);background: none;text-align: left;word-spacing: normal;word-break: normal;overflow-wrap: normal;line-height: 1.5;tab-size: 4;hyphens: none;display: block;margin: 0px;&quot; class=&quot;js_darkmode__94&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;dotnet tool&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7C00AA;&quot; class=&quot;js_darkmode__95&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;install&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #005A8E;&quot; class=&quot;js_darkmode__96&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;--global&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;NacosMcpRouter&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;注意：Router 的 Console API client 默认连&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;127.0.0.1:8080&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;且不可覆盖，本地验证时把 Nacos Console 端口固定为 8080；&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;在 skill 文件中声明&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;capability_ref&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;（见第三节），按需选择&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace, sans-serif;font-size: 12px;padding: 0px 5px;line-height: 1.8;margin: 0px 3px;display: inline-block;overflow-x: auto;vertical-align: middle;border-radius: 3px;color: rgb(192, 52, 29);background-color: rgba(0, 0, 0, 0.04);border-width: medium !important;border-style: none !important;border-color: currentcolor !important;border-image: none !important;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;binding: dynamic&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;（动态发现）或静态绑定（固定目标）；&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;运行 Agent，观察治理链日志：能力解析、策略审批、工具调用、审计记录应一一对应，全程无 LLM 发现调用；&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;验证治理行为：在 Nacos 控制台关闭某个工具，确认运行时在数秒内完成失效并拒绝后续调用。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;hr style=&quot;border-top: rgba(0, 0, 0, 0.15);border-right-color: rgba(0, 0, 0, 0.15);border-bottom-color: rgba(0, 0, 0, 0.15);border-left-color: rgba(0, 0, 0, 0.15);margin: 5px 0px;font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__97&quot;/&gt;&lt;h2 style=&quot;font-size: 21px;font-weight: bold;line-height: 1.5;margin: 10px 0px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__98&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;结语&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;margin: 10px auto;text-indent: 0px;line-height: 24px;color: rgb(51, 51, 51);font-family: verdana, 宋体, Arial;font-size: 13.3333px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;&quot; class=&quot;js_darkmode__99&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Nacos 3.2.4 的 AI Registry 解决&amp;quot;有什么、谁可见&amp;quot;，OpenClaw.NET 运行时解决&amp;quot;能不能安全地用&amp;quot;。对使用者来说，这套集成的收益很直接：几行 YAML 声明意图，换来确定性的发现、调用和治理——成本可预测，行为可审计，失败有明确的降级路径。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Fri, 13 Nov 2026 09:10:04 +0800</pubDate></item></channel></rss>