MailUtils wird noch von DakotaSender verwendet

This commit is contained in:
2026-07-06 14:48:54 +02:00
parent 6b74186cac
commit 0b281b5290
15 changed files with 46 additions and 21 deletions

View File

@@ -57,6 +57,10 @@
<None Include="App.config" /> <None Include="App.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Server\Components\ServerUtils\ServerUtils.csproj">
<Project>{EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}</Project>
<Name>ServerUtils</Name>
</ProjectReference>
<ProjectReference Include="..\Shared\Shared.csproj"> <ProjectReference Include="..\Shared\Shared.csproj">
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project> <Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
<Name>Shared</Name> <Name>Shared</Name>

View File

@@ -1,4 +1,5 @@
using BS.Shared; using BeWo.ServerUtils.Core;
using BS.Shared;
using BS.Shared.AppSender; using BS.Shared.AppSender;
using BS.Shared.Core; using BS.Shared.Core;
using BS.Shared.DataContracts; using BS.Shared.DataContracts;

View File

@@ -65,6 +65,10 @@
<Project>{47331732-DD96-4075-869F-83AA9F3F9937}</Project> <Project>{47331732-DD96-4075-869F-83AA9F3F9937}</Project>
<Name>Dakota</Name> <Name>Dakota</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Server\Components\ServerUtils\ServerUtils.csproj">
<Project>{EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}</Project>
<Name>ServerUtils</Name>
</ProjectReference>
<ProjectReference Include="..\Service\Service.csproj"> <ProjectReference Include="..\Service\Service.csproj">
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project> <Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
<Name>Service</Name> <Name>Service</Name>

View File

@@ -1,4 +1,5 @@
using BS.Shared.Core; using BeWo.ServerUtils.Core;
using BS.Shared.Core;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace DakotaUnitTest namespace DakotaUnitTest
@@ -16,16 +17,5 @@ namespace DakotaUnitTest
Assert.IsTrue(success); Assert.IsTrue(success);
} }
[TestMethod]
public void SendGkvViaSupportMail()
{
var title = "UnitTest - TITLE - ViaSupport";
var body = "UnitTest - BODY - ViaSupport";
var success = MailUtils.SendGkvModuleTestErrorMail(title, body, "UnitTest - ViaSupport");
Assert.IsTrue(success);
}
} }
} }

View File

@@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace BeWo.Service.Core namespace BeWo.ServerUtils.Core
{ {
internal struct Module internal struct Module
{ {

View File

@@ -1,5 +1,4 @@
using BS.Shared.AppSender; using BS.Shared.AppSender;
using DevExpress.Mvvm.Native;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration; using System.Configuration;
@@ -10,8 +9,9 @@ using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using BS.Shared.Core; using BS.Shared.Core;
using BS.Shared.Extensions;
namespace BeWo.Service.Core namespace BeWo.ServerUtils.Core
{ {
public static class MailUtils public static class MailUtils
{ {

View File

@@ -89,7 +89,9 @@
<ItemGroup> <ItemGroup>
<Compile Include="ApiFacade\HttpClientFacade.cs" /> <Compile Include="ApiFacade\HttpClientFacade.cs" />
<Compile Include="ApiFacade\JsonHttpClientFacade.cs" /> <Compile Include="ApiFacade\JsonHttpClientFacade.cs" />
<Compile Include="Core\AppSettingReader.cs" />
<Compile Include="Core\LoggerUtils.cs" /> <Compile Include="Core\LoggerUtils.cs" />
<Compile Include="Core\MailUtils.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -16,6 +16,7 @@ using System.Xml;
using BeWo.Data; using BeWo.Data;
using BeWo.Data.Entities; using BeWo.Data.Entities;
using BeWo.Data.Security; using BeWo.Data.Security;
using BeWo.ServerUtils.Core;
using BS.Shared; using BS.Shared;
using BS.Shared.Core; using BS.Shared.Core;
using BS.Shared.Extensions; using BS.Shared.Extensions;

View File

@@ -12,7 +12,6 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using AICore.Prompt.SystemPrompts; using AICore.Prompt.SystemPrompts;
using BeWo.Service.Core;
using DevExpress.XtraCharts.Native; using DevExpress.XtraCharts.Native;
using System.IO; using System.IO;
using BS.Shared.Interface; using BS.Shared.Interface;

View File

@@ -233,12 +233,10 @@
<Compile Include="BusinessLogic\AiPromptbausteinPromptLogic.cs" /> <Compile Include="BusinessLogic\AiPromptbausteinPromptLogic.cs" />
<Compile Include="BusinessLogic\AiPromptbausteinRoutineLogic.cs" /> <Compile Include="BusinessLogic\AiPromptbausteinRoutineLogic.cs" />
<Compile Include="BusinessLogic\GenericBusinessLogic.cs" /> <Compile Include="BusinessLogic\GenericBusinessLogic.cs" />
<Compile Include="Core\AppSettingReader.cs" />
<Compile Include="Core\ConfigReader.cs" /> <Compile Include="Core\ConfigReader.cs" />
<Compile Include="Core\DiamantExporter.cs" /> <Compile Include="Core\DiamantExporter.cs" />
<Compile Include="Core\ExcelDownload.cs" /> <Compile Include="Core\ExcelDownload.cs" />
<Compile Include="Core\FileAttachmentUtils.cs" /> <Compile Include="Core\FileAttachmentUtils.cs" />
<Compile Include="Core\MailUtils.cs" />
<Compile Include="Core\MergedConfig.cs" /> <Compile Include="Core\MergedConfig.cs" />
<Compile Include="Core\BeWoServerPathHelper.cs" /> <Compile Include="Core\BeWoServerPathHelper.cs" />
<Compile Include="Core\ServiceLogger.cs" /> <Compile Include="Core\ServiceLogger.cs" />

View File

@@ -1,6 +1,5 @@
using BeWo.Data.Access; using BeWo.Data.Access;
using BeWo.ServerUtils.Core; using BeWo.ServerUtils.Core;
using BeWo.Service.Core;
using BS.Shared.Core; using BS.Shared.Core;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

View File

@@ -1,5 +1,4 @@
using BeWo.ServerUtils.Core; using BeWo.ServerUtils.Core;
using BeWo.Service.Core;
using BS.Shared.Core; using BS.Shared.Core;
using DevExpress.CodeParser.Diagnostics; using DevExpress.CodeParser.Diagnostics;
using log4net; using log4net;

View File

@@ -2,6 +2,7 @@
using BeWo.Data.Access; using BeWo.Data.Access;
using BeWo.Data.Entities; using BeWo.Data.Entities;
using BeWo.Data.Entities.Light; using BeWo.Data.Entities.Light;
using BeWo.ServerUtils.Core;
using BeWo.Service.Core; using BeWo.Service.Core;
using BeWo.Service.DCEntityMapper; using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins; using BeWo.Service.Plugins;

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Extensions
{
public static class DictionaryExtensions
{
public static T2 GetValueOrDefault<T1, T2>(this Dictionary<T1, T2> dictionary, T1 key, T2 t_default)
{
if (dictionary is null || !dictionary.Any())
return t_default;
if (dictionary.TryGetValue(key, out var val))
{
return val;
}
return t_default;
}
}
}

View File

@@ -425,6 +425,7 @@
<Compile Include="Extensions\ApiResponseExtension.cs" /> <Compile Include="Extensions\ApiResponseExtension.cs" />
<Compile Include="Extensions\BoolExtensions.cs" /> <Compile Include="Extensions\BoolExtensions.cs" />
<Compile Include="Extensions\ContactExtensions.cs" /> <Compile Include="Extensions\ContactExtensions.cs" />
<Compile Include="Extensions\DictionaryExtensions.cs" />
<Compile Include="Extensions\EnumExtensions.cs" /> <Compile Include="Extensions\EnumExtensions.cs" />
<Compile Include="Extensions\GkvAbrechnungExtensions.cs" /> <Compile Include="Extensions\GkvAbrechnungExtensions.cs" />
<Compile Include="Extensions\GridExtensions.cs" /> <Compile Include="Extensions\GridExtensions.cs" />