diff --git a/.gitignore b/.gitignore index 79ecaa70..76a0e00f 100644 --- a/.gitignore +++ b/.gitignore @@ -363,3 +363,5 @@ MigrationBackup/ FodyWeavers.xsd /EnvelopeGenerator.Web/.config/dotnet-tools.json /EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-ui/.vscode +/EnvelopeGenerator.Tests.Application/Services/BugFixTests.cs +/EnvelopeGenerator.Tests.Application/annotations.json diff --git a/EnvelopeGenerator.Application/DTOs/DocumentStatusDto.cs b/EnvelopeGenerator.Application/DTOs/DocumentStatusDto.cs index 2decac1f..b24724ef 100644 --- a/EnvelopeGenerator.Application/DTOs/DocumentStatusDto.cs +++ b/EnvelopeGenerator.Application/DTOs/DocumentStatusDto.cs @@ -8,7 +8,9 @@ namespace EnvelopeGenerator.Application.DTOs int ReceiverId, int Status, DateTime? StatusChangedWhen, - string Value, DateTime AddedWhen, - DateTime? ChangedWhen) : IUnique; + DateTime? ChangedWhen) : IUnique + { + public string? Value { get; set; } + }; } \ No newline at end of file diff --git a/EnvelopeGenerator.BBTests/EnvelopeGenerator.BBTests.vbproj b/EnvelopeGenerator.BBTests/EnvelopeGenerator.BBTests.vbproj index 6fabe974..4ae50c41 100644 --- a/EnvelopeGenerator.BBTests/EnvelopeGenerator.BBTests.vbproj +++ b/EnvelopeGenerator.BBTests/EnvelopeGenerator.BBTests.vbproj @@ -64,6 +64,9 @@ + + ..\packages\DigitalData.Controls.DocumentViewer.1.9.8\lib\net462\DigitalData.Controls.DocumentViewer.dll + ..\packages\DigitalData.Modules.Base.1.3.8\lib\net462\DigitalData.Modules.Base.dll @@ -167,8 +170,11 @@ ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll True - - ..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + ..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\Microsoft.Bcl.Cryptography.9.0.0\lib\net462\Microsoft.Bcl.Cryptography.dll ..\packages\Microsoft.Identity.Client.4.55.0\lib\net461\Microsoft.Identity.Client.dll @@ -216,11 +222,17 @@ ..\packages\System.Data.Odbc.6.0.1\lib\net461\System.Data.Odbc.dll + + ..\packages\System.Formats.Asn1.9.0.0\lib\net462\System.Formats.Asn1.dll + ..\packages\System.IO.Packaging.9.0.0\lib\net462\System.IO.Packaging.dll + + ..\packages\System.IO.Pipelines.9.0.0\lib\net462\System.IO.Pipelines.dll + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll @@ -237,14 +249,14 @@ ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Security.Cryptography.Pkcs.8.0.1\lib\net462\System.Security.Cryptography.Pkcs.dll + + ..\packages\System.Security.Cryptography.Pkcs.9.0.0\lib\net462\System.Security.Cryptography.Pkcs.dll - - ..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll + + ..\packages\System.Text.Encodings.Web.9.0.0\lib\net462\System.Text.Encodings.Web.dll - - ..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll + + ..\packages\System.Text.Json.9.0.0\lib\net462\System.Text.Json.dll ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll @@ -343,6 +355,26 @@ EnvelopeGenerator.Common + + + + + + + + + + + + + + + + + + + + diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.ML.64.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.ML.64.dll new file mode 100644 index 00000000..2ad8950c Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.ML.64.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.ML.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.ML.dll new file mode 100644 index 00000000..387246a4 Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.ML.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.Rendering.Skia.64.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.Rendering.Skia.64.dll new file mode 100644 index 00000000..b9ba4a30 Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.Rendering.Skia.64.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.Rendering.Skia.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.Rendering.Skia.dll new file mode 100644 index 00000000..8f60b410 Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.Imaging.Rendering.Skia.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.1d.reader.64.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.1d.reader.64.dll new file mode 100644 index 00000000..a96a316f Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.1d.reader.64.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.1d.reader.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.1d.reader.dll new file mode 100644 index 00000000..6d24c8ba Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.1d.reader.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.2d.reader.64.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.2d.reader.64.dll new file mode 100644 index 00000000..2287de56 Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.2d.reader.64.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.2d.reader.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.2d.reader.dll new file mode 100644 index 00000000..4984254f Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.barcode.2d.reader.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.filters.64.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.filters.64.dll new file mode 100644 index 00000000..0f3e3675 Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.filters.64.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.filters.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.filters.dll new file mode 100644 index 00000000..938c3f3d Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.filters.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.image.gdimgplug.64.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.image.gdimgplug.64.dll new file mode 100644 index 00000000..80b0cf96 Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.image.gdimgplug.64.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.image.gdimgplug.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.image.gdimgplug.dll new file mode 100644 index 00000000..88eeff83 Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.image.gdimgplug.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.machine.vision.64.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.machine.vision.64.dll new file mode 100644 index 00000000..af684acc Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.machine.vision.64.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.machine.vision.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.machine.vision.dll new file mode 100644 index 00000000..da04adba Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.machine.vision.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.twain.client.64.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.twain.client.64.dll new file mode 100644 index 00000000..045fdd35 Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.twain.client.64.dll differ diff --git a/EnvelopeGenerator.BBTests/GdPicture.NET.14.twain.client.dll b/EnvelopeGenerator.BBTests/GdPicture.NET.14.twain.client.dll new file mode 100644 index 00000000..51d630b4 Binary files /dev/null and b/EnvelopeGenerator.BBTests/GdPicture.NET.14.twain.client.dll differ diff --git a/EnvelopeGenerator.BBTests/MailLicense.xml b/EnvelopeGenerator.BBTests/MailLicense.xml new file mode 100644 index 00000000..05105264 --- /dev/null +++ b/EnvelopeGenerator.BBTests/MailLicense.xml @@ -0,0 +1,23 @@ + + + 4dc5ef40-f1a9-468b-994c-b7ed600ad878 + Mail.dll + 2022-07-29 + Digital Data GmbH + single developer + Digital Data GmbH + + + + + + + + + + 75MRtl4ipYelIZYlpT8O7QDX9Zc= + + + Raxfkz6DfQVs/sMvH+F2nH0eHXD8FoUFSdP3t7AgBUdpABJQx86srlyuMSEhXPlc1THCqPouEVob4RsWnd9OXvTiPPSOUSK9zuNG6uz93KLAhpSD5PraAgBCF4jwZArlAp7aCNfZpHqQ3w6TRHS+CfravUU0AHHG3MZ1ZcRkGuo= + + \ No newline at end of file diff --git a/EnvelopeGenerator.BBTests/README.txt b/EnvelopeGenerator.BBTests/README.txt new file mode 100644 index 00000000..58cbced4 --- /dev/null +++ b/EnvelopeGenerator.BBTests/README.txt @@ -0,0 +1,5 @@ +BASE MODULE +=========== + +This module is intended for often used constants and datastructures. +Therefor it is important that this module does not have any dependencies on other modules!! \ No newline at end of file diff --git a/EnvelopeGenerator.BBTests/app.config b/EnvelopeGenerator.BBTests/app.config index 388a7b10..8ee6159c 100644 --- a/EnvelopeGenerator.BBTests/app.config +++ b/EnvelopeGenerator.BBTests/app.config @@ -85,7 +85,7 @@ - + @@ -93,7 +93,7 @@ - + diff --git a/EnvelopeGenerator.BBTests/packages.config b/EnvelopeGenerator.BBTests/packages.config index b52ef3b1..82d7bfd4 100644 --- a/EnvelopeGenerator.BBTests/packages.config +++ b/EnvelopeGenerator.BBTests/packages.config @@ -1,6 +1,7 @@  + @@ -15,7 +16,8 @@ - + + @@ -32,14 +34,16 @@ + - + + - - - + + + \ No newline at end of file diff --git a/EnvelopeGenerator.Infrastructure/DIExtensions.cs b/EnvelopeGenerator.Infrastructure/DIExtensions.cs index 36012791..0f6b7485 100644 --- a/EnvelopeGenerator.Infrastructure/DIExtensions.cs +++ b/EnvelopeGenerator.Infrastructure/DIExtensions.cs @@ -1,16 +1,32 @@ using EnvelopeGenerator.Application.Contracts.Repositories; -using EnvelopeGenerator.Application.Extensions; using EnvelopeGenerator.Infrastructure.Repositories; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using Microsoft.Extensions.Configuration; +using Microsoft.EntityFrameworkCore; namespace EnvelopeGenerator.Infrastructure; public static class DIExtensions { - public static IServiceCollection AddEnvelopeGeneratorRepositories(this IServiceCollection services) + /// + /// Registers the required repositories for the Envelope Generator service to the given . + /// This method adds the repositories for various envelope-related entities, such as configuration, document receivers, envelopes, and users, + /// as scoped services to the dependency injection container. Optionally, it can also configure the + /// with the provided database context options if specified. + /// + /// The to which the services are added. + /// An optional action to configure the for the . + /// If not provided, the will not be configured. + /// The updated with the added repository services. + /// + /// This method ensures that the repositories are registered as scoped services, meaning that a new instance of each repository + /// will be created per HTTP request (or per scope) within the dependency injection container. + /// + public static IServiceCollection AddEnvelopeGeneratorRepositories(this IServiceCollection services, Action? dbContextOptions = null) { + if(dbContextOptions is not null) + services.AddDbContext(dbContextOptions); + services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); @@ -30,8 +46,4 @@ public static class DIExtensions return services; } - - public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration configuration) => services - .AddEnvelopeGeneratorRepositories() - .AddEnvelopeGeneratorServices(configuration); } diff --git a/EnvelopeGenerator.Service/Service.vb b/EnvelopeGenerator.Service/Service.vb index 4989049c..c5424899 100644 --- a/EnvelopeGenerator.Service/Service.vb +++ b/EnvelopeGenerator.Service/Service.vb @@ -1,12 +1,7 @@ -Imports System.Timers -Imports System.IO -Imports System.ComponentModel -Imports DigitalData.Modules.Base +Imports System.IO Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Database -Imports DigitalData.Modules.Messaging Imports DigitalData.Modules.Config -Imports GdPicture.Internal.WPF Public Class Service Private Logger As Logger diff --git a/EnvelopeGenerator.Tests.Application/EnvelopeGenerator.Tests.Application.csproj b/EnvelopeGenerator.Tests.Application/EnvelopeGenerator.Tests.Application.csproj new file mode 100644 index 00000000..b9626bf8 --- /dev/null +++ b/EnvelopeGenerator.Tests.Application/EnvelopeGenerator.Tests.Application.csproj @@ -0,0 +1,52 @@ + + + + net7.0 + enable + enable + + false + true + + + + + + + + + PreserveNewest + true + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + diff --git a/EnvelopeGenerator.Tests.Application/Mock.cs b/EnvelopeGenerator.Tests.Application/Mock.cs new file mode 100644 index 00000000..a9cc42d6 --- /dev/null +++ b/EnvelopeGenerator.Tests.Application/Mock.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.Hosting; +using EnvelopeGenerator.Application.Extensions; +using EnvelopeGenerator.Infrastructure; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using EnvelopeGenerator.Application.Services; +using Microsoft.EntityFrameworkCore; + +namespace EnvelopeGenerator.Tests.Application; + +public class Mock +{ + public static IHost CreateHost(Action? builderOptions = null, string configPath = "appsettings.json", bool useRealDb = false, params string[] args) + { + var builder = Host.CreateApplicationBuilder(args.Any() ? args : null); + var config = builder.Configuration; + builder.Configuration.AddJsonFile(configPath, optional: true, reloadOnChange: true); + + builder.Services + .AddEnvelopeGeneratorRepositories(opt => + { + if (useRealDb) + { + var connStr = config.GetConnectionString("Default") + ?? throw new InvalidOperationException("There is no default connection string in appsettings.json."); + opt.UseSqlServer(connStr); + } + else + opt.UseInMemoryDatabase("MockDB"); + }) + .AddEnvelopeGeneratorServices(builder.Configuration) + .AddScoped(); + + builderOptions?.Invoke(builder); + + var host = builder.Build(); + + return host; + } +} diff --git a/EnvelopeGenerator.Tests.Application/Services/DocumentStatusServiceTests.cs b/EnvelopeGenerator.Tests.Application/Services/DocumentStatusServiceTests.cs new file mode 100644 index 00000000..275a11e3 --- /dev/null +++ b/EnvelopeGenerator.Tests.Application/Services/DocumentStatusServiceTests.cs @@ -0,0 +1,22 @@ +using Microsoft.Extensions.Hosting; + +namespace EnvelopeGenerator.Tests.Application.Services; + +[TestFixture] +public class DocumentStatusServiceTests +{ + private IHost _host; + + [SetUp] + public void SetUp() + { + _host = Mock.CreateHost(useRealDb: true); + } + + [TearDown] + public void TearDown() + { + _host.StopAsync(); + _host.Dispose(); + } +} diff --git a/EnvelopeGenerator.Tests.Application/appsettings.json b/EnvelopeGenerator.Tests.Application/appsettings.json new file mode 100644 index 00000000..136c48a8 --- /dev/null +++ b/EnvelopeGenerator.Tests.Application/appsettings.json @@ -0,0 +1,208 @@ +{ + "DiPMode": false, //Please be careful when enabling Development in Production (DiP) mode. It allows Swagger and test controllers to be enabled in a production environment. + "EnableSwagger": true, + "EnableTestControllers": true, + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Warning", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information", + "Microsoft.AspNetCore.Hosting.Diagnostics": "Warning" + } + }, + "ConnectionStrings": { + "Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;" + }, + "PSPDFKitLicenseKey": "SXCtGGY9XA-31OGUXQK-r7c6AkdLGPm2ljuyDr1qu0kkhLvydg-Do-fxpNUF4Rq3fS_xAnZRNFRHbXpE6sQ2BMcCSVTcXVJO6tPviexjpiT-HnrDEySlUERJnnvh-tmeOWprxS6BySPnSILkmaVQtUfOIUS-cUbvvEYHTvQBKbSF8di4XHQFyfv49ihr51axm3NVV3AXwh2EiKL5C5XdqBZ4sQ4O7vXBjM2zvxdPxlxdcNYmiU83uAzw7B83O_jubPzya4CdUHh_YH7Nlp2gP56MeG1Sw2JhMtfG3Rj14Sg4ctaeL9p6AEWca5dDjJ2li5tFIV2fQSsw6A_cowLu0gtMm5i8IfJXeIcQbMC2-0wGv1oe9hZYJvFMdzhTM_FiejM0agemxt3lJyzuyP8zbBSOgp7Si6A85krLWPZptyZBTG7pp7IHboUHfPMxCXqi-zMsqewOJtQBE2mjntU-lPryKnssOpMPfswwQX7QSkJYV5EMqNmEhQX6mEkp2wcqFzMC7bJQew1aO4pOpvChUaMvb1vgRek0HxLag0nwQYX2YrYGh7F_xXJs-8HNwJe8H0-eW4x4faayCgM5rB5772CCCsD9ThZcvXFrjNHHLGJ8WuBUFm6LArvSfFQdii_7j-_sqHMpeKZt26NFgivj1A==", + "Content-Security-Policy": [ // The first format parameter {0} will be replaced by the nonce value. + "default-src 'self'", + "script-src 'self' 'nonce-{0}' 'unsafe-eval'", + "style-src 'self' 'unsafe-inline' https://fonts.googleapis.com:*", + "img-src 'self' data: https: blob:", + "font-src 'self' https://fonts.gstatic.com:*", + "connect-src 'self' https://nominatim.openstreetmap.org:* http://localhost:* https://localhost:* ws://localhost:* wss://localhost:* blob:", + "frame-src 'self'", + "media-src 'self'", + "object-src 'self'" + ], + "AllowedOrigins": [ "https://localhost:7202", "https://digitale.unterschrift.wisag.de/" ], + "NLog": { + "throwConfigExceptions": true, + "variables": { + "logDirectory": "E:\\LogFiles\\Digital Data\\signFlow", + "logFileNamePrefix": "${shortdate}-ECM.EnvelopeGenerator.Web" + }, + "targets": { + "infoLogs": { + "type": "File", + "fileName": "${logDirectory}\\${logFileNamePrefix}-Info.log", + "maxArchiveDays": 30 + }, + "errorLogs": { + "type": "File", + "fileName": "${logDirectory}\\${logFileNamePrefix}-Error.log", + "maxArchiveDays": 30 + }, + "criticalLogs": { + "type": "File", + "fileName": "${logDirectory}\\${logFileNamePrefix}-Critical.log", + "maxArchiveDays": 30 + } + }, + // Trace, Debug, Info, Warn, Error and *Fatal* + "rules": [ + { + "logger": "*", + "minLevel": "Info", + "maxLevel": "Warn", + "writeTo": "infoLogs" + }, + { + "logger": "*", + "level": "Error", + "writeTo": "errorLogs" + }, + { + "logger": "*", + "level": "Fatal", + "writeTo": "criticalLogs" + } + ] + }, + "ContactLink": { + "Label": "Kontakt", + "Href": "https://digitaldata.works/", + "HrefLang": "de", + "Target": "_blank", + "Title": "Digital Data GmbH" + }, + /* Resx naming format is -> Resource.language.resx (eg: Resource.de_DE.resx). + To add a new language, first you should write the required resx file. + first is the default culture name. */ + "Cultures": [ + { + "Language": "de-DE", + "FIClass": "fi-de" + }, + { + "Language": "en-US", + "FIClass": "fi-us" + } + ], + "DisableMultiLanguage": false, + "Regexes": [ + { + "Pattern": "/^\\p{L}+(?:([\\ \\-\\']|(\\.\\ ))\\p{L}+)*$/u", + "Name": "City", + "Platforms": [ ".NET" ] + }, + { + "Pattern": "/^[a-zA-Z\\u0080-\\u024F]+(?:([\\ \\-\\']|(\\.\\ ))[a-zA-Z\\u0080-\\u024F]+)*$/", + "Name": "City", + "Platforms": [ "javascript" ] + } + ], + "CustomImages": { + "App": { + "Src": "/img/DD_signFLOW_LOGO.png", + "Classes": { + "Main": "signFlow-logo" + } + }, + "Company": { + "Src": "/img/digital_data.svg", + "Classes": { + "Show": "dd-show-logo", + "Locked": "dd-locked-logo" + } + } + }, + "DispatcherParams": { + "SendingProfile": 1, + "AddedWho": "DDEnvelopGenerator", + "ReminderTypeId": 202377, + "EmailAttmt1": "" + }, + "MailParams": { + "Placeholders": { + "[NAME_PORTAL]": "signFlow", + "[SIGNATURE_TYPE]": "signieren", + "[REASON]": "" + } + }, + "GtxMessagingParams": { + "Uri": "https://rest.gtx-messaging.net", + "Path": "smsc/sendsms/f566f7e5-bdf2-4a9a-bf52-ed88215a432e/json", + "Headers": {}, + "QueryParams": { + "from": "signFlow" + } + }, + "TFARegParams": { + "TimeLimit": "00:30:00" + }, + "DbTriggerParams": { + "Envelope": [ "TBSIG_ENVELOPE_HISTORY_AFT_INS" ], + "EnvelopeHistory": [ "TBSIG_ENVELOPE_HISTORY_AFT_INS" ], + "EmailOut": [ "TBEMLP_EMAIL_OUT_AFT_INS", "TBEMLP_EMAIL_OUT_AFT_UPD" ], + "EnvelopeReceiverReadOnly": [ "TBSIG_ENVELOPE_RECEIVER_READ_ONLY_UPD" ], + "Receiver": [] + }, + "MainPageTitle": null, + "AnnotationParams": { + "DefaultAnnotation": { + "Width": 1, + "Height": 0.5, + "MarginTop": 1 + }, + "Annotations": [ + { + "Name": "Signature", + "MarginTop": 0 + }, + { + "Name": "PositionLabel", + "VerBoundAnnotName": "Signature", + "WidthRatio": 1.2, + "HeightRatio": 0.5, + "MarginTopRatio": 0.22 + }, + { + "Name": "Position", + "VerBoundAnnotName": "PositionLabel", + "WidthRatio": 1.2, + "HeightRatio": 0.5, + "MarginTopRatio": -0.05 + }, + { + "Name": "CityLabel", + "VerBoundAnnotName": "Position", + "WidthRatio": 1.2, + "HeightRatio": 0.5, + "MarginTopRatio": 0.05 + }, + { + "Name": "City", + "VerBoundAnnotName": "CityLabel", + "WidthRatio": 1.2, + "HeightRatio": 0.5, + "MarginTopRatio": -0.05 + }, + { + "Name": "DateLabel", + "VerBoundAnnotName": "City", + "WidthRatio": 1.55, + "HeightRatio": 0.5, + "MarginTopRatio": 0.05 + }, + { + "Name": "Date", + "VerBoundAnnotName": "DateLabel", + "WidthRatio": 1.55, + "HeightRatio": 0.5, + "MarginTopRatio": -0.1 + } + ] + } +} diff --git a/EnvelopeGenerator.Web/EnvelopeGenerator.Web.csproj b/EnvelopeGenerator.Web/EnvelopeGenerator.Web.csproj index c7c21f1c..4afba015 100644 --- a/EnvelopeGenerator.Web/EnvelopeGenerator.Web.csproj +++ b/EnvelopeGenerator.Web/EnvelopeGenerator.Web.csproj @@ -5,7 +5,7 @@ enable enable EnvelopeGenerator.Web - 3.1.0 + 3.1.1 Digital Data GmbH Digital Data GmbH EnvelopeGenerator.Web @@ -13,8 +13,8 @@ digital data envelope generator web EnvelopeGenerator.Web is an ASP.NET MVC application developed to manage signing processes. It uses Entity Framework Core (EF Core) for database operations. The user interface for signing processes is developed with Razor View Engine (.cshtml files) and JavaScript under wwwroot, integrated with PSPDFKit. This integration allows users to view and sign documents seamlessly. Assets\icon.ico - 3.1.0 - 3.1.0 + 3.1.1 + 3.1.1 Copyright © 2025 Digital Data GmbH. All rights reserved. @@ -2104,6 +2104,9 @@ + + + @@ -2142,18 +2145,6 @@ D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Data.v21.2.dll - - ..\..\2_DLL Projekte\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll - - - ..\..\2_DLL Projekte\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll - - - ..\..\2_DLL Projekte\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll - - - ..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll - D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll diff --git a/EnvelopeGenerator.Web/Program.cs b/EnvelopeGenerator.Web/Program.cs index a9545764..96fcec96 100644 --- a/EnvelopeGenerator.Web/Program.cs +++ b/EnvelopeGenerator.Web/Program.cs @@ -15,6 +15,7 @@ using DigitalData.EmailProfilerDispatcher; using EnvelopeGenerator.Infrastructure; using EnvelopeGenerator.Web.Sanitizers; using EnvelopeGenerator.Application.Contracts.Services; +using EnvelopeGenerator.Application.Extensions; var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger(); logger.Info("Logging initialized!"); @@ -80,7 +81,7 @@ try //AddEF Core dbcontext var connStr = config.GetConnectionString(Key.Default) ?? throw new InvalidOperationException("There is no default connection string in appsettings.json."); - builder.Services.AddDbContext(options => options.UseSqlServer(connStr)); + builder.Services.AddDistributedSqlServerCache(options => { options.ConnectionString = connStr; @@ -89,7 +90,9 @@ try }); // Add envelope generator services - builder.Services.AddEnvelopeGenerator(config); + builder.Services.AddEnvelopeGeneratorRepositories(options => options.UseSqlServer(connStr)); + + builder.Services.AddEnvelopeGeneratorServices(config); builder.Services.Configure(options => { diff --git a/EnvelopeGenerator.sln b/EnvelopeGenerator.sln index 35649a69..0275e352 100644 --- a/EnvelopeGenerator.sln +++ b/EnvelopeGenerator.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.33516.290 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EnvelopeGenerator.Test", "EnvelopeGenerator.Test\EnvelopeGenerator.Test.vbproj", "{089D5634-FB6B-42D0-B912-7AA7457044E7}" +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EnvelopeGenerator.BBTests", "EnvelopeGenerator.BBTests\EnvelopeGenerator.BBTests.vbproj", "{089D5634-FB6B-42D0-B912-7AA7457044E7}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EnvelopeGenerator.Form", "EnvelopeGenerator.Form\EnvelopeGenerator.Form.vbproj", "{6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}" EndProject @@ -13,8 +13,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.Web", "En EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EnvelopeGenerator.Service", "EnvelopeGenerator.Service\EnvelopeGenerator.Service.vbproj", "{83ED2617-B398-4859-8F59-B38F8807E83E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.Domain", "EnvelopeGenerator.Domain\EnvelopeGenerator.Domain.csproj", "{4F32A98D-E6F0-4A09-BD97-1CF26107E837}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.Infrastructure", "EnvelopeGenerator.Infrastructure\EnvelopeGenerator.Infrastructure.csproj", "{63E32615-0ECA-42DC-96E3-91037324B7C7}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.Application", "EnvelopeGenerator.Application\EnvelopeGenerator.Application.csproj", "{5A9984F8-51A2-4558-A415-EC5FEED7CF7D}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.GeneratorAPI", "EnvelopeGenerator.GeneratorAPI\EnvelopeGenerator.GeneratorAPI.csproj", "{E5E12BA4-60C1-48BA-9053-0F8B62B38124}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.Extensions", "EnvelopeGenerator.Extensions\EnvelopeGenerator.Extensions.csproj", "{47F98812-4280-4D53-B04A-2AAEEA5EBC31}" @@ -25,6 +29,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{134D4164-B29 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0CBC2432-A561-4440-89BC-671B66A24146}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvelopeGenerator.Tests.Application", "EnvelopeGenerator.Tests.Application\EnvelopeGenerator.Tests.Application.csproj", "{A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "infrastructure", "infrastructure", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "presentation", "presentation", "{E3C758DC-914D-4B7E-8457-0813F1FDB0CB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -33,8 +43,8 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {089D5634-FB6B-42D0-B912-7AA7457044E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {089D5634-FB6B-42D0-B912-7AA7457044E7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {089D5634-FB6B-42D0-B912-7AA7457044E7}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {089D5634-FB6B-42D0-B912-7AA7457044E7}.Release|Any CPU.Build.0 = Debug|Any CPU + {089D5634-FB6B-42D0-B912-7AA7457044E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {089D5634-FB6B-42D0-B912-7AA7457044E7}.Release|Any CPU.Build.0 = Release|Any CPU {6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6D56C01F-D6CB-4D8A-BD3D-4FD34326998C}.Release|Any CPU.ActiveCfg = Debug|Any CPU @@ -51,10 +61,18 @@ Global {83ED2617-B398-4859-8F59-B38F8807E83E}.Debug|Any CPU.Build.0 = Debug|Any CPU {83ED2617-B398-4859-8F59-B38F8807E83E}.Release|Any CPU.ActiveCfg = Debug|Any CPU {83ED2617-B398-4859-8F59-B38F8807E83E}.Release|Any CPU.Build.0 = Debug|Any CPU + {4F32A98D-E6F0-4A09-BD97-1CF26107E837}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F32A98D-E6F0-4A09-BD97-1CF26107E837}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F32A98D-E6F0-4A09-BD97-1CF26107E837}.Release|Any CPU.ActiveCfg = Debug|Any CPU + {4F32A98D-E6F0-4A09-BD97-1CF26107E837}.Release|Any CPU.Build.0 = Debug|Any CPU {63E32615-0ECA-42DC-96E3-91037324B7C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {63E32615-0ECA-42DC-96E3-91037324B7C7}.Debug|Any CPU.Build.0 = Debug|Any CPU {63E32615-0ECA-42DC-96E3-91037324B7C7}.Release|Any CPU.ActiveCfg = Debug|Any CPU {63E32615-0ECA-42DC-96E3-91037324B7C7}.Release|Any CPU.Build.0 = Debug|Any CPU + {5A9984F8-51A2-4558-A415-EC5FEED7CF7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A9984F8-51A2-4558-A415-EC5FEED7CF7D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A9984F8-51A2-4558-A415-EC5FEED7CF7D}.Release|Any CPU.ActiveCfg = Debug|Any CPU + {5A9984F8-51A2-4558-A415-EC5FEED7CF7D}.Release|Any CPU.Build.0 = Debug|Any CPU {E5E12BA4-60C1-48BA-9053-0F8B62B38124}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E5E12BA4-60C1-48BA-9053-0F8B62B38124}.Debug|Any CPU.Build.0 = Debug|Any CPU {E5E12BA4-60C1-48BA-9053-0F8B62B38124}.Release|Any CPU.ActiveCfg = Debug|Any CPU @@ -63,17 +81,29 @@ Global {47F98812-4280-4D53-B04A-2AAEEA5EBC31}.Debug|Any CPU.Build.0 = Debug|Any CPU {47F98812-4280-4D53-B04A-2AAEEA5EBC31}.Release|Any CPU.ActiveCfg = Debug|Any CPU {47F98812-4280-4D53-B04A-2AAEEA5EBC31}.Release|Any CPU.Build.0 = Debug|Any CPU + {A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {089D5634-FB6B-42D0-B912-7AA7457044E7} = {0CBC2432-A561-4440-89BC-671B66A24146} - {6D56C01F-D6CB-4D8A-BD3D-4FD34326998C} = {134D4164-B291-4E19-99B9-E4FA3AFAB62C} - {6EA0C51F-C2B1-4462-8198-3DE0B32B74F8} = {134D4164-B291-4E19-99B9-E4FA3AFAB62C} - {83ED2617-B398-4859-8F59-B38F8807E83E} = {134D4164-B291-4E19-99B9-E4FA3AFAB62C} + {6D56C01F-D6CB-4D8A-BD3D-4FD34326998C} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB} + {6EA0C51F-C2B1-4462-8198-3DE0B32B74F8} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB} + {5E0E17C0-FF5A-4246-BF87-1ADD85376A27} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB} + {83ED2617-B398-4859-8F59-B38F8807E83E} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB} + {4F32A98D-E6F0-4A09-BD97-1CF26107E837} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB} + {63E32615-0ECA-42DC-96E3-91037324B7C7} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} + {5A9984F8-51A2-4558-A415-EC5FEED7CF7D} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB} + {E5E12BA4-60C1-48BA-9053-0F8B62B38124} = {E3C758DC-914D-4B7E-8457-0813F1FDB0CB} {47F98812-4280-4D53-B04A-2AAEEA5EBC31} = {9943209E-1744-4944-B1BA-4F87FC1A0EEB} {9943209E-1744-4944-B1BA-4F87FC1A0EEB} = {134D4164-B291-4E19-99B9-E4FA3AFAB62C} + {A4D0DD1A-67BC-4E1A-AD29-BC4BC0D41399} = {0CBC2432-A561-4440-89BC-671B66A24146} + {02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {134D4164-B291-4E19-99B9-E4FA3AFAB62C} + {E3C758DC-914D-4B7E-8457-0813F1FDB0CB} = {134D4164-B291-4E19-99B9-E4FA3AFAB62C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {73E60370-756D-45AD-A19A-C40A02DACCC7}