Removed the IServiceCollection dependency and related code from MessagingServiceApplicationConfiguration.cs. This includes the private property `Services`, the boolean field `_luckyPennySoftLicenseKeyAdded`, and the constructor that initialized `Services`. The `EnsureConfigured` method remains, but its functionality may be impacted by these changes.
Removed `AddMessagingServiceApplication` method from `DependencyInjection` class, simplifying service configuration. Updated namespaces from `DigitalData.MessagingService.Infrastructure` to `DigitalData.MessagingService.Infrastructure.DependencyInjection` for better organization. Adjusted `Program.cs` to use a lambda for setting `LuckyPennySoftLicenseKey`. Updated `using` directives in `EmailSyncWorker.cs` and `Program.cs` to reflect these changes.
Refactored `MessagingServiceApplicationConfiguration` to simplify the tracking of the LuckyPennySoft license key configuration by replacing the `_configured` tuple with a boolean. Removed email account configuration methods from this class.
Updated `MessagingServiceInfrastructureConfiguration` to introduce a new `_configured` tuple for tracking `RabbitMqConnectionFactory` and `EmailAccounts` configurations. Added methods for configuring email accounts and updated the `EnsureRabbitMqConnectionFactoryAdded` method to include email account checks.
Changed the namespace of `EmailAccountsOptions.cs` to `DigitalData.MessagingService.Infrastructure.Options`.
Modified `Program.cs` to include email account configuration in the infrastructure setup.
Added new files `DependencyInjectionExtensions.cs` and `MessagingServiceConfiguration.cs` as placeholders for future extensions, wrapped in `#if NET` directives.
Removed an `<ItemGroup>` from `DigitalData.MessagingService.Infrastructure.csproj` and updated `DigitalData.MessagingService.Client.csproj` for XML compliance.
Replace the implicit IConfiguration-based DI registration with an explicit
builder that validates required steps at startup.
- Add MessagingServiceApplicationConfiguration with mandatory steps:
SetLuckyPennySoftLicenseKey(), ConfigureEmailAccounts() / PublishOnly()
- EnsureConfigured() throws at registration time if either step is missing,
surfacing misconfiguration before the app starts
- Keep the IConfiguration convenience overload as a thin wrapper over the
builder for backward-compatible call sites
- Move DependencyInjection.cs into a DependencyInjection/ subfolder alongside
the new configuration class