Summary
Implement ITokenReplacementService to replace Oqtane tokens in file contents and file/directory names.
Depends On
Phase 2: Template Discovery (needs TemplateManifest model)
Tasks
Implement ITokenReplacementService / TokenReplacementService:
GenerateTokens(ModuleOptions options) → Dictionary<string, string>
ReplaceTokens(string content, Dictionary<string, string> tokens) → string
ReplaceTokensInPath(string path, Dictionary<string, string> tokens) → string
Support all standard Oqtane tokens:
Token
Replacement
[Owner]
Owner name (e.g., MarkDav)
[Module]
Module name (e.g., WeatherArbitrage)
[Description]
Module description
[Guid]
New GUID — unique per occurrence
[Year]
Current year (e.g., 2026)
[Date]
Current date (e.g., 2026-02-12)
[Framework]
Target framework (e.g., net10.0)
Ensure [Guid] generates a distinct GUID each time it appears (not one GUID reused everywhere)
Handle token replacement in both file contents and file/directory paths
Acceptance Criteria
Unit tests pass for all token types
Multiple [Guid] tokens in the same file produce different GUIDs
Tokens in file paths are replaced (e.g., [Owner].[Module].Client/ → MarkDav.WeatherArbitrage.Client/)
Content with no tokens passes through unchanged
References
Summary
Implement
ITokenReplacementServiceto replace Oqtane tokens in file contents and file/directory names.Depends On
TemplateManifestmodel)Tasks
ITokenReplacementService/TokenReplacementService:GenerateTokens(ModuleOptions options)→Dictionary<string, string>ReplaceTokens(string content, Dictionary<string, string> tokens)→ stringReplaceTokensInPath(string path, Dictionary<string, string> tokens)→ string[Owner]MarkDav)[Module]WeatherArbitrage)[Description][Guid][Year]2026)[Date]2026-02-12)[Framework]net10.0)[Guid]generates a distinct GUID each time it appears (not one GUID reused everywhere)Acceptance Criteria
[Guid]tokens in the same file produce different GUIDs[Owner].[Module].Client/→MarkDav.WeatherArbitrage.Client/)References