Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace GeneXus.Application
using System.ServiceModel.Web;
using GeneXus.UserControls;
using System.Net.Http.Headers;
using System.ServiceModel;
#else
using Microsoft.AspNetCore.Http;
using GxClasses.Helpers;
Expand Down Expand Up @@ -4128,10 +4129,36 @@ public string ClientID
}
}


#if NETCORE
public GXSOAPContext SoapContext { get; set; }
#else
public GXSOAPContext SoapContext
{
get
{
return HttpHelper.GetSoapContext();
}
set
{
HttpHelper.SetSoapContext(value);
}
}

#endif


#endregion
}
#if !NETCORE
public class RequestMessageExtension : IExtension<OperationContext>
{
public GXSOAPContext SOAPContext { get; set; }

public void Attach(OperationContext owner) { }
public void Detach(OperationContext owner) { }
}
#endif
public class GxXmlContext
{
GXXMLReader _XMLR;
Expand Down
23 changes: 21 additions & 2 deletions dotnet/src/dotnetframework/GxClasses/Helpers/HttpHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
using System.Globalization;
using System.Linq;
using GeneXus.Http.Client;
using System.Net.Http.Headers;

namespace GeneXus.Http
{
Expand Down Expand Up @@ -687,7 +686,27 @@ internal static string JsonQuote(string value, bool addDoubleQuotes=false)
return "\"" + text + "\"";
}
}

#if !NETCORE
public static void SetSoapContext(GXSOAPContext value)
{
RequestMessageExtension ext = OperationContext.Current.Extensions.Find<RequestMessageExtension>();
if (ext == null)
{
ext = new RequestMessageExtension();
OperationContext.Current.Extensions.Add(ext);
}
ext.SOAPContext = value;
}
internal static GXSOAPContext GetSoapContext()
{
RequestMessageExtension ext = OperationContext.Current.Extensions.Find<RequestMessageExtension>();
if (ext != null)
{
return ext.SOAPContext;
}
return null;
}
#endif
}
#if NETCORE
public class HttpCookieCollection : Dictionary<string, HttpCookie>
Expand Down
Loading