Skip to content

Commit 93997f1

Browse files
committed
Benchmark can run .NET Core 2.0
1 parent 8468725 commit 93997f1

3 files changed

Lines changed: 32 additions & 17 deletions

File tree

SharpRepository.Benchmarks.Configuration/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using SharpRepository.Repository;
1010
using SharpRepository.Repository.Configuration;
1111
using StructureMap;
12-
using StructureMap.Graph;
1312
using SharpRepository.Ioc.StructureMap;
1413
using Microsoft.Extensions.Configuration;
1514

@@ -115,7 +114,7 @@ public Benchmarks()
115114

116115
var config = new ConfigurationBuilder()
117116
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
118-
.AddJsonFile("appsettings.json")
117+
.AddJsonFile("repository.json")
119118
.Build();
120119

121120
var sectionName = "sharpRepository";
@@ -142,7 +141,7 @@ public static void CreateFromConfigFile()
142141
{
143142
var config = new ConfigurationBuilder()
144143
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
145-
.AddJsonFile("appsettings.json")
144+
.AddJsonFile("repository.json")
146145
.Build();
147146

148147
var sectionName = "sharpRepository";

SharpRepository.Benchmarks.Configuration/SharpRepository.Benchmarks.Configuration.csproj

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
22
<PropertyGroup>
3-
<TargetFramework>net461</TargetFramework>
4-
<Authors>Ben Griswold, Jeff Treuting</Authors>
5-
<Description>SharpRepository is a generic repository</Description>
3+
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
4+
<Authors>Ben Griswold, Jeff Treuting</Authors>
5+
<Description>SharpRepository performance test</Description>
66
<Summary>Written in C#, includes support for various relational, document and object databases including Entity Framework, RavenDB, MongoDB, CouchDB and Db4o. SharpRepository includes Xml and InMemory repository implementations as well. SharpRepository offers built-in caching options for AppFabric, memcached and the standard System.Runtime.Caching. SharpRepository also supports Specifications, FetchStrategies, Batches and Traits!</Summary>
7-
<PackageId>SharpRepository.Caching.AppFabric</PackageId>
8-
<PackageVersion>2.0.0-alpha2</PackageVersion>
9-
<PackageReleaseNotes>2.0.0-alpha2: merge all code</PackageReleaseNotes>
10-
<PackageTags>SharpRepository Repository Cache AppFabric</PackageTags>
11-
<PackageIconUrl>https://user-images.githubusercontent.com/6349515/28491142-7b6350c4-6eeb-11e7-9c5b-e3b8ef1e73b8.png</PackageIconUrl>
12-
<PackageProjectUrl>https://github.com/SharpRepository/SharpRepository</PackageProjectUrl>
13-
<PackageLicenseUrl>https://raw.githubusercontent.com/SharpRepository/SharpRepository/master/license.txt</PackageLicenseUrl>
14-
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
15-
<RepositoryUrl>https://github.com/SharpRepository/SharpRepository.git</RepositoryUrl>
16-
<RepositoryType>git</RepositoryType>
7+
<RepositoryType>git</RepositoryType>
8+
<ApplicationIcon />
9+
<OutputType>Exe</OutputType>
10+
<StartupObject>SharpRepository.Benchmarks.Configuration.Program</StartupObject>
11+
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
1712
</PropertyGroup>
13+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
14+
<PlatformTarget>AnyCPU</PlatformTarget>
15+
</PropertyGroup>
16+
<ItemGroup>
17+
<None Remove="repository.json" />
18+
</ItemGroup>
19+
<ItemGroup>
20+
<Content Include="repository.json">
21+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
22+
<Pack>true</Pack>
23+
</Content>
24+
</ItemGroup>
1825
<ItemGroup>
1926
<ProjectReference Include="..\SharpRepository.Repository\SharpRepository.Repository.csproj" />
20-
<ProjectReference Include="..\SharpRepository.Caching.Memcached\SharpRepository.Caching.Memcached.csproj" />
2127
<ProjectReference Include="..\SharpRepository.InMemoryRepository\SharpRepository.InMemoryRepository.csproj" />
2228
<ProjectReference Include="..\SharpRepository.Ioc.StructureMap\SharpRepository.Ioc.StructureMap.csproj" />
2329
</ItemGroup>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"sharpRepository": {
3+
"repositories": {
4+
"default": "inMemory",
5+
"inMemory": {
6+
"factory": "SharpRepository.InMemoryRepository.InMemoryConfigRepositoryFactory, SharpRepository.InMemoryRepository"
7+
}
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)