diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/HtmlWebResponseObject.Common.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/HtmlWebResponseObject.Common.cs
index 6589b8ffe1..e07f4477be 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/HtmlWebResponseObject.Common.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/HtmlWebResponseObject.Common.cs
@@ -1,18 +1,17 @@
+#if !CORECLR
/********************************************************************++
-Copyright(c) Microsoft Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
using System.Management.Automation;
using System.Text.RegularExpressions;
using System.Collections.Generic;
+using mshtml;
using System.Diagnostics;
using System.Threading;
using ExecutionContext = System.Management.Automation.ExecutionContext;
-#if !CORECLR
-using mshtml;
-#endif
namespace Microsoft.PowerShell.Commands
{
@@ -28,7 +27,6 @@ namespace Microsoft.PowerShell.Commands
///
public new string Content { get; private set; }
-#if !CORECLR
// The HTML document
private IHTMLDocument2 _parsedHtml;
@@ -43,10 +41,10 @@ namespace Microsoft.PowerShell.Commands
// The exception thrown during the parsing
private Exception _parsingException;
-#endif
+
// The current execution context
private readonly ExecutionContext _executionContext;
-#if !CORECLR
+
// The flag that notifies the worker thread to stop loading the document
private bool _stopWorkerThread;
@@ -221,19 +219,19 @@ namespace Microsoft.PowerShell.Commands
return _allElements;
}
}
-#endif
- #endregion Properties
+ #endregion Properties
+
#region Private Fields
-#if !CORECLR
+
private static Regex _tagRegex;
private static Regex _attribsRegex;
private static Regex _attribNameValueRegex;
-#endif
+
#endregion Private Fields
#region Methods
-#if !CORECLR
+
// The "onreadystatechange" event handler
private void ReadyStateChanged(IHTMLEventObj obj)
{
@@ -454,7 +452,7 @@ namespace Microsoft.PowerShell.Commands
{
return (null == element ? null : element.id);
}
-#endif
+
///
/// Reads the response content from the web response.
///
@@ -472,9 +470,8 @@ namespace Microsoft.PowerShell.Commands
this.Content = string.Empty;
}
}
-
#endregion Methods
-#if !CORECLR
+
///
/// Dispose the the instance of the class.
///
@@ -509,6 +506,6 @@ namespace Microsoft.PowerShell.Commands
System.Runtime.InteropServices.Marshal.ReleaseComObject(_parsedHtml);
}
}
-#endif
}
}
+#endif
\ No newline at end of file
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebRequestPSCmdlet.CoreClr.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebRequestPSCmdlet.CoreClr.cs
index 397f50c9fa..a13f99406e 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebRequestPSCmdlet.CoreClr.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebRequestPSCmdlet.CoreClr.cs
@@ -226,7 +226,7 @@ namespace Microsoft.PowerShell.Commands
content = psBody.BaseObject;
}
- /*
+ /* TODO: This needs to be enable after the dependency on mshtml is resolved.
var html = content as HtmlWebResponseObject;
if (html != null)
{
@@ -236,8 +236,10 @@ namespace Microsoft.PowerShell.Commands
SetRequestContent(request, html.Forms[0].Fields);
}
}
- */
else if (content is FormObject)
+ */
+
+ if (content is FormObject)
{
FormObject form = content as FormObject;
SetRequestContent(request, form.Fields);
@@ -533,7 +535,7 @@ namespace Microsoft.PowerShell.Commands
}
- #endregion Helper Methods
+#endregion Helper Methods
}
}
#endif
\ No newline at end of file
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebResponseObjectFactory.CoreClr.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebResponseObjectFactory.CoreClr.cs
index 8eb411fe97..f706ae5a14 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebResponseObjectFactory.CoreClr.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/WebResponseObjectFactory.CoreClr.cs
@@ -17,14 +17,17 @@ namespace Microsoft.PowerShell.Commands
WebResponseObject output;
if (WebResponseHelper.IsText(response))
{
- if (useBasicParsing)
- {
- output = new BasicHtmlWebResponseObject(response, responseStream);
- }
- else
- {
- output = new HtmlWebResponseObject(response, responseStream, executionContext);
- }
+ output = new BasicHtmlWebResponseObject(response, responseStream);
+
+ // TODO: This code needs to be enable after the dependency on mshtml is resolved.
+ //if (useBasicParsing)
+ //{
+ // output = new BasicHtmlWebResponseObject(response, responseStream);
+ //}
+ //else
+ //{
+ // output = new HtmlWebResponseObject(response, responseStream, executionContext);
+ //}
}
else
{
diff --git a/src/Microsoft.PowerShell.Commands.Utility/project.json b/src/Microsoft.PowerShell.Commands.Utility/project.json
index fa2a8851fc..af085ef54c 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/project.json
+++ b/src/Microsoft.PowerShell.Commands.Utility/project.json
@@ -54,6 +54,7 @@
"commands/utility/WebCmdlet/FullClr/WebResponseHelper.FullClr.cs",
"commands/utility/WebCmdlet/FullClr/WebResponseObject.FullClr.cs",
"commands/utility/WebCmdlet/FullClr/WebResponseObjectFactory.FullClr.cs",
+ "commands/utility/WebCmdlet/CoreCLR/HtmlWebResponseObject.CoreClr.cs",
"gen/FormatAndOut_out_gridview.cs",
"gen/ImplicitRemotingStrings.cs",