Skip to content

Commit 07ce8f3

Browse files
committed
Solution is now fully compilable.
1 parent 4889931 commit 07ce8f3

51 files changed

Lines changed: 393 additions & 1062 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,24 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" 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="15.0">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{4C4F3977-7327-4BBF-90ED-0C61172A48D4}</ProjectGuid>
8-
<OutputType>Exe</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>SharpRepository.Benchmarks.Configuration</RootNamespace>
11-
<AssemblyName>SharpRepository.Benchmarks.Configuration</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
3+
<TargetFramework>net462</TargetFramework>
4+
<Authors>Ben Griswold, Jeff Treuting</Authors>
5+
<Description>SharpRepository is a generic repository</Description>
6+
<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>
1517
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<PlatformTarget>AnyCPU</PlatformTarget>
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<PlatformTarget>AnyCPU</PlatformTarget>
28-
<DebugType>pdbonly</DebugType>
29-
<Optimize>true</Optimize>
30-
<OutputPath>bin\Release\</OutputPath>
31-
<DefineConstants>TRACE</DefineConstants>
32-
<ErrorReport>prompt</ErrorReport>
33-
<WarningLevel>4</WarningLevel>
34-
</PropertyGroup>
35-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
36-
<DebugSymbols>true</DebugSymbols>
37-
<OutputPath>bin\x64\Debug\</OutputPath>
38-
<DefineConstants>DEBUG;TRACE</DefineConstants>
39-
<DebugType>full</DebugType>
40-
<PlatformTarget>x64</PlatformTarget>
41-
<ErrorReport>prompt</ErrorReport>
42-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
43-
<Prefer32Bit>true</Prefer32Bit>
44-
</PropertyGroup>
45-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
46-
<OutputPath>bin\x64\Release\</OutputPath>
47-
<DefineConstants>TRACE</DefineConstants>
48-
<Optimize>true</Optimize>
49-
<DebugType>pdbonly</DebugType>
50-
<PlatformTarget>x64</PlatformTarget>
51-
<ErrorReport>prompt</ErrorReport>
52-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
53-
<Prefer32Bit>true</Prefer32Bit>
54-
</PropertyGroup>
55-
<ItemGroup>
56-
<Reference Include="System" />
57-
<Reference Include="System.Core" />
58-
<Reference Include="System.Xml.Linq" />
59-
<Reference Include="System.Data.DataSetExtensions" />
60-
<Reference Include="Microsoft.CSharp" />
61-
<Reference Include="System.Data" />
62-
<Reference Include="System.Xml" />
63-
</ItemGroup>
64-
<ItemGroup>
65-
<Compile Include="Models\User.cs" />
66-
<Compile Include="Program.cs" />
67-
<Compile Include="Properties\AssemblyInfo.cs" />
68-
<Compile Include="Repositories\UserRepository.cs" />
69-
</ItemGroup>
70-
<ItemGroup>
71-
<None Include="App.config" />
72-
<None Include="project.json" />
73-
</ItemGroup>
7418
<ItemGroup>
75-
<ProjectReference Include="..\SharpRepository.Caching.Memcached\SharpRepository.Caching.Memcached.csproj">
76-
<Project>{06111314-669B-4E35-A0B9-AF67FA3F0FFD}</Project>
77-
<Name>SharpRepository.Caching.Memcached</Name>
78-
</ProjectReference>
79-
<ProjectReference Include="..\SharpRepository.InMemoryRepository\SharpRepository.InMemoryRepository.csproj">
80-
<Project>{13ad3fca-4c9d-4674-b786-f30843638d3b}</Project>
81-
<Name>SharpRepository.InMemoryRepository</Name>
82-
</ProjectReference>
83-
<ProjectReference Include="..\SharpRepository.Ioc.StructureMap\SharpRepository.Ioc.StructureMap.csproj">
84-
<Project>{0b4bdc6d-6030-48fd-b22a-f9a9a7a00812}</Project>
85-
<Name>SharpRepository.Ioc.StructureMap</Name>
86-
</ProjectReference>
87-
<ProjectReference Include="..\SharpRepository.Repository\SharpRepository.Repository.csproj">
88-
<Project>{710dee79-25ce-4f68-b8b1-d08a135ad154}</Project>
89-
<Name>SharpRepository.Repository</Name>
90-
</ProjectReference>
19+
<ProjectReference Include="..\SharpRepository.Repository\SharpRepository.Repository.csproj" />
20+
<ProjectReference Include="..\SharpRepository.Caching.Memcached\SharpRepository.Caching.Memcached.csproj" />
21+
<ProjectReference Include="..\SharpRepository.InMemoryRepository\SharpRepository.InMemoryRepository.csproj" />
22+
<ProjectReference Include="..\SharpRepository.Ioc.StructureMap\SharpRepository.Ioc.StructureMap.csproj" />
9123
</ItemGroup>
92-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
93-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
94-
Other similar extension points exist, see Microsoft.Common.targets.
95-
<Target Name="BeforeBuild">
96-
</Target>
97-
<Target Name="AfterBuild">
98-
</Target>
99-
-->
10024
</Project>

SharpRepository.Benchmarks.Configuration/project.json

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

SharpRepository.Caching.AppFabric/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 17 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,24 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" 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="15.0">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{3583AEBE-F1B5-44D9-A0D2-4F6FA1F459CA}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>SharpRepository.Caching.AppFabric</RootNamespace>
11-
<AssemblyName>SharpRepository.Caching.AppFabric</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
3+
<TargetFramework>net462</TargetFramework>
4+
<Authors>Ben Griswold, Jeff Treuting</Authors>
5+
<Description>SharpRepository is a generic repository</Description>
6+
<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>
1517
</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>
24-
<Prefer32Bit>false</Prefer32Bit>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<DebugType>pdbonly</DebugType>
28-
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
30-
<DefineConstants>TRACE</DefineConstants>
31-
<ErrorReport>prompt</ErrorReport>
32-
<WarningLevel>4</WarningLevel>
33-
<Prefer32Bit>false</Prefer32Bit>
34-
</PropertyGroup>
35-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
36-
<DebugSymbols>true</DebugSymbols>
37-
<OutputPath>bin\x64\Debug\</OutputPath>
38-
<DefineConstants>DEBUG;TRACE</DefineConstants>
39-
<DebugType>full</DebugType>
40-
<PlatformTarget>x64</PlatformTarget>
41-
<ErrorReport>prompt</ErrorReport>
42-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
43-
</PropertyGroup>
44-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
45-
<OutputPath>bin\x64\Release\</OutputPath>
46-
<DefineConstants>TRACE</DefineConstants>
47-
<Optimize>true</Optimize>
48-
<DebugType>pdbonly</DebugType>
49-
<PlatformTarget>x64</PlatformTarget>
50-
<ErrorReport>prompt</ErrorReport>
51-
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
52-
</PropertyGroup>
53-
<ItemGroup>
54-
<Reference Include="System" />
55-
<Reference Include="System.Core" />
56-
<Reference Include="System.Runtime.Caching" />
57-
</ItemGroup>
58-
<ItemGroup>
59-
<Compile Include="AppFabricCachingProvider.cs" />
60-
<Compile Include="Properties\AssemblyInfo.cs" />
61-
</ItemGroup>
6218
<ItemGroup>
63-
<ProjectReference Include="..\SharpRepository.Repository\SharpRepository.Repository.csproj">
64-
<Project>{710dee79-25ce-4f68-b8b1-d08a135ad154}</Project>
65-
<Name>SharpRepository.Repository</Name>
66-
</ProjectReference>
19+
<PackageReference Include="ServerAppFabric.Client" Version="1.1.2106.32" />
6720
</ItemGroup>
6821
<ItemGroup>
69-
<None Include="project.json" />
22+
<ProjectReference Include="..\SharpRepository.Repository\SharpRepository.Repository.csproj" />
7023
</ItemGroup>
71-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
72-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
73-
Other similar extension points exist, see Microsoft.Common.targets.
74-
<Target Name="BeforeBuild">
75-
</Target>
76-
<Target Name="AfterBuild">
77-
</Target>
78-
-->
7924
</Project>

SharpRepository.Caching.AppFabric/project.json

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

SharpRepository.Caching.Memcached/MemCachedCachingProvider.cs

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
using Enyim.Caching.Memcached;
55
using SharpRepository.Repository.Caching;
66
using Microsoft.Extensions.Caching.Memory;
7+
using Microsoft.Extensions.Logging;
8+
using Microsoft.Extensions.Options;
79

810
namespace SharpRepository.Caching.Memcached
911
{
@@ -13,46 +15,22 @@ namespace SharpRepository.Caching.Memcached
1315
public class MemcachedCachingProvider : ICachingProvider
1416
{
1517
protected MemcachedClient Client { get; set; }
16-
18+
1719
/// <summary>
1820
/// Initializes a new instance of the <see cref="MemcachedCachingProvider"/> class with the default settings based on the configuration file default section.
1921
/// </summary>
20-
public MemcachedCachingProvider()
21-
{
22-
Client = new MemcachedClient();
23-
}
24-
25-
/// <summary>
26-
/// Initializes a new instance of the <see cref="MemcachedCachingProvider"/> class from a specific configuration section settings
27-
/// </summary>
28-
/// <param name="configSectionName">Name of the configuration file section.</param>
29-
public MemcachedCachingProvider(string configSectionName)
22+
public MemcachedCachingProvider(ILoggerFactory loggerFactory, IMemcachedClientConfiguration configuration)
3023
{
31-
if (String.IsNullOrEmpty(configSectionName)) throw new ArgumentNullException("configSectionName");
32-
33-
Client = new MemcachedClient(configSectionName);
24+
Client = new MemcachedClient(loggerFactory, configuration);
3425
}
35-
26+
3627
/// <summary>
3728
/// Initializes a new instance of the <see cref="MemcachedCachingProvider"/> class with an already instantiated <see cref="MemcachedClient"/>.
3829
/// </summary>
3930
/// <param name="memcachedClient">Instantiated client already configured</param>
4031
public MemcachedCachingProvider(MemcachedClient memcachedClient)
4132
{
42-
if (memcachedClient == null) throw new ArgumentNullException("memcachedClient");
43-
44-
Client = memcachedClient;
45-
}
46-
47-
/// <summary>
48-
/// Initializes a new instance of the <see cref="MemcachedCachingProvider"/> class with a custom configuration provided.
49-
/// </summary>
50-
/// <param name="configuration">Memcached configuration object</param>
51-
public MemcachedCachingProvider(IMemcachedClientConfiguration configuration)
52-
{
53-
if (configuration == null) throw new ArgumentNullException("configuration");
54-
55-
Client = new MemcachedClient(configuration);
33+
Client = memcachedClient ?? throw new ArgumentNullException("memcachedClient");
5634
}
5735

5836
/// <summary>
@@ -63,14 +41,13 @@ public MemcachedCachingProvider(IMemcachedClientConfiguration configuration)
6341
/// <param name="username">Provide username if authentication is needed</param>
6442
/// <param name="password">Provide password if authentication is needed</param>
6543
/// <param name="authenticationType">Defaults to typeof (PlainTextAuthenticator) if username or password provided</param>
66-
public MemcachedCachingProvider(string host, int port, string username = null, string password = null, Type authenticationType = null)
44+
public MemcachedCachingProvider(ILoggerFactory loggerFactory, string host, int port, string username = null, string password = null, Type authenticationType = null)
6745
{
6846
if (String.IsNullOrEmpty(host)) throw new ArgumentNullException("host");
6947

70-
var config = new MemcachedClientConfiguration
71-
{
72-
Protocol = MemcachedProtocol.Binary
73-
};
48+
IOptions<MemcachedClientOptions> options = Options.Create(new RuntimeOptions());
49+
var config = new MemcachedClientConfiguration(loggerFactory, options);
50+
config.Protocol = MemcachedProtocol.Binary;
7451
config.AddServer(host, port);
7552

7653
if (!String.IsNullOrEmpty(username) || !String.IsNullOrEmpty(password))
@@ -80,7 +57,7 @@ public MemcachedCachingProvider(string host, int port, string username = null, s
8057
config.Authentication.Parameters["password"] = password;
8158
}
8259

83-
Client = new MemcachedClient(config);
60+
Client = new MemcachedClient(loggerFactory, config);
8461
}
8562

8663
/// <summary>

0 commit comments

Comments
 (0)