Skip to content

Commit

Permalink
Define protected property AsyncEnabled and internal method GetAsyncEn…
Browse files Browse the repository at this point in the history
…abledInternal.
  • Loading branch information
claudiamurialdo committed Apr 2, 2024
1 parent 88d546f commit eb0d975
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public async Task Invoke(HttpContext context)
return Task.CompletedTask;
});
GXWebProcedure gxWebProc = handler as GXWebProcedure;
if (gxWebProc != null && gxWebProc.AsyncEnabled())
if (gxWebProc != null && gxWebProc.GetAsyncEnabledInternal())
{
await gxWebProc.ProcessRequestAsync(context);
}
Expand Down
8 changes: 5 additions & 3 deletions dotnet/src/dotnetframework/GxClasses/Model/GXBaseObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ protected virtual void ExecutePrivate()

}
#if NETCORE
internal virtual bool AsyncEnabled()
protected virtual bool AsyncEnabled { get; }

internal bool GetAsyncEnabledInternal()
{
return false;
return AsyncEnabled;
}
protected async Task CloseConnectionsAsync()
{
Expand Down Expand Up @@ -111,7 +113,7 @@ private async Task ExecuteUsingSpanCodeAsync()
protected virtual void ExecuteImpl()
{
#if NETCORE
if (AsyncEnabled())
if (GetAsyncEnabledInternal())
{
ExecuteImplAsync().GetAwaiter().GetResult();
}
Expand Down

0 comments on commit eb0d975

Please sign in to comment.