MailUtils wird noch von DakotaSender verwendet
This commit is contained in:
@@ -57,6 +57,10 @@
|
||||
<None Include="App.config" />
|
||||
</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">
|
||||
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
|
||||
<Name>Shared</Name>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BS.Shared;
|
||||
using BeWo.ServerUtils.Core;
|
||||
using BS.Shared;
|
||||
using BS.Shared.AppSender;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
@@ -65,6 +65,10 @@
|
||||
<Project>{47331732-DD96-4075-869F-83AA9F3F9937}</Project>
|
||||
<Name>Dakota</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Server\Components\ServerUtils\ServerUtils.csproj">
|
||||
<Project>{EC2349FB-7FE0-4AD1-B28B-A7A27AF80A57}</Project>
|
||||
<Name>ServerUtils</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Service\Service.csproj">
|
||||
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
|
||||
<Name>Service</Name>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BS.Shared.Core;
|
||||
using BeWo.ServerUtils.Core;
|
||||
using BS.Shared.Core;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace DakotaUnitTest
|
||||
@@ -16,16 +17,5 @@ namespace DakotaUnitTest
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.Service.Core
|
||||
namespace BeWo.ServerUtils.Core
|
||||
{
|
||||
internal struct Module
|
||||
{
|
||||
@@ -1,5 +1,4 @@
|
||||
using BS.Shared.AppSender;
|
||||
using DevExpress.Mvvm.Native;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
@@ -10,8 +9,9 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace BeWo.Service.Core
|
||||
namespace BeWo.ServerUtils.Core
|
||||
{
|
||||
public static class MailUtils
|
||||
{
|
||||
@@ -89,7 +89,9 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="ApiFacade\HttpClientFacade.cs" />
|
||||
<Compile Include="ApiFacade\JsonHttpClientFacade.cs" />
|
||||
<Compile Include="Core\AppSettingReader.cs" />
|
||||
<Compile Include="Core\LoggerUtils.cs" />
|
||||
<Compile Include="Core\MailUtils.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -16,6 +16,7 @@ using System.Xml;
|
||||
using BeWo.Data;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Data.Security;
|
||||
using BeWo.ServerUtils.Core;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
@@ -12,7 +12,6 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AICore.Prompt.SystemPrompts;
|
||||
using BeWo.Service.Core;
|
||||
using DevExpress.XtraCharts.Native;
|
||||
using System.IO;
|
||||
using BS.Shared.Interface;
|
||||
|
||||
@@ -233,12 +233,10 @@
|
||||
<Compile Include="BusinessLogic\AiPromptbausteinPromptLogic.cs" />
|
||||
<Compile Include="BusinessLogic\AiPromptbausteinRoutineLogic.cs" />
|
||||
<Compile Include="BusinessLogic\GenericBusinessLogic.cs" />
|
||||
<Compile Include="Core\AppSettingReader.cs" />
|
||||
<Compile Include="Core\ConfigReader.cs" />
|
||||
<Compile Include="Core\DiamantExporter.cs" />
|
||||
<Compile Include="Core\ExcelDownload.cs" />
|
||||
<Compile Include="Core\FileAttachmentUtils.cs" />
|
||||
<Compile Include="Core\MailUtils.cs" />
|
||||
<Compile Include="Core\MergedConfig.cs" />
|
||||
<Compile Include="Core\BeWoServerPathHelper.cs" />
|
||||
<Compile Include="Core\ServiceLogger.cs" />
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.ServerUtils.Core;
|
||||
using BeWo.Service.Core;
|
||||
using BS.Shared.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using BeWo.ServerUtils.Core;
|
||||
using BeWo.Service.Core;
|
||||
using BS.Shared.Core;
|
||||
using DevExpress.CodeParser.Diagnostics;
|
||||
using log4net;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Data.Entities.Light;
|
||||
using BeWo.ServerUtils.Core;
|
||||
using BeWo.Service.Core;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Plugins;
|
||||
|
||||
26
Shared/Extensions/DictionaryExtensions.cs
Normal file
26
Shared/Extensions/DictionaryExtensions.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -425,6 +425,7 @@
|
||||
<Compile Include="Extensions\ApiResponseExtension.cs" />
|
||||
<Compile Include="Extensions\BoolExtensions.cs" />
|
||||
<Compile Include="Extensions\ContactExtensions.cs" />
|
||||
<Compile Include="Extensions\DictionaryExtensions.cs" />
|
||||
<Compile Include="Extensions\EnumExtensions.cs" />
|
||||
<Compile Include="Extensions\GkvAbrechnungExtensions.cs" />
|
||||
<Compile Include="Extensions\GridExtensions.cs" />
|
||||
|
||||
Reference in New Issue
Block a user