Skip to content

Commit

Permalink
Remove and organize using directives. (#903)
Browse files Browse the repository at this point in the history
Eliminate any unnecessary using statements, specifically the log4net ones that complement PR #871.
  • Loading branch information
claudiamurialdo authored Nov 10, 2023
1 parent 503e144 commit a97a90a
Show file tree
Hide file tree
Showing 127 changed files with 222 additions and 474 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public override Task Post()
bool gxinsertorupdate = IsRestParameter(INSERT_OR_UPDATE_PARAMETER);

GxSilentTrnSdt entity = (GxSilentTrnSdt)Activator.CreateInstance(_worker.GetType(), new Object[] { _gxContext });
var entity_interface = MakeRestType(entity, false);
object entity_interface = MakeRestType(entity, false);
entity_interface = ReadRequestBodySDTObj(entity_interface.GetType());

var worker_interface = MakeRestType(_worker, false);
object worker_interface = MakeRestType(_worker, false);

worker_interface.GetType().GetMethod("CopyFrom").Invoke(worker_interface, new object[] { entity_interface });
if (gxcheck)
Expand Down Expand Up @@ -191,12 +191,12 @@ public override Task Put(object parameters)
{
bool gxcheck = IsRestParameter(CHECK_PARAMETER);
GxSilentTrnSdt entity = (GxSilentTrnSdt)Activator.CreateInstance(_worker.GetType(), new Object[] { _gxContext });
var entity_interface = MakeRestType(entity, false);
object entity_interface = MakeRestType(entity, false);
entity_interface = ReadRequestBodySDTObj(entity_interface.GetType());
string entityHash = entity_interface.GetType().GetProperty("Hash").GetValue(entity_interface) as string;

ReflectionHelper.CallBCMethod(_worker, LOAD_METHOD, key);
var worker_interface = MakeRestType(_worker, false);
object worker_interface = MakeRestType(_worker, false);
string currentHash = worker_interface.GetType().GetProperty("Hash").GetValue(worker_interface) as string;
if (entityHash == currentHash)
{
Expand Down Expand Up @@ -249,7 +249,7 @@ private object ReadRequestBodySDTObj(Type type)
{
using (var reader = new StreamReader(_httpContext.Request.Body))
{
var sdtData = reader.ReadToEnd();
string sdtData = reader.ReadToEnd();
using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(sdtData)))
{
DataContractJsonSerializer serializer = new DataContractJsonSerializer(type);
Expand Down
3 changes: 0 additions & 3 deletions dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@
using GeneXus.Http;
using GeneXus.HttpHandlerFactory;
using GeneXus.Metadata;
using GeneXus.Procedure;
using GeneXus.Utils;
using log4net;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Net.Http.Headers;

namespace GxClasses.Web.Middleware
{
Expand Down
16 changes: 7 additions & 9 deletions dotnet/src/dotnetcore/GxClasses.Web/Middleware/HandlerFactory.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Reflection;
using System.Threading.Tasks;
using GeneXus.Application;
using GeneXus.Configuration;
using log4net;
using GeneXus.Http;
using GeneXus.Mime;
using GeneXus.Utils;
using Microsoft.AspNetCore.Http;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using System.Net;
using GeneXus.Mime;
using GeneXus.Http;
using System.Collections.Generic;
using GeneXus.Application;
using System.IO;

namespace GeneXus.HttpHandlerFactory
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
using GeneXus.Configuration;
using GeneXus.Metadata;
using GeneXus.Notifications.WebSocket;
using GeneXus.Procedure;
using GeneXus.Services;
using GeneXus.Utils;
using Jayrock.Json;
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using GeneXus.Configuration;
using GeneXus.Metadata;
using GeneXus.Notifications.WebSocket;
using GeneXus.Procedure;
using GeneXus.Services;
using GeneXus.Utils;
using Jayrock.Json;

namespace GeneXus.Http.WebSocket
{
Expand Down
1 change: 0 additions & 1 deletion dotnet/src/dotnetcore/GxClasses/Helpers/GXGeographyCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Runtime.Serialization;
using Jayrock.Json;
using GeographicLib;
using log4net;
using NetTopologySuite.Geometries;
using NetTopologySuite.IO;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using GxClasses.Helpers;
using log4net;

namespace GeneXus.Services.OpenTelemetry
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using GeneXus.Encryption;
using log4net;

namespace GeneXus.Services.Common
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using GeneXus.Data.ADO;
using GeneXus.Encryption;
using GxClasses.Helpers;
using log4net;

namespace GeneXus.Services
{
Expand Down
1 change: 0 additions & 1 deletion dotnet/src/dotnetcore/GxNetCoreStartup/CsrfHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Threading.Tasks;
using GeneXus.Configuration;
using GeneXus.Http;
using log4net;
using Microsoft.AspNetCore.Antiforgery;
using Microsoft.AspNetCore.Http;
namespace GeneXus.Application
Expand Down
4 changes: 0 additions & 4 deletions dotnet/src/dotnetcore/GxNetCoreStartup/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using System.IO;
using System.Net;
using System.Threading.Tasks;
using Azure.Identity;
using Azure.Monitor.OpenTelemetry.Exporter;
using GeneXus.Configuration;
using GeneXus.Http;
using GeneXus.HttpHandlerFactory;
Expand All @@ -29,8 +27,6 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Logging;
using OpenTelemetry.Logs;
using OpenTelemetry.Resources;
using StackExchange.Redis;

namespace GeneXus.Application
Expand Down
2 changes: 0 additions & 2 deletions dotnet/src/dotnetcore/GxPdfReportsCS/PDFReportItext8.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
using iText.Layout.Font;
using iText.Layout.Layout;
using iText.Layout.Properties;
using iText.Layout.Renderer;
using iText.Layout.Splitting;
using log4net;
using Path = System.IO.Path;

namespace GeneXus.Printer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading.Tasks;
using Amazon;
using Amazon.Runtime;
using Amazon.SQS;
using Amazon.SQS.Model;
using GeneXus.Messaging.Common;
using GeneXus.Services;
using GeneXus.Utils;
using log4net;
using System.Threading.Tasks;
using System.Reflection;

namespace GeneXus.Messaging.Queue
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using GeneXus.Messaging.Common;
using GeneXus.Services;
using GeneXus.Utils;
using log4net;

namespace GeneXus.Messaging.GXAzureEventGrid
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
using GeneXus.Messaging.Common;
using GeneXus.Services;
using GeneXus.Utils;
using log4net;
using Microsoft.Extensions.Logging;

namespace GeneXus.Messaging.Queue
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using GeneXus.Messaging.Common;
using GeneXus.Services;
using GeneXus.Utils;
using log4net;

namespace GeneXus.Messaging.GXAzureServiceBus
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using GeneXus.Services;
using log4net;

namespace GeneXus.Messaging.Common
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using GeneXus.Services;
using GeneXus.Utils;
using GxClasses.Helpers;
using log4net;

namespace GeneXus.Messaging.Common
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using GeneXus.Services;
using GeneXus.Utils;
using GxClasses.Helpers;
using log4net;

namespace GeneXus.Messaging.Common
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using GeneXus.Services;
using log4net;

namespace GeneXus.Messaging.Common
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using GeneXus.Services;
using GeneXus.Utils;
using GxClasses.Helpers;
using log4net;

namespace GeneXus.Messaging.Common
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using GeneXus.Services;
using GeneXus.Utils;
using GxClasses.Helpers;
using log4net;

namespace GeneXus.Messaging.Common
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using GeneXus.Encryption;
using GeneXus.Services;
using log4net;

namespace GeneXus.Messaging.Common
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using GeneXus.Services;
using GeneXus.Utils;
using GxClasses.Helpers;
using log4net;

namespace GeneXus.Messaging.Common
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GeneXus.Services;
using log4net;

namespace GeneXus.Messaging.Common
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using GeneXus.Application;
using GeneXus.Services;
using GeneXus.Utils;
using GxClasses.Helpers;
using log4net;

namespace GeneXus.Messaging.Common
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@

using System;
using GeneXus.Services;
using GeneXus.Services.OpenTelemetry;
using Microsoft.Extensions.DependencyInjection;
using OpenTelemetry;
using OpenTelemetry.Trace;
using OpenTelemetry.Resources;
using log4net;
using GeneXus.Services;

namespace GeneXus.OpenTelemetry.Lightstep
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using GeneXus.Application;
using log4net;
using System;
using System.Diagnostics;
using System.IO;
using GeneXus.Application;

namespace GeneXus.Utils
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using GeneXus.Attributes;
using GeneXus.Utils;
using GeneXus.Encryption;
using log4net;
#if NETCORE
using GxClasses.Helpers;
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using System;
using System.Linq;
using log4net;
using log4net.Appender;
using log4net.Core;
using log4net.Repository;
using log4net.Repository.Hierarchy;
using System.Linq;
using log4net.Layout;

namespace GeneXus.Configuration
{
Expand Down
2 changes: 0 additions & 2 deletions dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace GeneXus.Application
#endif
using GeneXus.Configuration;
using GeneXus.Metadata;
using log4net;
using Jayrock.Json;
using GeneXus.Http;
using System.Collections.Specialized;
Expand All @@ -44,7 +43,6 @@ namespace GeneXus.Application
using Microsoft.AspNetCore.Http.Features;
#endif
using NodaTime;
using NodaTime.TimeZones;
using System.Threading;
using System.Security.Claims;
using System.Security;
Expand Down
1 change: 0 additions & 1 deletion dotnet/src/dotnetframework/GxClasses/Core/GXUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace GeneXus.Utils
using Cache;
using GeneXus.Application;
using GeneXus.Services;
using log4net;
using TZ4Net;

public class GxMail
Expand Down
3 changes: 0 additions & 3 deletions dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using GeneXus.Application;
using GeneXus.Configuration;
using log4net;
using System;
using System.Collections;
using System.Diagnostics;
Expand All @@ -20,7 +19,6 @@
using System.Net;
#endif
using NodaTime;
using NodaTime.TimeZones;
using NUglify;
using NUglify.Html;
using GeneXus.Web.Security;
Expand All @@ -45,7 +43,6 @@
using GeneXus.Services;
using GeneXus.Http;
using System.Security;
using System.Threading.Tasks;
using System.Drawing.Imaging;
using System.Net.Http.Headers;
using Image = System.Drawing.Image;
Expand Down
Loading

0 comments on commit a97a90a

Please sign in to comment.