ArchiveKind was a hardcoded two-value enum (ssh_access/config_update),
wired through FilenameParser's regex, MailTemplateSet's two fixed
slots, and SettingsForm's two fixed tabs. Operators wanted arbitrary
custom templates (own file-name suffix, subject, body) without a code
change per new archive kind ssh-access-tui might start producing.
Replaced with MailTemplateDefinition (DisplayName/FileSuffix/Subject/
BodyHtml) in an open-ended list: FilenameParser now accepts any
"{login}_{suffix}.7z" and ArchiveScanner matches the suffix against
the configured list; SendJob.Kind/SendLogEntry.Kind became plain
strings; SettingsForm gained a template list (+/- buttons, editor
panel) replacing the two static tabs. ssh_access/config_update are now
just the two default entries in that list, not special-cased.
Handles the two backward-compat edges that matter for a tool already
in real use: old config.json's object-shaped "templates" migrates to
the new list shape transparently on first load (DataContractJsonSerializer
turned out to silently produce an empty list rather than throw on the
old shape, so detection is structural, not exception-based), and old
send-log.csv rows with PascalCase Kind values (SshAccess/ConfigUpdate)
still dedupe correctly against the new snake_case suffixes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
62 lines
2.7 KiB
XML
62 lines
2.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
<PropertyGroup>
|
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
<ProjectGuid>{96DFBF08-8BCA-4A4E-BDF8-3F013965E30E}</ProjectGuid>
|
|
<OutputType>Library</OutputType>
|
|
<RootNamespace>BulkArchiveMailer.Core</RootNamespace>
|
|
<AssemblyName>BulkArchiveMailer.Core</AssemblyName>
|
|
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
|
|
<FileAlignment>512</FileAlignment>
|
|
<Deterministic>true</Deterministic>
|
|
<LangVersion>7.3</LangVersion>
|
|
<!--
|
|
Deliberately NOT referencing anything Outlook/COM/registry-related
|
|
here - this project must stay buildable and testable without
|
|
Windows/Office installed. See BulkArchiveMailer.Core.Tests and the
|
|
dotnet-developer agent notes for why that boundary matters.
|
|
-->
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
<DebugSymbols>true</DebugSymbols>
|
|
<DebugType>full</DebugType>
|
|
<Optimize>false</Optimize>
|
|
<OutputPath>bin\Debug\</OutputPath>
|
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
<ErrorReport>prompt</ErrorReport>
|
|
<WarningLevel>4</WarningLevel>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
<DebugType>pdbonly</DebugType>
|
|
<Optimize>true</Optimize>
|
|
<OutputPath>bin\Release\</OutputPath>
|
|
<DefineConstants>TRACE</DefineConstants>
|
|
<ErrorReport>prompt</ErrorReport>
|
|
<WarningLevel>4</WarningLevel>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<Reference Include="System" />
|
|
<Reference Include="System.Core" />
|
|
<Reference Include="System.Runtime.Serialization" />
|
|
<Reference Include="System.Xml" />
|
|
<Reference Include="System.Xml.Linq" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<Compile Include="AppSettings.cs" />
|
|
<Compile Include="ArchiveScanner.cs" />
|
|
<Compile Include="EmailAddressBuilder.cs" />
|
|
<Compile Include="FilenameParser.cs" />
|
|
<Compile Include="MailTemplateDefinition.cs" />
|
|
<Compile Include="SendJob.cs" />
|
|
<Compile Include="SendLogStore.cs" />
|
|
<Compile Include="TemplateEngine.cs" />
|
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<EmbeddedResource Include="config.default.json" />
|
|
</ItemGroup>
|
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
</Project>
|