Skip to content

Commit 7f1775c

Browse files
committed
Ported to .NET Standard 2.0
1 parent 52b82d7 commit 7f1775c

File tree

4 files changed

+25
-96
lines changed

4 files changed

+25
-96
lines changed

PriorityQueue.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.31321.278
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PriorityQueues", "PriorityQueues\PriorityQueues.csproj", "{3A937D8F-6DAC-4C9C-9889-1FA39FC0609B}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PriorityQueues", "PriorityQueues\PriorityQueues.csproj", "{68BC24ED-9C80-4BE1-8FBC-21E42AF7E1BD}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{3A937D8F-6DAC-4C9C-9889-1FA39FC0609B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{3A937D8F-6DAC-4C9C-9889-1FA39FC0609B}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{3A937D8F-6DAC-4C9C-9889-1FA39FC0609B}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{3A937D8F-6DAC-4C9C-9889-1FA39FC0609B}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{68BC24ED-9C80-4BE1-8FBC-21E42AF7E1BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{68BC24ED-9C80-4BE1-8FBC-21E42AF7E1BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{68BC24ED-9C80-4BE1-8FBC-21E42AF7E1BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{68BC24ED-9C80-4BE1-8FBC-21E42AF7E1BD}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE

PriorityQueues/BinaryHeapMappedPriorityQueue.cs renamed to PriorityQueues/MappedBinaryHeapPriorityQueue.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace PriorityQueues
77
{
8-
public class BinaryHeapMappedPriorityQueue<T> : IPriorityQueue<T> where T : IPriorityElement
8+
public class MappedBinaryHeapPriorityQueue<T> : IPriorityQueue<T> where T : IPriorityElement
99
{
1010
#region Private fields
1111
private List<T> _heap;
@@ -20,31 +20,31 @@ public class BinaryHeapMappedPriorityQueue<T> : IPriorityQueue<T> where T : IPri
2020

2121
#region Constructors
2222
/// <summary>
23-
/// Initializes a new instance of <see cref="BinaryHeapMappedPriorityQueue{T}"/> class that is empty and has the default initial capacity
23+
/// Initializes a new instance of <see cref="MappedBinaryHeapPriorityQueue{T}"/> class that is empty and has the default initial capacity
2424
/// </summary>
25-
public BinaryHeapMappedPriorityQueue()
25+
public MappedBinaryHeapPriorityQueue()
2626
{
2727
_heap = new List<T>();
2828

2929
_map = new Dictionary<T, List<int>>();
3030
}
3131

3232
/// <summary>
33-
/// Initializes a new instance of <see cref="BinaryHeapMappedPriorityQueue{T}"/> class that is empty and has the specified initial capacity
33+
/// Initializes a new instance of <see cref="MappedBinaryHeapPriorityQueue{T}"/> class that is empty and has the specified initial capacity
3434
/// </summary>
35-
/// <param name="capacity">The number of elements the <see cref="BinaryHeapMappedPriorityQueue{T}"/> can initially store</param>
36-
public BinaryHeapMappedPriorityQueue(int capacity)
35+
/// <param name="capacity">The number of elements the <see cref="MappedBinaryHeapPriorityQueue{T}"/> can initially store</param>
36+
public MappedBinaryHeapPriorityQueue(int capacity)
3737
{
3838
_heap = new List<T>(capacity);
3939

4040
_map = new Dictionary<T, List<int>>(capacity);
4141
}
4242

4343
/// <summary>
44-
/// Initializes a new instance of <see cref="BinaryHeapMappedPriorityQueue{T}"/> class that contains elements copied from the specified collection, sorted by their priority value
44+
/// Initializes a new instance of <see cref="MappedBinaryHeapPriorityQueue{T}"/> class that contains elements copied from the specified collection, sorted by their priority value
4545
/// </summary>
46-
/// <param name="collection">The collection whose elements are copied to the <see cref="BinaryHeapMappedPriorityQueue{T}"/></param>
47-
public BinaryHeapMappedPriorityQueue(IEnumerable<T> collection)
46+
/// <param name="collection">The collection whose elements are copied to the <see cref="MappedBinaryHeapPriorityQueue{T}"/></param>
47+
public MappedBinaryHeapPriorityQueue(IEnumerable<T> collection)
4848
{
4949
_heap = new List<T>(collection.Count());
5050

Lines changed: 11 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{3A937D8F-6DAC-4C9C-9889-1FA39FC0609B}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>PriorityQueue</RootNamespace>
11-
<AssemblyName>PriorityQueue</AssemblyName>
12-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<Deterministic>true</Deterministic>
3+
<TargetFramework>netstandard2.0</TargetFramework>
4+
<FileUpgradeFlags>
5+
</FileUpgradeFlags>
6+
<OldToolsVersion>2.0</OldToolsVersion>
7+
<UpgradeBackupLocation />
8+
<ProjectGuid>{68BC24ED-9C80-4BE1-8FBC-21E42AF7E1BD}</ProjectGuid>
159
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
10+
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
11+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
2412
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<DebugType>pdbonly</DebugType>
27-
<Optimize>true</Optimize>
28-
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
30-
<ErrorReport>prompt</ErrorReport>
31-
<WarningLevel>4</WarningLevel>
13+
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
14+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
3215
</PropertyGroup>
33-
<ItemGroup>
34-
<Reference Include="System" />
35-
<Reference Include="System.Core" />
36-
<Reference Include="System.Xml.Linq" />
37-
<Reference Include="System.Data.DataSetExtensions" />
38-
<Reference Include="Microsoft.CSharp" />
39-
<Reference Include="System.Data" />
40-
<Reference Include="System.Net.Http" />
41-
<Reference Include="System.Xml" />
42-
</ItemGroup>
43-
<ItemGroup>
44-
<Compile Include="IPriorityElement.cs" />
45-
<Compile Include="IPriorityQueue.cs" />
46-
<Compile Include="BinaryHeapMappedPriorityQueue.cs" />
47-
<Compile Include="BinaryHeapPriorityQueue.cs" />
48-
<Compile Include="Properties\AssemblyInfo.cs" />
49-
</ItemGroup>
50-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
5116
</Project>

PriorityQueues/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)