Skip to content

Commit

Permalink
Removed IXPathNavigable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh Jain committed Oct 25, 2017
1 parent 038ef1b commit 12287c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public static Dictionary<string, object> GetTestRunParameters(string settingsXml
/// </returns>
[SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver",
Justification = "XmlReaderSettings.XmlResolver is not available in core. Suppress until fxcop issue is fixed.")]
public static IXPathNavigable CreateDefaultRunSettings()
public static XmlDocument CreateDefaultRunSettings()
{
// Create a new default xml doc that looks like this:
// <?xml version="1.0" encoding="utf-8"?>
Expand All @@ -209,15 +209,7 @@ public static IXPathNavigable CreateDefaultRunSettings()
var dataCollectorsNode = doc.CreateElement(Constants.DataCollectorsSettingName);
dataCollectionRunSettingsNode.AppendChild(dataCollectorsNode);

var ret = doc as IXPathNavigable;
if (ret == null)
{
#if !NET451
return doc.ToXPathNavigable();
#endif
}

return ret;
return doc;
}

/// <summary>
Expand Down
14 changes: 7 additions & 7 deletions src/Microsoft.TestPlatform.Utilities/InferRunSettingsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ public static string MakeRunsettingsCompatible(string runsettingsXml)
/// <summary>
/// Updates the run settings XML with the specified values.
/// </summary>
/// <param name="runSettingsDocument"> The XmlDocument of the XML. </param>
/// <param name="architecture"> The architecture. </param>
/// <param name="framework"> The framework. </param>
/// <param name="resultsDirectory"> The results directory. </param>
/// <param name="runSettingsDocument">XmlDocument of runsettings xml. </param>
/// <param name="architecture">The architecture. </param>
/// <param name="framework">The framework. </param>
/// <param name="resultsDirectory">The results directory. </param>
public static void UpdateRunSettingsWithUserProvidedSwitches(XmlDocument runSettingsDocument, Architecture architecture, Framework framework, string resultsDirectory)
{
var runSettingsNavigator = runSettingsDocument.CreateNavigator();
Expand Down Expand Up @@ -178,7 +178,7 @@ public static void UpdateRunSettingsWithUserProvidedSwitches(XmlDocument runSett
/// <summary>
/// Updates the <c>RunConfiguration.DesignMode</c> value for a run settings. Doesn't do anything if the value is already set.
/// </summary>
/// <param name="runSettingsDocument">Document for runsettings xml</param>
/// <param name="runSettingsDocument">XmlDocument for runsettings xml</param>
/// <param name="designModeValue">Value to set</param>
public static void UpdateDesignMode(XmlDocument runSettingsDocument, bool designModeValue)
{
Expand All @@ -188,7 +188,7 @@ public static void UpdateDesignMode(XmlDocument runSettingsDocument, bool design
/// <summary>
/// Updates the <c>RunConfiguration.CollectSourceInformation</c> value for a run settings. Doesn't do anything if the value is already set.
/// </summary>
/// <param name="runSettingsDocument">Navigator for runsettings xml</param>
/// <param name="runSettingsDocument">XmlDocument for runsettings xml</param>
/// <param name="collectSourceInformationValue">Value to set</param>
public static void UpdateCollectSourceInformation(XmlDocument runSettingsDocument, bool collectSourceInformationValue)
{
Expand Down Expand Up @@ -219,7 +219,7 @@ public static void UpdateTargetFramework(XmlDocument runSettingsDocument, string
/// <summary>
/// Updates the <c>RunConfiguration.TargetPlatform</c> value for a run settings. if the value is already set, behavior depends on overwrite.
/// </summary>
/// <param name="runSettingsDocument">Navigator for runsettings xml</param>
/// <param name="runSettingsDocument">XmlDocument for runsettings xml</param>
/// <param name="platform">Value to set</param>
/// <param name="overwrite">Overwrite option.</param>
public static void UpdateTargetPlatform(XmlDocument runSettingsDocument, string platform, bool overwrite = false)
Expand Down

0 comments on commit 12287c1

Please sign in to comment.