Skip to content

Commit ac1e8de

Browse files
committed
test redis mq di
1 parent ecda45c commit ac1e8de

12 files changed

Lines changed: 23 additions & 20 deletions

File tree

Blog.Core.Api/Blog.Core.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Blog.Core.Api/Controllers/ValuesController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using AutoMapper;
2-
using Blog.Core.Common;
32
using Blog.Core.Common.HttpContextUser;
43
using Blog.Core.Common.HttpRestSharp;
54
using Blog.Core.Common.WebApiClients.HttpApis;
65
using Blog.Core.EventBus;
76
using Blog.Core.EventBus.EventHandling;
7+
using Blog.Core.Extensions;
88
using Blog.Core.Filter;
99
using Blog.Core.IServices;
1010
using Blog.Core.Model;

Blog.Core.Common/Blog.Core.Common.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
<ItemGroup>
88
<Compile Remove="LogHelper\ILoggerHelper.cs" />
99
<Compile Remove="LogHelper\LogHelper.cs" />
10-
<Compile Remove="Redis\IRedisCacheManager.cs" />
11-
<Compile Remove="Redis\RedisCacheManager.cs" />
1210
</ItemGroup>
1311

1412
<ItemGroup>

Blog.Core.Extensions/AOP/BlogRedisCacheAOP.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Blog.Core.Common;
2+
using Blog.Core.Extensions;
23
using Castle.DynamicProxy;
34
using System;
45
using System.Linq;

Blog.Core.Extensions/Middlewares/AllServicesMildd.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
using Microsoft.AspNetCore.Http;
44
using Microsoft.Extensions.DependencyInjection;
55
using System;
6-
using System.Collections.Generic;
76
using System.IO;
87
using System.Linq;
9-
using System.Reflection;
108

119
namespace Blog.Core.Extensions
1210
{

Blog.Core.Common/Redis/IRedisBasketRepository.cs renamed to Blog.Core.Extensions/Redis/IRedisBasketRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Collections.Generic;
44
using System.Threading.Tasks;
55

6-
namespace Blog.Core.Common
6+
namespace Blog.Core.Extensions
77
{
88
/// <summary>
99
/// Redis缓存接口

Blog.Core.Common/Redis/IRedisCacheManager.cs renamed to Blog.Core.Extensions/Redis/IRedisCacheManager.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
62

7-
namespace Blog.Core.Common
3+
namespace Blog.Core.Extensions
84
{
95
/// <summary>
106
/// Redis缓存接口

Blog.Core.Common/Redis/RedisBasketRepository.cs renamed to Blog.Core.Extensions/Redis/RedisBasketRepository.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
using Microsoft.Extensions.Logging;
1+
using Blog.Core.Common;
2+
using Microsoft.Extensions.Logging;
23
using Newtonsoft.Json;
34
using StackExchange.Redis;
45
using System;
56
using System.Collections.Generic;
67
using System.Linq;
78
using System.Threading.Tasks;
89

9-
namespace Blog.Core.Common
10+
namespace Blog.Core.Extensions
1011
{
1112
public class RedisBasketRepository : IRedisBasketRepository
1213
{

Blog.Core.Common/Redis/RedisCacheManager.cs renamed to Blog.Core.Extensions/Redis/RedisCacheManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
using StackExchange.Redis;
1+
using Blog.Core.Common;
2+
using StackExchange.Redis;
23
using System;
34

4-
namespace Blog.Core.Common
5+
namespace Blog.Core.Extensions
56
{
67
public class RedisCacheManager : IRedisCacheManager
78
{

Blog.Core.Common/Redis/RedisSubscribe.cs renamed to Blog.Core.Extensions/Redis/RedisSubscribe.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
using InitQ.Abstractions;
1+
using Blog.Core.IServices;
2+
using InitQ.Abstractions;
23
using InitQ.Attributes;
34
using System;
45
using System.Threading.Tasks;
56

6-
namespace Blog.Core.Common.Redis
7+
namespace Blog.Core.Extensions.Redis
78
{
89
public class RedisSubscribe : IRedisSubscribe
910
{
11+
private readonly IBlogArticleServices _blogArticleServices;
12+
13+
public RedisSubscribe(IBlogArticleServices blogArticleServices)
14+
{
15+
_blogArticleServices = blogArticleServices;
16+
}
17+
1018
[Subscribe(RedisMqKey.Loging)]
1119
private async Task SubRedisLoging(string msg)
1220
{

0 commit comments

Comments
 (0)