Remove unused references to System.Data and System.XML.

This commit is contained in:
Paul Chote
2019-02-24 14:38:26 +00:00
parent 4886cca5d3
commit dad21fe879
3 changed files with 1 additions and 41 deletions

View File

@@ -41,7 +41,7 @@ SDK ?=
CSC = mcs $(SDK)
CSFLAGS = -nologo -warn:4 -codepage:utf8 -langversion:5 -unsafe -warnaserror
DEFINE = TRACE
COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExtensions.dll System.Numerics.dll System.Xml.dll thirdparty/download/ICSharpCode.SharpZipLib.dll thirdparty/download/FuzzyLogicLibrary.dll thirdparty/download/MaxMind.Db.dll thirdparty/download/Eluant.dll thirdparty/download/rix0rrr.BeaconLib.dll
COMMON_LIBS = System.dll System.Core.dll System.Numerics.dll thirdparty/download/ICSharpCode.SharpZipLib.dll thirdparty/download/FuzzyLogicLibrary.dll thirdparty/download/MaxMind.Db.dll thirdparty/download/Eluant.dll thirdparty/download/rix0rrr.BeaconLib.dll
NUNIT_LIBS_PATH :=
NUNIT_LIBS := $(NUNIT_LIBS_PATH)nunit.framework.dll

View File

@@ -46,9 +46,6 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Eluant">
<HintPath>..\thirdparty\download\Eluant.dll</HintPath>
<Private>False</Private>

View File

@@ -11,48 +11,11 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
namespace OpenRA.Mods.Common.UtilityCommands
{
public static class Extensions
{
public static string ToCharacterSeparatedValues(this DataTable table, string delimiter, bool includeHeader)
{
var result = new StringBuilder();
if (includeHeader)
{
foreach (DataColumn column in table.Columns)
{
result.Append(column.ColumnName);
result.Append(delimiter);
}
result.Remove(result.Length, 0);
result.AppendLine();
}
foreach (DataRow row in table.Rows)
{
for (var x = 0; x < table.Columns.Count; x++)
{
if (x != 0)
result.Append(delimiter);
result.Append(row[table.Columns[x]]);
}
result.AppendLine();
}
result.Remove(result.Length, 0);
result.AppendLine();
return result.ToString();
}
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
{
var knownKeys = new HashSet<TKey>();