Skip to content

Commit 6ec067a

Browse files
authored
Merge pull request #1420 from Unity-Technologies/unity-master-remove-netstandard-dep-system-web
Move HttpUtility to System in unityjit.
2 parents ea11507 + 08654df commit 6ec067a

File tree

9 files changed

+25
-5
lines changed

9 files changed

+25
-5
lines changed

mcs/class/System.Web/Assembly/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
[assembly: WebResource ("WebUIValidation_2.0.js", "text/javascript")]
141141
#endif
142142

143-
#if UNITY_AOT && FULL_AOT_RUNTIME
143+
#if (UNITY_AOT && FULL_AOT_RUNTIME) || UNITY_JIT
144144
[assembly: TypeForwardedTo (typeof (System.Web.HttpUtility))]
145145
[assembly: TypeForwardedTo (typeof (System.Web.Util.HttpEncoder))]
146146
#endif

mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
using System.Web.Configuration;
4040
using System.IO;
4141

42+
#if UNITY_JIT
43+
using Compiler=System.Web.Configuration.Compiler;
44+
#endif
45+
4246
namespace System.Web.Compilation
4347
{
4448
abstract class BaseCompiler

mcs/class/System.Web/System.Web.Compilation/BuildManager.cs

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
using System.Web.Util;
5050
using System.Runtime.Versioning;
5151

52+
#if UNITY_JIT
53+
using Compiler=System.Web.Configuration.Compiler;
54+
#endif
55+
5256
namespace System.Web.Compilation
5357
{
5458
public sealed class BuildManager

mcs/class/System.Web/System.Web.Util/HttpEncoder.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@
3030
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
3131
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3232
//
33+
3334
using System;
3435
using System.Collections.Generic;
3536
using System.Configuration;
3637
using System.IO;
3738
using System.Text;
38-
#if !NO_SYSTEM_WEB_DEPENDENCY && !MOBILE
39+
#if !NO_SYSTEM_WEB_DEPENDENCY && !MOBILE && !UNITY_JIT
3940
using System.Web.Configuration;
4041
#endif
4142

@@ -163,7 +164,7 @@ protected internal virtual byte[] UrlEncode (byte[] bytes, int offset, int count
163164

164165
static HttpEncoder GetCustomEncoderFromConfig ()
165166
{
166-
#if MOBILE || NO_SYSTEM_WEB_DEPENDENCY
167+
#if MOBILE || NO_SYSTEM_WEB_DEPENDENCY || UNITY_JIT
167168
return defaultEncoder.Value;
168169
#else
169170
var cfg = HttpRuntime.Section;

mcs/class/System.Web/System.Web/HttpUtility.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ public static string HtmlEncode (object value)
511511
if (value == null)
512512
return null;
513513

514-
#if !(MOBILE || NO_SYSTEM_WEB_DEPENDENCY)
514+
#if !(MOBILE || NO_SYSTEM_WEB_DEPENDENCY || UNITY_JIT)
515515
IHtmlString htmlString = value as IHtmlString;
516516
if (htmlString != null)
517517
return htmlString.ToHtmlString ();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
System.Web/HttpUtility.cs
2+
System.Web.Util/Helpers.cs
3+
System.Web.Util/HttpEncoder.cs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include System.Web.dll.sources

mcs/class/System/Assembly/AssemblyInfo.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,8 @@
8181

8282
#if XAMMAC || XAMMAC_4_5
8383
[assembly: InternalsVisibleTo ("Xamarin.Mac, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")]
84-
#endif
84+
#endif
85+
86+
#if UNITY_JIT
87+
[assembly: InternalsVisibleTo ("System.Web, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
88+
#endif
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
#include net_4_x_System.dll.sources
2+
../System.Web/System.Web/HttpUtility.cs
3+
../System.Web/System.Web.Util/Helpers.cs
4+
../System.Web/System.Web.Util/HttpEncoder.cs

0 commit comments

Comments
 (0)