Skip to main content

glue-common-extraction

Moving Glue.csproj logic into GlueCommon (net8.0) through the XxxCore.Self seams. Triggers: IObjectFinderCore, IAvailableAssetTypesCore, ITypeResolutionCore, IGlueStateCore, IPluginManagerCore, GlueCommonUnitTests, Fake*Core, ObjectFinderCoreCollection.

跳到安装

来源信息

仓库
vchelaru/FlatRedBall
最近来源活动
2026年9月17日 22:01
检测到的 SKILL.md 语言
英语
星标
576
分支
73

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
glue-common-extraction
description
Moving Glue.csproj logic into GlueCommon (net8.0) through the XxxCore.Self seams. Triggers: IObjectFinderCore, IAvailableAssetTypesCore, ITypeResolutionCore, IGlueStateCore, IPluginManagerCore, GlueCommonUnitTests, Fake*Core, ObjectFinderCoreCollection.
# GlueCommon Extraction `GlueCommon` is plain net8.0 and can't reference `Glue.csproj`, so logic moved there reaches Glue's singletons only through narrow seam interfaces: `GlueCommon/SaveClasses/IObjectFinderCore.cs`, `SaveClasses/IGlueStateCore.cs`, `Elements/IAvailableAssetTypesCore.cs`, `Parsing/ITypeResolutionCore.cs`, `Build/IBuildToolAssociationCore.cs`, `Controls/IErrorReportingCore.cs`, `SaveClasses/IPluginManagerCore.cs` (under `SaveClasses/`, not `Plugins/`, because `GlueCommon.csproj` compile-excludes `Plugins\**`). Each has a static `XxxCore.Self` that the Glue-side class (`ObjectFinder`, `GlueState`, `AvailableAssetTypes`, `TypeManager`, `PluginManager`, ...) assigns from its own static constructor. Tests live in `Tests/GlueCommonUnitTests`, one hand-rolled `Fake*Core` per seam, and every test class that swaps a `Self` sits in `[Collection(nameof(ObjectFinderCoreCollection))]`. ## Pattern - Widen a seam only with members the Glue class already implements publicly; the seam carries no logic of its own. - Split a class across the two projects, not a file. Extension-method callers resolve unchanged; non-extension static calls need the new class name. - `GlueState.Self.CurrentGlueProject` is `ObjectFinder.Self.GlueProject`, so `IObjectFinderCore` already covers that reach. ## Landmines - `XxxCore.Self` stays null until the Glue class's static constructor runs, and only a direct touch of that class triggers it. Code that runs during project load and reaches a singleton only through its seam needs an explicit startup touch; `TypeManager.EnsureTypeResolutionSeamWired()` in `MainGlueWindow`/`GlueTestBootstrap` is the existing example. - `GlueCommonUnitTests.csproj` builds and tests standalone; `GlueUnitTests.csproj` needs `-p:SolutionDir` (see [glue-unit-test-bootstrap](../glue-unit-test-bootstrap/SKILL.md)). - CI runs `GlueCommonUnitTests` on Linux, where `new FilePath("c:/...")` is relative and `FullPath` gets the cwd prefixed. A test that compares a raw string against `FilePath.FullPath` must build the string from a `FilePath` too; a literal passes on Windows and fails on Linux.
在 GitHub 查看