Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer committed Jan 17, 2019
1 parent 88283d0 commit 2d09a60
Show file tree
Hide file tree
Showing 26 changed files with 10 additions and 581 deletions.
2 changes: 1 addition & 1 deletion src/Microsoft.DotNet.XUnitConsoleRunner/src/CommandLine.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down
20 changes: 0 additions & 20 deletions src/Microsoft.DotNet.XUnitConsoleRunner/src/ConsoleRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,25 +168,7 @@ List<IRunnerReporter> GetAvailableRunnerReporters()

void PrintHeader()
{
#if NET452
var platform = $"Desktop .NET 4.5.2, runtime: {Environment.Version}";
#elif NET46
var platform = $"Desktop .NET 4.6, runtime: {Environment.Version}";
#elif NET461
var platform = $"Desktop .NET 4.6.1, runtime: {Environment.Version}";
#elif NET462
var platform = $"Desktop .NET 4.6.2, runtime: {Environment.Version}";
#elif NET47
var platform = $"Desktop .NET 4.7, runtime: {Environment.Version}";
#elif NET471
var platform = $"Desktop .NET 4.7.1, runtime: {Environment.Version}";
#elif NET472
var platform = $"Desktop .NET 4.7.2, runtime: {Environment.Version}";
#elif NETCOREAPP
var platform = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;
#else
#error Unknown target platform
#endif
var versionAttribute = typeof(ConsoleRunner).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();

Console.WriteLine($"xUnit.net Console Runner v{versionAttribute.InformationalVersion} ({IntPtr.Size * 8}-bit {platform})");
Expand Down Expand Up @@ -248,9 +230,7 @@ void PrintUsage(IReadOnlyList<IRunnerReporter> reporters)
Console.WriteLine(" : if specified more than once, acts as an AND operation");
Console.WriteLine(" -noautoreporters : do not allow reporters to be auto-enabled by environment");
Console.WriteLine(" : (for example, auto-detecting TeamCity or AppVeyor)");
#if NETCOREAPP
Console.WriteLine(" -framework \"name\" : set the target framework");
#endif
Console.WriteLine();

var switchableReporters = reporters.Where(r => !string.IsNullOrWhiteSpace(r.RunnerSwitch)).ToList();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using Xunit.Abstractions;

namespace Xunit.ConsoleClient
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<!-- Lowest supported version -->
<XunitConsolePath>$(MSBuildThisFileDirectory)..\tools\net452\xunit.console.exe</XunitConsolePath>
<XunitConsolePathX86>$(MSBuildThisFileDirectory)..\tools\net452\xunit.console.x86.exe</XunitConsolePathX86>

<!-- Version specific -->
<XunitConsole452Path>$(MSBuildThisFileDirectory)..\tools\net452\xunit.console.exe</XunitConsole452Path>
<XunitConsole452PathX86>$(MSBuildThisFileDirectory)..\tools\net452\xunit.console.x86.exe</XunitConsole452PathX86>
<XunitConsole46Path>$(MSBuildThisFileDirectory)..\tools\net46\xunit.console.exe</XunitConsole46Path>
<XunitConsole46PathX86>$(MSBuildThisFileDirectory)..\tools\net46\xunit.console.x86.exe</XunitConsole46PathX86>
<XunitConsole461Path>$(MSBuildThisFileDirectory)..\tools\net461\xunit.console.exe</XunitConsole461Path>
<XunitConsole461PathX86>$(MSBuildThisFileDirectory)..\tools\net461\xunit.console.x86.exe</XunitConsole461PathX86>
<XunitConsole462Path>$(MSBuildThisFileDirectory)..\tools\net462\xunit.console.exe</XunitConsole462Path>
<XunitConsole462PathX86>$(MSBuildThisFileDirectory)..\tools\net462\xunit.console.x86.exe</XunitConsole462PathX86>
<XunitConsole47Path>$(MSBuildThisFileDirectory)..\tools\net47\xunit.console.exe</XunitConsole47Path>
<XunitConsole47PathX86>$(MSBuildThisFileDirectory)..\tools\net47\xunit.console.x86.exe</XunitConsole47PathX86>
<XunitConsole471Path>$(MSBuildThisFileDirectory)..\tools\net471\xunit.console.exe</XunitConsole471Path>
<XunitConsole471PathX86>$(MSBuildThisFileDirectory)..\tools\net471\xunit.console.x86.exe</XunitConsole471PathX86>
<XunitConsole472Path>$(MSBuildThisFileDirectory)..\tools\net472\xunit.console.exe</XunitConsole472Path>
<XunitConsole472PathX86>$(MSBuildThisFileDirectory)..\tools\net472\xunit.console.x86.exe</XunitConsole472PathX86>

<!-- Lowest supported version -->
<XunitConsoleNetCoreAppPath>$(MSBuildThisFileDirectory)..\tools\netcoreapp1.0\xunit.console.dll</XunitConsoleNetCoreAppPath>

<!-- Version specific -->
<XunitConsoleNetCore1AppPath>$(MSBuildThisFileDirectory)..\tools\netcoreapp1.0\xunit.console.dll</XunitConsoleNetCore1AppPath>
<XunitConsoleNetCore2AppPath>$(MSBuildThisFileDirectory)..\tools\netcoreapp2.0\xunit.console.dll</XunitConsoleNetCore2AppPath>
</PropertyGroup>

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETSTANDARD1_1 || NETSTANDARD1_5 || WINDOWS_UAP
#if WINDOWS_UAP

using System;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETCOREAPP
#if NETCOREAPP

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ private static string GetApplicationBasePath()
}
}

#endif
#endif
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Collections.Generic;
using System.Runtime.CompilerServices;

namespace Internal.Microsoft.DotNet.PlatformAbstractions
Expand Down Expand Up @@ -35,20 +34,6 @@ public void Add(string s)
Add(hashCode);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Add(object o)
{
var hashCode = (o != null) ? o.GetHashCode() : 0;
Add(hashCode);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Add<TValue>(TValue value, IEqualityComparer<TValue> comparer)
{
var hashCode = value != null ? comparer.GetHashCode(value) : 0;
Add(hashCode);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static HashCodeCombiner Start()
{
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,6 @@ public CompilationLibrary(string type,
new PackageCompilationAssemblyResolver()
});

public IEnumerable<string> ResolveReferencePaths()
{
var assemblies = new List<string>();

return ResolveReferencePaths(DefaultResolver, assemblies);
}

public IEnumerable<string> ResolveReferencePaths(params ICompilationAssemblyResolver[] customResolvers)
{
var assemblies = new List<string>();

if (customResolvers?.Length > 0)
{
foreach (var resolver in customResolvers)
{
if (resolver.TryResolveAssemblyPaths(this, assemblies))
{
return assemblies;
}
}
}

return ResolveReferencePaths(DefaultResolver, assemblies);
}

private IEnumerable<string> ResolveReferencePaths(ICompilationAssemblyResolver resolver, List<string> assemblies)
{
if (!resolver.TryResolveAssemblyPaths(this, assemblies))
Expand Down
Loading

0 comments on commit 2d09a60

Please sign in to comment.