Class ResourceSeeder
Seeds the shipped default resources (Resource/** from the
HiNc-Resource content package, next to the executable) into the
admin resource directory, honoring the ResourceDefaultMarker
ownership convention:
- Marked items (
X.default.Extfiles,Name.default/folders) are system territory — they are copied in, refreshed when the shipped bytes change, and deleted when no longer shipped. - Unmarked items belong to the user and are never touched.
HiNc-Resource version; when it matches, the whole pass is skipped,
so steady-state startup cost is one small file read.
public static class ResourceSeeder
- Inheritance
-
ResourceSeeder
- Inherited Members
Remarks
One-time migration for pre-marker installs: an unmarked twin of a shipped item (same path with the marker stripped) whose bytes equal the shipped bytes is absorbed — deleted so the marked copy replaces it. A twin with different bytes is a user customization and is left alone.
Unmarked files in the source tree are ignored entirely; stale additive-only build output therefore never propagates to the admin folder. All failures are logged as warnings — seeding never throws.
Fields
ResourceAssemblyFileName
Assembly file probed (next to the executable) for the shipped resource version.
public const string ResourceAssemblyFileName = "HiNc-Resource.dll"
Field Value
VersionStampFileName
Version stamp file name written at the destination resource root.
public const string VersionStampFileName = ".hinc-resource-version"
Field Value
Methods
Seed(string, ILogger)
Seeds the shipped defaults into adminResourceDirectory.
Source is Resource/ under BaseDirectory
(the process CWD is not stable enough to anchor on). Never throws.
public static void Seed(string adminResourceDirectory, ILogger logger)