Skip to content

Commit

Permalink
Update references:
Browse files Browse the repository at this point in the history
- Updated Microsoft.Data.SqlClient from Version="2.1.7" to Version="5.1.6", which required the following updates:
  - Replaced System.Drawing.Common with GeneXus.Drawing.Common.
  - Updated "Azure.Core" from Version="1.36.0" to Version="1.38.0".
  - Updated "Microsoft.Identity.Client" from Version="4.60.3" to Version="4.61.3".
  - Updated "Azure.Identity" from Version="1.11.0" to Version="1.11.4".
- Continued using System.Drawing.Common for generating graphic reports sent directly to printers, which is supported only on Windows.
  • Loading branch information
claudiamurialdo committed Jan 9, 2025
1 parent 900ab60 commit 78f7168
Show file tree
Hide file tree
Showing 23 changed files with 447 additions and 366 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Core" Version="1.36.0" />
<PackageReference Include="Azure.Core" Version="1.38.0" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.36.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
</ItemGroup>
Expand Down
10 changes: 6 additions & 4 deletions dotnet/src/dotnetcore/GxClasses/GxClasses.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<Compile Include="..\..\dotnetframework\GxClasses\Model\URLRouter.cs" Link="Model\URLRouter.cs" />
<Compile Include="..\..\dotnetframework\GxClasses\Model\SdtGridState.cs" Link="Model\SdtGridState.cs" />
<Compile Include="..\..\dotnetframework\GxClasses\Model\SdtGridState_InputValuesItem.cs" Link="Model\SdtGridState_InputValuesItem.cs" />
<Compile Include="..\..\dotnetframework\GxClasses\Printer\GxPrinterDevice.cs" Link="Printer\GxPrinterDevice.cs" />
<Compile Include="..\..\dotnetframework\GxClasses\Security\WebSecurity.cs" Link="Security\WebSecurity.cs" />
<Compile Include="..\..\dotnetframework\GxClasses\Services\Caching\GxCache.cs" Link="Services\Caching\GxCache.cs" />
<Compile Include="..\..\dotnetframework\GxClasses\Domain\GxCollections.cs" Link="Domain\GxCollections.cs" />
Expand Down Expand Up @@ -150,7 +151,7 @@
<ItemGroup>
<PackageReference Include="Experimental.System.Messaging.Signed" Version="1.0.0" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.1.7" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.6" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -164,16 +165,17 @@
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.7.0" PrivateAssets="All" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="MySqlConnector" Version="2.2.3" PrivateAssets="All"/>
<PackageReference Include="MySqlConnector" Version="2.2.3" PrivateAssets="All" />
<PackageReference Include="NetTopologySuite" Version="2.0.0" />
<PackageReference Include="NodaTime" Version="3.1.9" />
<PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="3.3.1" />
<PackageReference Include="Npgsql" Version="8.0.3" PrivateAssets="All"/>
<PackageReference Include="Npgsql" Version="8.0.3" PrivateAssets="All" />
<PackageReference Include="Sandwych.GeographicLib" Version="1.49.3" />
<PackageReference Include="Stubble.Core" Version="1.8.4" />
<PackageReference Include="System.DirectoryServices" Version="4.7.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.35.0" />
<PackageReference Include="System.Drawing.Common" Version="4.7.2" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="GeneXus.Drawing.Common" Version="2.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.35.0" />
<PackageReference Include="NUglify" Version="1.16.4" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/dotnetcore/GxMail/GxMail.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<PackageReference Include="MailKit" Version="3.1.1" />
<PackageReference Include="Microsoft.Exchange.WebServices" Version="2.2.0" />
<PackageReference Include="MimeKit" Version="3.1.1" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.60.3" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.3" />
<PackageReference Include="OpenPop" Version="2.0.6.2" />
<PackageReference Include="Org.Mentalis.Security" Version="1.0.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.3" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.1.7" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.6" />
<PackageReference Include="Microsoft.Extensions.Caching.SqlServer" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.3" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.60.3" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.3" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />

<PackageReference Include="Azure.Identity" Version="1.11.0" PrivateAssets="All" />
<PackageReference Include="Azure.Identity" Version="1.11.4" PrivateAssets="All" />
<PackageReference Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.1.0" PrivateAssets="All" />
<PackageReference Include="OpenTelemetry" Version="1.7.0" PrivateAssets="All" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.7.0" PrivateAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="System.Drawing.Common" Version="4.7.2" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions dotnet/src/dotnetcore/GxPdfReportsCS/GxPdfReportsCS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<EmbeddedResource Include="..\..\dotnetframework\GxPdfReportsCS\sRGB Color Space Profile.icm" Link="sRGB Color Space Profile.icm" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="PdfPig" Version="0.1.8" PrivateAssets="All"/>
<PackageReference Include="PdfPig" Version="0.1.8" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand All @@ -32,8 +32,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="System.Drawing.Common" Version="4.7.2" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
<PackageReference Include="GeneXus.Drawing.Common" Version="2.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
13 changes: 11 additions & 2 deletions dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportPDFPig.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
using System;
using System.Collections.Generic;
#if NETCORE
using GeneXus.Drawing;
using GeneXus.Drawing.Imaging;
using GeneXus.Drawing.Text;
using GeneXus.Drawing.Drawing2D;
using Color = GeneXus.Drawing.Color;
using Font = GeneXus.Drawing.Font;
#else
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Text;
using Color = System.Drawing.Color;
using Font = System.Drawing.Font;
#endif
using System.IO;
using System.Net.Http;
using System.Text;
Expand All @@ -14,8 +25,6 @@
using static GeneXus.Utils.StringUtil;
using static UglyToad.PdfPig.Writer.PdfDocumentBuilder;
using static UglyToad.PdfPig.Writer.PdfPageBuilder;
using Color = System.Drawing.Color;
using Font = System.Drawing.Font;
using PageSize = UglyToad.PdfPig.Content.PageSize;
using PdfRectangle = UglyToad.PdfPig.Core.PdfRectangle;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>

<PackageReference Include="Azure.Identity" Version="1.11.0" />
<PackageReference Include="Azure.Identity" Version="1.11.4" />
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.20.0" />

</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>

<PackageReference Include="Azure.Identity" Version="1.11.0" />
<PackageReference Include="Azure.Identity" Version="1.11.4" />
<PackageReference Include="Azure.Storage.Queues" Version="12.16.0" />

</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>

<PackageReference Include="Azure.Identity" Version="1.11.0" />
<PackageReference Include="Azure.Identity" Version="1.11.4" />
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.16.2" />

</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>

<PackageReference Include="Azure.Identity" Version="1.11.0" />
<PackageReference Include="Azure.Identity" Version="1.11.4" />
<PackageReference Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.1.0" />
<PackageReference Include="log4net.Ext.Json" Version="2.0.10.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Log4NetAppender" Version="2.22.0" />
Expand Down
30 changes: 26 additions & 4 deletions dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,25 @@
using GeneXus.Cryptography;
using GeneXus.Data.NTier;
using System.Collections.Generic;
using System.Drawing;
using Microsoft.Win32;
using System.Security.Cryptography;
using System.Collections.Concurrent;
using System.Drawing.Drawing2D;
using GeneXus.Storage;
using GeneXus.Services;
using GeneXus.Http;
using System.Security;
using System.Drawing.Imaging;
using System.Net.Http.Headers;
#if NETCORE
using Image = GeneXus.Drawing.Image;
using GeneXus.Drawing;
using GeneXus.Drawing.Drawing2D;
using GeneXus.Drawing.Imaging;
#else
using Image = System.Drawing.Image;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
#endif
using System.Net.Http;

namespace GeneXus.Utils
Expand Down Expand Up @@ -6098,7 +6105,11 @@ public static string Resize(string imageFile, int width, int height, bool keepAs
newheight = (int)(image.Height / resize);// set the new heigth of the current image
}//return the image resized to the given heigth and width
Image output = image.GetThumbnailImage(width, newheight, null, IntPtr.Zero);
#if NETCORE
modifiedImage = Save(output, imageFile,ImageFormat.Png);
#else
modifiedImage = Save(output, imageFile, ImageFormat.Bmp);
#endif
}
}
catch (Exception ex)
Expand Down Expand Up @@ -6137,14 +6148,20 @@ public static string Crop(string imageFile, int X, int Y, int Width, int Height)
{
using (Bitmap bmp = new Bitmap(Width, Height))
{
#if !NETCORE
bmp.SetResolution(OriginalImage.HorizontalResolution, OriginalImage.VerticalResolution);
#endif
using (Graphics Graphic = Graphics.FromImage(bmp))
{
Graphic.SmoothingMode = SmoothingMode.AntiAlias;
Graphic.InterpolationMode = InterpolationMode.HighQualityBicubic;
Graphic.PixelOffsetMode = PixelOffsetMode.HighQuality;
Graphic.DrawImage(OriginalImage, new Rectangle(0, 0, Width, Height), X, Y, Width, Height, GraphicsUnit.Pixel);
modifiedImage = Save(bmp, imageFile, OriginalImage.RawFormat);
#if NETCORE
modifiedImage = Save(bmp, imageFile, ImageFormat.Png);
#else
modifiedImage = Save(bmp, imageFile, ImageFormat.Bmp);
#endif
}
}
}
Expand Down Expand Up @@ -6303,7 +6320,11 @@ public static string Save(Image bitmap, string imageFile, ImageFormat format)
{
//In some cases, copied memory image fails to save when ImageFormat MemoryBmp
//https://stackoverflow.com/questions/9073619/image-save-crashing-value-cannot-be-null-r-nparameter-name-encoder
#if NETCORE
bitmap.Save(ms, ImageFormat.Png);
#else
bitmap.Save(ms, ImageFormat.Bmp);
#endif
}
ms.Position = 0;
try
Expand Down Expand Up @@ -6377,6 +6398,7 @@ public static long GetFileSize(string imageFile)
return 0;
}
}

public class StorageUtils
{
public const string DELIMITER = "/";
Expand Down
10 changes: 10 additions & 0 deletions dotnet/src/dotnetframework/GxClasses/Data/GXDataCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,8 @@ public class GxSqlServer : GxDataRecord
private const int MILLISECONDS_BETWEEN_RETRY_ATTEMPTS = 500;
private const string MULTIPLE_DATAREADERS = "MultipleActiveResultSets";
#if NETCORE
private const string TRUST_SERVER_CERTIFICATE = "TrustServerCertificate";
private const bool TRUST_CERT_DEFAULT = true;
private const string INTEGRATED_SECURITY = "Integrated Security";
private const string INTEGRATED_SECURITY_NO = "no";
#endif
Expand Down Expand Up @@ -2062,6 +2064,14 @@ protected override string BuildConnectionString(string datasourceName, string us
connectionString.AppendFormat(";Password={0}", userPassword);
}
extra = ResolveConnectionStringAuthentication(extra, additionalConnectionString);

string tSrvCertificate = GetParameterValue(extra, TRUST_SERVER_CERTIFICATE);
if (string.IsNullOrEmpty(tSrvCertificate))
{
//TODO:Remove Temporary compatibility setting to bypass certificate validation
connectionString.AppendFormat(";{0}={1}", TRUST_SERVER_CERTIFICATE, TRUST_CERT_DEFAULT);
}

#else
if (userId!=null)
{
Expand Down
Loading

0 comments on commit 78f7168

Please sign in to comment.