Skip to content

Commit

Permalink
The smart devices cache was not working for services in modules (#913)
Browse files Browse the repository at this point in the history
* The smart devices cache was not working for services in modules, as it failed to consider the full name when checking for smart devices data caching on the server side

* Fix build error on .NET framework.
  • Loading branch information
claudiamurialdo authored Dec 14, 2023
1 parent f803e9a commit 9a48de9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dotnet/src/dotnetframework/GxClasses/Model/GXBaseObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ protected virtual void ExecutePrivate()
{

}
#if NETCORE
internal static string GetObjectNameWithoutNamespace(string gxObjFullName)
{
string mainNamespace = Preferences.AppMainNamespace;
if (gxObjFullName.StartsWith(mainNamespace))
gxObjFullName = gxObjFullName.Remove(0, mainNamespace.Length + 1);
return gxObjFullName;
}
#if NETCORE
private void ExecuteUsingSpanCode()
{
string gxObjFullName = GetObjectNameWithoutNamespace(GetType().FullName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public virtual Task MethodBodyExecute(object key)
gxobject.webExecute();
return Task.CompletedTask;
}
if (!ProcessHeaders(_procWorker.GetType().Name))
if (!ProcessHeaders(GXBaseObject.GetObjectNameWithoutNamespace(_procWorker.GetType().FullName)))
return Task.CompletedTask;
_procWorker.IsMain = true;
if (bodyParameters == null)
Expand Down Expand Up @@ -303,7 +303,7 @@ public virtual Task MethodUrlExecute(object key)
{
return Task.CompletedTask;
}
if (!ProcessHeaders(_procWorker.GetType().Name))
if (!ProcessHeaders(GXBaseObject.GetObjectNameWithoutNamespace(_procWorker.GetType().FullName)))
return Task.CompletedTask;
_procWorker.IsMain = true;
IDictionary<string,object> queryParameters = ReadQueryParameters(this._variableAlias);
Expand Down

0 comments on commit 9a48de9

Please sign in to comment.