From 146f6e3567bd4beec195f834f77e839fa6dd786c Mon Sep 17 00:00:00 2001 From: Claudia Murialdo Date: Thu, 30 Jun 2022 19:21:10 -0300 Subject: [PATCH 1/6] Types that are not intended to be used outside of standard classes are changed from public to internal --- .../dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs | 2 +- dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs | 2 +- dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs | 2 +- .../src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs | 4 +++- dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs | 2 ++ .../src/dotnetframework/GxClasses/Services/GxRestWrapper.cs | 4 ++-- .../Azure/Handlers/HttpHandler/HttpTriggerHandler.cs | 2 +- .../src/extensions/Azure/Handlers/Properties/AssemblyInfo.cs | 4 ++++ 8 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 dotnet/src/extensions/Azure/Handlers/Properties/AssemblyInfo.cs diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs index 6bd915c16..e41b34bfb 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs @@ -12,7 +12,7 @@ namespace GeneXus.Application { - public class GXBCRestService :GxRestWrapper + internal class GXBCRestService :GxRestWrapper { GxSilentTrnSdt _worker; private const string INSERT_OR_UPDATE_PARAMETER = "insertorupdate"; diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs index 192d77fd2..ccaf7d06f 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs @@ -23,7 +23,7 @@ namespace GxClasses.Web.Middleware { - public class GXRouting : IGXRouting + internal class GXRouting : IGXRouting { static readonly ILog log = log4net.LogManager.GetLogger(typeof(IGXRouting)); diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs index 667cc0b5f..e137a0f6c 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs @@ -6,7 +6,7 @@ namespace GxClasses.Web { - public interface IGXRouting + internal interface IGXRouting { public Task ProcessRestRequest(HttpContext context); public bool ServiceInPath(String path, out String actualPath); diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs b/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs index 9c1ad7a93..d4b839475 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs @@ -2,4 +2,6 @@ [assembly: InternalsVisibleTo("DotNetCoreUnitTest")] -[assembly: InternalsVisibleTo("GxNetCoreStartup")] \ No newline at end of file +[assembly: InternalsVisibleTo("GxNetCoreStartup")] +[assembly: InternalsVisibleTo("GeneXus.Deploy.AzureFunctions.Handlers")] +[assembly: InternalsVisibleTo("AzureFunctionsTest")] \ No newline at end of file diff --git a/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs b/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs index 7b646928c..e0948eaa0 100644 --- a/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs +++ b/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs @@ -4,4 +4,6 @@ [assembly: InternalsVisibleTo("GxClasses.Web")] [assembly: InternalsVisibleTo("GxSearch")] [assembly: InternalsVisibleTo("GxNetCoreStartup")] +[assembly: InternalsVisibleTo("GeneXus.Deploy.AzureFunctions.Handlers")] +[assembly: InternalsVisibleTo("AzureFunctionsTest")] diff --git a/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs b/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs index 294e876fa..ff62d1968 100644 --- a/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs +++ b/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs @@ -44,9 +44,9 @@ internal static class Synchronizer } #if NETCORE - public class GxRestWrapper + internal class GxRestWrapper #else - public class GxRestWrapper : IHttpHandler, IRequiresSessionState + internal class GxRestWrapper : IHttpHandler, IRequiresSessionState #endif { static readonly ILog log = log4net.LogManager.GetLogger(typeof(GeneXus.Application.GxRestWrapper)); diff --git a/dotnet/src/extensions/Azure/Handlers/HttpHandler/HttpTriggerHandler.cs b/dotnet/src/extensions/Azure/Handlers/HttpHandler/HttpTriggerHandler.cs index 2ee0299d2..17ed89652 100644 --- a/dotnet/src/extensions/Azure/Handlers/HttpHandler/HttpTriggerHandler.cs +++ b/dotnet/src/extensions/Azure/Handlers/HttpHandler/HttpTriggerHandler.cs @@ -29,7 +29,7 @@ public class HttpTriggerHandler private IGXRouting _gxRouting; private ICacheService2 _redis; - public HttpTriggerHandler(IGXRouting gxRouting, ICacheService2 redis) + internal HttpTriggerHandler(IGXRouting gxRouting, ICacheService2 redis) { _gxRouting = gxRouting; if (redis != null && redis.GetType() == typeof(Redis)) diff --git a/dotnet/src/extensions/Azure/Handlers/Properties/AssemblyInfo.cs b/dotnet/src/extensions/Azure/Handlers/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..17d2649ac --- /dev/null +++ b/dotnet/src/extensions/Azure/Handlers/Properties/AssemblyInfo.cs @@ -0,0 +1,4 @@ +using System.Runtime.CompilerServices; + + +[assembly: InternalsVisibleTo("AzureFunctionsTest")] \ No newline at end of file From cd96d32b7835729acf34628c2617e6a7f2742cae Mon Sep 17 00:00:00 2001 From: sjuarezgx Date: Thu, 7 Jul 2022 08:57:30 -0300 Subject: [PATCH 2/6] Revert "Types that are not intended to be used outside of standard classes are changed from public to internal" This reverts commit 146f6e3567bd4beec195f834f77e839fa6dd786c. --- .../dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs | 2 +- dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs | 2 +- dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs | 2 +- .../src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs | 4 +--- dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs | 2 -- .../src/dotnetframework/GxClasses/Services/GxRestWrapper.cs | 4 ++-- .../Azure/Handlers/HttpHandler/HttpTriggerHandler.cs | 2 +- .../src/extensions/Azure/Handlers/Properties/AssemblyInfo.cs | 4 ---- 8 files changed, 7 insertions(+), 15 deletions(-) delete mode 100644 dotnet/src/extensions/Azure/Handlers/Properties/AssemblyInfo.cs diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs index e41b34bfb..6bd915c16 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs @@ -12,7 +12,7 @@ namespace GeneXus.Application { - internal class GXBCRestService :GxRestWrapper + public class GXBCRestService :GxRestWrapper { GxSilentTrnSdt _worker; private const string INSERT_OR_UPDATE_PARAMETER = "insertorupdate"; diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs index ccaf7d06f..192d77fd2 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs @@ -23,7 +23,7 @@ namespace GxClasses.Web.Middleware { - internal class GXRouting : IGXRouting + public class GXRouting : IGXRouting { static readonly ILog log = log4net.LogManager.GetLogger(typeof(IGXRouting)); diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs index e137a0f6c..667cc0b5f 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs @@ -6,7 +6,7 @@ namespace GxClasses.Web { - internal interface IGXRouting + public interface IGXRouting { public Task ProcessRestRequest(HttpContext context); public bool ServiceInPath(String path, out String actualPath); diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs b/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs index d4b839475..9c1ad7a93 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs @@ -2,6 +2,4 @@ [assembly: InternalsVisibleTo("DotNetCoreUnitTest")] -[assembly: InternalsVisibleTo("GxNetCoreStartup")] -[assembly: InternalsVisibleTo("GeneXus.Deploy.AzureFunctions.Handlers")] -[assembly: InternalsVisibleTo("AzureFunctionsTest")] \ No newline at end of file +[assembly: InternalsVisibleTo("GxNetCoreStartup")] \ No newline at end of file diff --git a/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs b/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs index e0948eaa0..7b646928c 100644 --- a/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs +++ b/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs @@ -4,6 +4,4 @@ [assembly: InternalsVisibleTo("GxClasses.Web")] [assembly: InternalsVisibleTo("GxSearch")] [assembly: InternalsVisibleTo("GxNetCoreStartup")] -[assembly: InternalsVisibleTo("GeneXus.Deploy.AzureFunctions.Handlers")] -[assembly: InternalsVisibleTo("AzureFunctionsTest")] diff --git a/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs b/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs index ff62d1968..294e876fa 100644 --- a/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs +++ b/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs @@ -44,9 +44,9 @@ internal static class Synchronizer } #if NETCORE - internal class GxRestWrapper + public class GxRestWrapper #else - internal class GxRestWrapper : IHttpHandler, IRequiresSessionState + public class GxRestWrapper : IHttpHandler, IRequiresSessionState #endif { static readonly ILog log = log4net.LogManager.GetLogger(typeof(GeneXus.Application.GxRestWrapper)); diff --git a/dotnet/src/extensions/Azure/Handlers/HttpHandler/HttpTriggerHandler.cs b/dotnet/src/extensions/Azure/Handlers/HttpHandler/HttpTriggerHandler.cs index 17ed89652..2ee0299d2 100644 --- a/dotnet/src/extensions/Azure/Handlers/HttpHandler/HttpTriggerHandler.cs +++ b/dotnet/src/extensions/Azure/Handlers/HttpHandler/HttpTriggerHandler.cs @@ -29,7 +29,7 @@ public class HttpTriggerHandler private IGXRouting _gxRouting; private ICacheService2 _redis; - internal HttpTriggerHandler(IGXRouting gxRouting, ICacheService2 redis) + public HttpTriggerHandler(IGXRouting gxRouting, ICacheService2 redis) { _gxRouting = gxRouting; if (redis != null && redis.GetType() == typeof(Redis)) diff --git a/dotnet/src/extensions/Azure/Handlers/Properties/AssemblyInfo.cs b/dotnet/src/extensions/Azure/Handlers/Properties/AssemblyInfo.cs deleted file mode 100644 index 17d2649ac..000000000 --- a/dotnet/src/extensions/Azure/Handlers/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,4 +0,0 @@ -using System.Runtime.CompilerServices; - - -[assembly: InternalsVisibleTo("AzureFunctionsTest")] \ No newline at end of file From f5da7c606738b79a902d4f289f32db03f1aa5c6c Mon Sep 17 00:00:00 2001 From: aberta Date: Thu, 7 Jul 2022 11:14:02 -0300 Subject: [PATCH 3/6] Restore "internal" definition for Types that are not intended to be used outside of standard classes are changed from public to internal"" This partially reverts commit cd96d32b7835729acf34628c2617e6a7f2742cae. --- .../dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs | 2 +- dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs | 2 +- dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs | 2 +- .../src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs | 4 +++- dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs | 2 ++ .../src/dotnetframework/GxClasses/Services/GxRestWrapper.cs | 4 ++-- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs index 6bd915c16..e41b34bfb 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXBCRestService.cs @@ -12,7 +12,7 @@ namespace GeneXus.Application { - public class GXBCRestService :GxRestWrapper + internal class GXBCRestService :GxRestWrapper { GxSilentTrnSdt _worker; private const string INSERT_OR_UPDATE_PARAMETER = "insertorupdate"; diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs index 192d77fd2..ccaf7d06f 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs @@ -23,7 +23,7 @@ namespace GxClasses.Web.Middleware { - public class GXRouting : IGXRouting + internal class GXRouting : IGXRouting { static readonly ILog log = log4net.LogManager.GetLogger(typeof(IGXRouting)); diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs index 667cc0b5f..e137a0f6c 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs @@ -6,7 +6,7 @@ namespace GxClasses.Web { - public interface IGXRouting + internal interface IGXRouting { public Task ProcessRestRequest(HttpContext context); public bool ServiceInPath(String path, out String actualPath); diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs b/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs index 9c1ad7a93..d4b839475 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Properties/AssemblyInfo.cs @@ -2,4 +2,6 @@ [assembly: InternalsVisibleTo("DotNetCoreUnitTest")] -[assembly: InternalsVisibleTo("GxNetCoreStartup")] \ No newline at end of file +[assembly: InternalsVisibleTo("GxNetCoreStartup")] +[assembly: InternalsVisibleTo("GeneXus.Deploy.AzureFunctions.Handlers")] +[assembly: InternalsVisibleTo("AzureFunctionsTest")] \ No newline at end of file diff --git a/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs b/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs index 7b646928c..e0948eaa0 100644 --- a/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs +++ b/dotnet/src/dotnetcore/GxClasses/Properties/AssemblyInfo.cs @@ -4,4 +4,6 @@ [assembly: InternalsVisibleTo("GxClasses.Web")] [assembly: InternalsVisibleTo("GxSearch")] [assembly: InternalsVisibleTo("GxNetCoreStartup")] +[assembly: InternalsVisibleTo("GeneXus.Deploy.AzureFunctions.Handlers")] +[assembly: InternalsVisibleTo("AzureFunctionsTest")] diff --git a/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs b/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs index 294e876fa..ff62d1968 100644 --- a/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs +++ b/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs @@ -44,9 +44,9 @@ internal static class Synchronizer } #if NETCORE - public class GxRestWrapper + internal class GxRestWrapper #else - public class GxRestWrapper : IHttpHandler, IRequiresSessionState + internal class GxRestWrapper : IHttpHandler, IRequiresSessionState #endif { static readonly ILog log = log4net.LogManager.GetLogger(typeof(GeneXus.Application.GxRestWrapper)); From e9185685996b04a9ae1ed4b8a891690b1e5df914 Mon Sep 17 00:00:00 2001 From: aberta Date: Thu, 7 Jul 2022 11:45:29 -0300 Subject: [PATCH 4/6] HttpTriggerHandler is public so, it requires IGXRouting be public too. --- dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs index e137a0f6c..667cc0b5f 100644 --- a/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs +++ b/dotnet/src/dotnetcore/GxClasses.Web/Middleware/IGXRouting.cs @@ -6,7 +6,7 @@ namespace GxClasses.Web { - internal interface IGXRouting + public interface IGXRouting { public Task ProcessRestRequest(HttpContext context); public bool ServiceInPath(String path, out String actualPath); From d458b9fff0074912ef4c46054dc4e4622895f529 Mon Sep 17 00:00:00 2001 From: aberta Date: Thu, 7 Jul 2022 14:41:10 -0300 Subject: [PATCH 5/6] Redefine GxRestWrapper as public to avoid build error by now. --- dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs b/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs index ff62d1968..d0c33edbc 100644 --- a/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs +++ b/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs @@ -46,7 +46,7 @@ internal static class Synchronizer #if NETCORE internal class GxRestWrapper #else - internal class GxRestWrapper : IHttpHandler, IRequiresSessionState + public class GxRestWrapper : IHttpHandler, IRequiresSessionState #endif { static readonly ILog log = log4net.LogManager.GetLogger(typeof(GeneXus.Application.GxRestWrapper)); From 01f51a0a0104804de7ecbd06138f0b05ff6e53ea Mon Sep 17 00:00:00 2001 From: aberta Date: Thu, 7 Jul 2022 15:16:02 -0300 Subject: [PATCH 6/6] Redefine GxRestWrapper as public to avoid build error by now. --- dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs b/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs index d0c33edbc..294e876fa 100644 --- a/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs +++ b/dotnet/src/dotnetframework/GxClasses/Services/GxRestWrapper.cs @@ -44,7 +44,7 @@ internal static class Synchronizer } #if NETCORE - internal class GxRestWrapper + public class GxRestWrapper #else public class GxRestWrapper : IHttpHandler, IRequiresSessionState #endif