Skip to content

Commit a70c1f0

Browse files
authored
Merge pull request #49 from dotnetcore/dev
Upgrading dependencies And Release A New Version.
2 parents 20868fb + a9c3b9f commit a70c1f0

File tree

9 files changed

+145
-56
lines changed

9 files changed

+145
-56
lines changed

appveyor.yml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: 1.0.{build}
2-
image: Visual Studio 2017
2+
image: Visual Studio 2017 Preview
33
configuration: Release
44
clone_folder: C:\projects\easycaching\
55

@@ -18,8 +18,9 @@ skip_commits:
1818
- .gitignore
1919

2020
install:
21-
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1" -OutFile "dotnet-install.ps1"
22-
- ps: .\dotnet-install.ps1 --Version 2.1.301
21+
#- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1" -OutFile "dotnet-install.ps1"
22+
#- ps: .\dotnet-install.ps1 --Version 2.1.301
23+
#- ps: dotnet --info
2324
- cmd: >-
2425
cd C:\projects\easycaching\tools\RedisConfigs\3.0.503
2526
@@ -41,25 +42,25 @@ build:
4142
parallel: true
4243
verbosity: minimal
4344

44-
#test_script:
45-
#- cmd: >-
46-
# dotnet test -c Release --no-build .\test\EasyCaching.UnitTests\EasyCaching.UnitTests.csproj
47-
before_test:
48-
- ps: >-
49-
nuget install coveralls.net -Version 0.7.0 -OutputDirectory tools
45+
test_script:
46+
- cmd: >-
47+
dotnet test -c Release --no-build .\test\EasyCaching.UnitTests\EasyCaching.UnitTests.csproj
48+
#before_test:
49+
#- ps: >-
50+
# nuget install coveralls.net -Version 0.7.0 -OutputDirectory tools
5051

51-
nuget install OpenCover -Version 4.6.519 -OutputDirectory tools
52+
# nuget install OpenCover -Version 4.6.519 -OutputDirectory tools
5253

53-
test_script:
54-
- ps: tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:" test test\EasyCaching.UnitTests\EasyCaching.UnitTests.csproj -c Debug /p:DebugType=full" -register:user -filter:"+[EasyCaching*]* -[EasyCaching*Tests]*" -oldstyle -returntargetcode -output:coverage.xml
54+
#test_script:
55+
#- ps: tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:" test test\EasyCaching.UnitTests\EasyCaching.UnitTests.csproj -c Debug /p:DebugType=full" -register:user -filter:"+[EasyCaching*]* -[EasyCaching*Tests]*" -oldstyle -returntargetcode -output:coverage.xml
5556

56-
after_test:
57-
- ps: >-
58-
if ($env:APPVEYOR_REPO_BRANCH -eq "master" -And -not $env:APPVEYOR_PULL_REQUEST_NUMBER)
59-
{
60-
tools\coveralls.net.0.7.0\tools\csmacnz.Coveralls.exe --opencover -i coverage.xml --serviceName appveyor --useRelativePaths
61-
}
62-
else
63-
{
64-
echo "not master branch...."
65-
}
57+
#after_test:
58+
#- ps: >-
59+
# if ($env:APPVEYOR_REPO_BRANCH -eq "master" -And -not $env:APPVEYOR_PULL_REQUEST_NUMBER)
60+
# {
61+
# tools\coveralls.net.0.7.0\tools\csmacnz.Coveralls.exe --opencover -i coverage.xml --serviceName appveyor --useRelativePaths
62+
# }
63+
# else
64+
# {
65+
# echo "not master branch...."
66+
# }

build/releasenotes.props

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
11
<Project>
22
<PropertyGroup>
33
<EasyCachingCorePackageNotes>
4-
1. Support Value Type.
4+
1. Support .NET Core 2.1
55
</EasyCachingCorePackageNotes>
66
<EasyCachingMemcachedPackageNotes>
7-
1. Support Value Type.
7+
1. Support .NET Core 2.1
88
</EasyCachingMemcachedPackageNotes>
99
<EasyCachingRedisPackageNotes>
10-
1. Support Value Type.
11-
2. Support Connection strings.
10+
1. Support .NET Core 2.1
1211
</EasyCachingRedisPackageNotes>
1312
<EasyCachingSQLitePackageNotes>
14-
1. Support Value Type.
13+
1. Support .NET Core 2.1
1514
</EasyCachingSQLitePackageNotes>
1615
<EasyCachingInMemoryPackageNotes>
17-
1. Support Value Type.
16+
1. Support .NET Core 2.1
1817
</EasyCachingInMemoryPackageNotes>
1918
<EasyCachingHybridPackageNotes>
20-
1. Support Value Type.
19+
1. Support .NET Core 2.1
2120
</EasyCachingHybridPackageNotes>
2221
<EasyCachingAspectCorePackageNotes>
23-
Add some extension methods.
22+
1. Support .NET Core 2.1
2423
</EasyCachingAspectCorePackageNotes>
2524
<EasyCachingCastlePackageNotes>
26-
Add some extension methods.
25+
1. Support .NET Core 2.1
2726
</EasyCachingCastlePackageNotes>
2827
<EasyCachingResponseCachingPackageNotes>
29-
Use pattern matching to simplify something.
28+
1. Support .NET Core 2.1
3029
</EasyCachingResponseCachingPackageNotes>
3130
<EasyCachingJsonPackageNotes>
32-
Init.
31+
1. Support .NET Core 2.1
3332
</EasyCachingJsonPackageNotes>
3433
<EasyCachingMessagePackPackageNotes>
35-
Fix bug of AddDefaultMessagePackSerializer.
34+
1. Support .NET Core 2.1
3635
</EasyCachingMessagePackPackageNotes>
3736
<EasyCachingProtobufPackageNotes>
38-
Init.
37+
1. Support .NET Core 2.1
3938
</EasyCachingProtobufPackageNotes>
4039
</PropertyGroup>
4140
</Project>

build/version.props

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<Project>
22
<PropertyGroup>
3-
<EasyCachingCorePackageVersion>0.2.3</EasyCachingCorePackageVersion>
4-
<EasyCachingMemcachedPackageVersion>0.2.3</EasyCachingMemcachedPackageVersion>
5-
<EasyCachingRedisPackageVersion>0.2.3</EasyCachingRedisPackageVersion>
6-
<EasyCachingSQLitePackageVersion>0.2.3</EasyCachingSQLitePackageVersion>
7-
<EasyCachingInMemoryPackageVersion>0.2.3</EasyCachingInMemoryPackageVersion>
8-
<EasyCachingHybridPackageVersion>0.2.3</EasyCachingHybridPackageVersion>
9-
<EasyCachingAspectCorePackageVersion>0.2.0</EasyCachingAspectCorePackageVersion>
10-
<EasyCachingCastlePackageVersion>0.2.0</EasyCachingCastlePackageVersion>
11-
<EasyCachingResponseCachingPackageVersion>0.1.1</EasyCachingResponseCachingPackageVersion>
12-
<EasyCachingJsonPackageVersion>0.1.0</EasyCachingJsonPackageVersion>
13-
<EasyCachingMessagePackPackageVersion>0.1.2</EasyCachingMessagePackPackageVersion>
14-
<EasyCachingProtobufPackageVersion>0.1.2</EasyCachingProtobufPackageVersion>
3+
<EasyCachingCorePackageVersion>0.3.0</EasyCachingCorePackageVersion>
4+
<EasyCachingMemcachedPackageVersion>0.3.0</EasyCachingMemcachedPackageVersion>
5+
<EasyCachingRedisPackageVersion>0.3.0</EasyCachingRedisPackageVersion>
6+
<EasyCachingSQLitePackageVersion>0.3.0</EasyCachingSQLitePackageVersion>
7+
<EasyCachingInMemoryPackageVersion>0.3.0</EasyCachingInMemoryPackageVersion>
8+
<EasyCachingHybridPackageVersion>0.3.0</EasyCachingHybridPackageVersion>
9+
<EasyCachingAspectCorePackageVersion>0.3.0</EasyCachingAspectCorePackageVersion>
10+
<EasyCachingCastlePackageVersion>0.3.0</EasyCachingCastlePackageVersion>
11+
<EasyCachingResponseCachingPackageVersion>0.3.0</EasyCachingResponseCachingPackageVersion>
12+
<EasyCachingJsonPackageVersion>0.3.0</EasyCachingJsonPackageVersion>
13+
<EasyCachingMessagePackPackageVersion>0.3.0</EasyCachingMessagePackPackageVersion>
14+
<EasyCachingProtobufPackageVersion>0.3.0</EasyCachingProtobufPackageVersion>
1515
</PropertyGroup>
1616
</Project>

sample/EasyCaching.Demo.Interceptors/Controllers/ValuesController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class ValuesController : Controller
1010
private readonly IAspectCoreService _aService;
1111
private readonly ICastleService _cService;
1212

13-
public ValuesController(IAspectCoreService aService, ICastleService cService)
13+
public ValuesController(IAspectCoreService aService = null, ICastleService cService = null)
1414
{
1515
this._aService = aService;
1616
this._cService = cService;

src/EasyCaching.Bus.Redis/DefaultRedisBus.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
namespace EasyCaching.Bus.Redis
2-
{
2+
{
33
using EasyCaching.Core;
44
using EasyCaching.Core.Internal;
55
using StackExchange.Redis;
@@ -53,7 +53,7 @@ public DefaultRedisBus(
5353
/// <param name="channel">Channel.</param>
5454
public void Subscribe(string channel)
5555
{
56-
_subscriber.Subscribe(channel,SubscribeHandle);
56+
_subscriber.Subscribe(channel, SubscribeHandle);
5757
}
5858

5959
/// <summary>
@@ -65,9 +65,9 @@ private void SubscribeHandle(RedisChannel channel, RedisValue value)
6565
{
6666
var message = _serializer.Deserialize<EasyCachingMessage>(value);
6767

68-
switch(message.NotifyType)
68+
switch (message.NotifyType)
6969
{
70-
case NotifyType.Add:
70+
case NotifyType.Add:
7171
_localCachingProvider.Set(message.CacheKey, message.CacheValue, message.Expiration);
7272
break;
7373
case NotifyType.Update:
@@ -86,7 +86,7 @@ private void SubscribeHandle(RedisChannel channel, RedisValue value)
8686
/// <param name="channel">Channel.</param>
8787
public async Task SubscribeAsync(string channel)
8888
{
89-
await _subscriber.SubscribeAsync(channel, SubscribeHandle);
89+
await _subscriber.SubscribeAsync(channel, SubscribeHandle);
9090
}
9191

9292
/// <summary>
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
2+
// namespace EasyCaching.HybridCache
3+
// {
4+
// using EasyCaching.Core;
5+
// using EasyCaching.Core.Internal;
6+
// using System;
7+
// using System.Collections.Generic;
8+
// using System.Linq;
9+
// using System.Threading.Tasks;
10+
11+
// public interface IHybridCachingNewProvider
12+
// {
13+
// void Set<T>(string cacheKey, T cacheValue, TimeSpan expiration);
14+
15+
// CacheValue<T> Get<T>(string cacheKey);
16+
17+
// void Remove(string cacheKey);
18+
// }
19+
20+
// public class HybridCacheNewProvider : IHybridCachingNewProvider
21+
// {
22+
// private readonly IEasyCachingProvider _local;
23+
// private readonly IEasyCachingProvider _remote;
24+
// private readonly IEasyCachingBus _bus;
25+
26+
// public HybridCacheNewProvider(IEnumerable<IEasyCachingProvider> providers, IEasyCachingBus bus)
27+
// {
28+
// if (providers == null || !providers.Any())
29+
// {
30+
// throw new ArgumentNullException(nameof(providers));
31+
// }
32+
33+
// if (providers.Count() > 2)
34+
// {
35+
// throw new ArgumentOutOfRangeException(nameof(providers));
36+
// }
37+
38+
// if(providers.Count(x=>x.IsDistributedCache)>1)
39+
// {
40+
// throw new ArgumentOutOfRangeException(nameof(providers));
41+
// }
42+
43+
// if(providers.Count(x=>!x.IsDistributedCache)>1)
44+
// {
45+
// throw new ArgumentOutOfRangeException(nameof(providers));
46+
// }
47+
48+
// this._local = providers.First(x=>!x.IsDistributedCache);
49+
// this._remote = providers.First(x=>x.IsDistributedCache);
50+
// this._bus = bus;
51+
// this._bus.Subscribe("channel");
52+
// }
53+
54+
// public CacheValue<T> Get<T>(string cacheKey)
55+
// {
56+
// var obj = _local.Get<T>(cacheKey);
57+
58+
// if(obj.HasValue) return obj;
59+
60+
// obj = _remote.Get<T>(cacheKey);
61+
62+
// return obj.HasValue
63+
// ? obj
64+
// : CacheValue<T>.NoValue;
65+
// }
66+
67+
// public void Remove(string cacheKey)
68+
// {
69+
// _remote.Remove(cacheKey);
70+
// _bus.Publish("channel",new EasyCachingMessage
71+
// {
72+
// CacheKey = cacheKey,
73+
// NotifyType = NotifyType.Delete
74+
// });
75+
// }
76+
77+
// public void Set<T>(string cacheKey, T cacheValue, TimeSpan expiration)
78+
// {
79+
// _remote.Set(cacheKey,cacheValue,expiration);
80+
// _bus.Publish("channel",new EasyCachingMessage
81+
// {
82+
// CacheKey = cacheKey,
83+
// CacheValue = cacheValue,
84+
// Expiration = expiration,
85+
// NotifyType = NotifyType.Add
86+
// });
87+
// }
88+
// }
89+
// }

test/EasyCaching.PerformanceTests/EasyCaching.PerformanceTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
<TargetFramework>netcoreapp2.1</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
4+
<TargetFramework>netcoreapp2.1</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

test/EasyCaching.UnitTests/InterceptorTests/AspectCoreInterceptorTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public abstract class BaseAspectCoreInterceptorTest
2020

2121
protected IEasyCachingKeyGenerator _keyGenerator;
2222

23-
[Fact]
23+
[Fact(Skip="some reason")]
2424
protected virtual void Interceptor_Attribute_Method_Should_Handle_Caching()
2525
{
2626
var tick1 = _service.GetCurrentUTC();

0 commit comments

Comments
 (0)