project restructured

This commit is contained in:
frauseo 2020-05-23 12:43:07 +02:00
parent e6e797f640
commit 5090f819f1
14 changed files with 57 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.352
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DuplicateCheckerLib", "DuplicateCheckerLib\DuplicateCheckerLib.csproj", "{17DFFFC5-D41F-4C9B-99AD-3A14920152DB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{17DFFFC5-D41F-4C9B-99AD-3A14920152DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17DFFFC5-D41F-4C9B-99AD-3A14920152DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17DFFFC5-D41F-4C9B-99AD-3A14920152DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17DFFFC5-D41F-4C9B-99AD-3A14920152DB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A67D4C42-99C6-4966-8AAB-083C0B66A643}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,17 @@
using System.Collections.Generic;
namespace DuplicateCheckerLib {
public class DuplicateChecker {
public IEnumerable<IEntity> FindDuplicates(IEnumerable<IEntity> list) {
var hashSet = new HashSet<IEntity>();
var ret = new List<IEntity>();
foreach (var item in list) {
if (!hashSet.Add(item)) {
ret.Add(item);
}
}
return ret;
}
}
}

View File

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,8 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace DuplicateCheckerLib {
public interface IEntity {
}
}