Skip to content

Commit 53db3b6

Browse files
committed
整理CsRedis、AspNet等项目到同一个解决方案中
1 parent ed690f3 commit 53db3b6

File tree

5 files changed

+58
-19
lines changed

5 files changed

+58
-19
lines changed

src/Senparc.CO2NET.Cache.Redis.Tests/Senparc.CO2NET.Cache.Redis.Tests.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
<ItemGroup>
2222
<PackageReference Include="MessagePack" Version="1.9.11" />
2323
<PackageReference Include="MessagePackAnalyzer" Version="1.6.0" />
24-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.0" />
2524
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
2625
<PackageReference Include="Moq" Version="4.9.0" />
2726
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
@@ -33,9 +32,11 @@
3332

3433
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
3534
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.2" />
35+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.0" />
3636
</ItemGroup>
3737
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net6.0' ">
38-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
38+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
39+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
3940
</ItemGroup>
4041

4142
<ItemGroup>

src/Senparc.CO2NET.Tests/Senparc.CO2NET.Tests.csproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
</ItemGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.0" />
23-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.0" />
2422
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
2523
<PackageReference Include="Moq" Version="4.8.3" />
2624
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
@@ -34,9 +32,13 @@
3432

3533
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
3634
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.2" />
35+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.0" />
36+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.0" />
3737
</ItemGroup>
3838
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net6.0' ">
39-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
39+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
40+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
41+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
4042
</ItemGroup>
4143

4244
<ItemGroup>

src/Senparc.CO2NET.sln

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.27703.2000
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.CO2NET", "Senparc.CO2NET\Senparc.CO2NET.csproj", "{8B66B7FB-6918-4D21-9C31-98EACF3264C8}"
77
EndProject
@@ -27,6 +27,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.CO2NET.APM", "Senpa
2727
EndProject
2828
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.CO2NET.APM.Tests", "Senparc.CO2NET.APM.Tests\Senparc.CO2NET.APM.Tests.csproj", "{AF4F48CC-F241-4619-AAE2-7913009683D5}"
2929
EndProject
30+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.CO2NET.Cache.CsRedis", "Senparc.CO2NET.Cache.CsRedis\Senparc.CO2NET.Cache.CsRedis.csproj", "{A85B6718-9E8E-47D2-B8F2-01C435B356BB}"
31+
EndProject
32+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.CO2NET.Cache.CsRedis.RedLock", "Senparc.CO2NET.Cache.CsRedis.RedLock\redlock-cs\src\Senparc.CO2NET.Cache.CsRedis.RedLock.csproj", "{4B84D0CD-904B-4807-B464-83EF6B3B43CB}"
33+
EndProject
34+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CsRedis", "CsRedis", "{DA9270E5-E405-49B5-A032-96CE6F98F50B}"
35+
EndProject
36+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StackExchangeRedis", "StackExchangeRedis", "{6C290C2B-F5B0-4872-B2E3-22A14F7B05F4}"
37+
EndProject
38+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Memcached", "Memcached", "{2411CD77-8E9D-4FB3-ACEB-C74ED065E8CA}"
39+
EndProject
40+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Senparc.CO2NET.AspNet", "Senparc.CO2NET.AspNet\Senparc.CO2NET.AspNet.csproj", "{B6CC5D8D-5AD6-42F0-96C6-7EB5B55DE195}"
41+
EndProject
3042
Global
3143
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3244
Debug|Any CPU = Debug|Any CPU
@@ -81,6 +93,24 @@ Global
8193
{AF4F48CC-F241-4619-AAE2-7913009683D5}.Release|Any CPU.Build.0 = Release|Any CPU
8294
{AF4F48CC-F241-4619-AAE2-7913009683D5}.Test|Any CPU.ActiveCfg = Debug|Any CPU
8395
{AF4F48CC-F241-4619-AAE2-7913009683D5}.Test|Any CPU.Build.0 = Debug|Any CPU
96+
{A85B6718-9E8E-47D2-B8F2-01C435B356BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
97+
{A85B6718-9E8E-47D2-B8F2-01C435B356BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
98+
{A85B6718-9E8E-47D2-B8F2-01C435B356BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
99+
{A85B6718-9E8E-47D2-B8F2-01C435B356BB}.Release|Any CPU.Build.0 = Release|Any CPU
100+
{A85B6718-9E8E-47D2-B8F2-01C435B356BB}.Test|Any CPU.ActiveCfg = Test|Any CPU
101+
{A85B6718-9E8E-47D2-B8F2-01C435B356BB}.Test|Any CPU.Build.0 = Test|Any CPU
102+
{4B84D0CD-904B-4807-B464-83EF6B3B43CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
103+
{4B84D0CD-904B-4807-B464-83EF6B3B43CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
104+
{4B84D0CD-904B-4807-B464-83EF6B3B43CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
105+
{4B84D0CD-904B-4807-B464-83EF6B3B43CB}.Release|Any CPU.Build.0 = Release|Any CPU
106+
{4B84D0CD-904B-4807-B464-83EF6B3B43CB}.Test|Any CPU.ActiveCfg = Test|Any CPU
107+
{4B84D0CD-904B-4807-B464-83EF6B3B43CB}.Test|Any CPU.Build.0 = Test|Any CPU
108+
{B6CC5D8D-5AD6-42F0-96C6-7EB5B55DE195}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
109+
{B6CC5D8D-5AD6-42F0-96C6-7EB5B55DE195}.Debug|Any CPU.Build.0 = Debug|Any CPU
110+
{B6CC5D8D-5AD6-42F0-96C6-7EB5B55DE195}.Release|Any CPU.ActiveCfg = Release|Any CPU
111+
{B6CC5D8D-5AD6-42F0-96C6-7EB5B55DE195}.Release|Any CPU.Build.0 = Release|Any CPU
112+
{B6CC5D8D-5AD6-42F0-96C6-7EB5B55DE195}.Test|Any CPU.ActiveCfg = Test|Any CPU
113+
{B6CC5D8D-5AD6-42F0-96C6-7EB5B55DE195}.Test|Any CPU.Build.0 = Test|Any CPU
84114
EndGlobalSection
85115
GlobalSection(SolutionProperties) = preSolution
86116
HideSolutionNode = FALSE
@@ -89,13 +119,19 @@ Global
89119
{8B66B7FB-6918-4D21-9C31-98EACF3264C8} = {FE9C797C-0788-451E-B04C-778484434ED5}
90120
{0CE4D0D4-97F3-4A7C-A999-27AFE121BD26} = {118ECC07-977C-42ED-A452-8934C8632261}
91121
{577DD010-AF7A-4113-9AEA-4BD6244D5318} = {FE9C797C-0788-451E-B04C-778484434ED5}
92-
{056D9E3D-1B27-43B2-9376-7DEF22DC0DC9} = {577DD010-AF7A-4113-9AEA-4BD6244D5318}
93-
{854A4F0D-B34F-460F-BD33-4AAD4ADF97A4} = {577DD010-AF7A-4113-9AEA-4BD6244D5318}
94-
{E44E024B-3C5D-4B37-8FAF-611F4DEEBA71} = {577DD010-AF7A-4113-9AEA-4BD6244D5318}
122+
{056D9E3D-1B27-43B2-9376-7DEF22DC0DC9} = {6C290C2B-F5B0-4872-B2E3-22A14F7B05F4}
123+
{854A4F0D-B34F-460F-BD33-4AAD4ADF97A4} = {6C290C2B-F5B0-4872-B2E3-22A14F7B05F4}
124+
{E44E024B-3C5D-4B37-8FAF-611F4DEEBA71} = {2411CD77-8E9D-4FB3-ACEB-C74ED065E8CA}
95125
{BE38FE20-928D-46EF-B17B-8CB4BC401389} = {118ECC07-977C-42ED-A452-8934C8632261}
96126
{EBE34781-D3F8-4720-96D5-95CB80B7A767} = {118ECC07-977C-42ED-A452-8934C8632261}
97127
{32B6274F-91FB-4240-8189-4C2BF52977B2} = {FE9C797C-0788-451E-B04C-778484434ED5}
98128
{AF4F48CC-F241-4619-AAE2-7913009683D5} = {118ECC07-977C-42ED-A452-8934C8632261}
129+
{A85B6718-9E8E-47D2-B8F2-01C435B356BB} = {DA9270E5-E405-49B5-A032-96CE6F98F50B}
130+
{4B84D0CD-904B-4807-B464-83EF6B3B43CB} = {DA9270E5-E405-49B5-A032-96CE6F98F50B}
131+
{DA9270E5-E405-49B5-A032-96CE6F98F50B} = {577DD010-AF7A-4113-9AEA-4BD6244D5318}
132+
{6C290C2B-F5B0-4872-B2E3-22A14F7B05F4} = {577DD010-AF7A-4113-9AEA-4BD6244D5318}
133+
{2411CD77-8E9D-4FB3-ACEB-C74ED065E8CA} = {577DD010-AF7A-4113-9AEA-4BD6244D5318}
134+
{B6CC5D8D-5AD6-42F0-96C6-7EB5B55DE195} = {FE9C797C-0788-451E-B04C-778484434ED5}
99135
EndGlobalSection
100136
GlobalSection(ExtensibilityGlobals) = postSolution
101137
SolutionGuid = {796B18F2-8DBB-4792-881F-4C5A81E1F2DB}

src/Senparc.CO2NET/Utilities/HttpUtility/HttpPost/RequestUtility.Post.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ public static partial class RequestUtility
105105
/// <param name="checkValidationResult"></param>
106106
/// <param name="contentType"></param>
107107
/// <returns></returns>
108-
public static HttpWebRequest HttpPost_Common_Net45(string url, CookieContainer cookieContainer = null,
108+
public static HttpWebRequest HttpPost_Common_Net45(string url, string method, CookieContainer cookieContainer = null,
109109
Stream postStream = null, Dictionary<string, string> fileDictionary = null, string refererUrl = null,
110110
Encoding encoding = null, X509Certificate2 cer = null, bool useAjax = false, Dictionary<string, string> headerAddition = null,
111111
int timeOut = Config.TIME_OUT, bool checkValidationResult = false, string contentType = HttpClientHelper.DEFAULT_CONTENT_TYPE)
112112
{
113113
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
114-
request.Method = "POST";
114+
request.Method = method.ToUpper();// "POST";
115115
request.Timeout = timeOut;
116116
request.Proxy = _webproxy;
117117
if (cer != null)
@@ -125,7 +125,7 @@ public static HttpWebRequest HttpPost_Common_Net45(string url, CookieContainer c
125125
new RemoteCertificateValidationCallback(CheckValidationResult);
126126
}
127127

128-
#region 处理Form表单文件上传
128+
#region 处理Form表单文件上传
129129
var formUploadFile = fileDictionary != null && fileDictionary.Count > 0;//是否用Form上传文件
130130
if (formUploadFile)
131131
{
@@ -223,7 +223,7 @@ public static HttpWebRequest HttpPost_Common_Net45(string url, CookieContainer c
223223
//contentType = "application/x-www-form-urlencoded";
224224
}
225225
}
226-
#endregion
226+
#endregion
227227

228228
request.ContentType = contentType;
229229
request.ContentLength = postStream != null ? postStream.Length : 0;
@@ -286,7 +286,7 @@ public static HttpClient HttpPost_Common_NetCore(
286286
HttpClient client = senparcHttpClient.Client;
287287
HttpClientHeader(client, refererUrl, useAjax, headerAddition, timeOut);
288288

289-
#region 处理Form表单文件上传
289+
#region 处理Form表单文件上传
290290

291291
var formUploadFile = fileDictionary != null && fileDictionary.Count > 0;//是否用Form上传文件
292292
if (formUploadFile)
@@ -374,7 +374,7 @@ public static HttpClient HttpPost_Common_NetCore(
374374
}
375375

376376
//HttpContentHeader(hc, timeOut);
377-
#endregion
377+
#endregion
378378

379379
if (!string.IsNullOrEmpty(refererUrl))
380380
{
@@ -592,7 +592,7 @@ public static SenparcHttpResponse HttpResponsePost(
592592
}
593593

594594
#if NET451
595-
var request = HttpPost_Common_Net45(url, cookieContainer, postStream, fileDictionary, refererUrl, encoding, cer, useAjax, headerAddition, timeOut, checkValidationResult, contentType);
595+
var request = HttpPost_Common_Net45(url, "POST", cookieContainer, postStream, fileDictionary, refererUrl, encoding, cer, useAjax, headerAddition, timeOut, checkValidationResult, contentType);
596596

597597
#region 输入二进制流
598598
if (postStream != null && postStream.Length > 0)
@@ -886,7 +886,7 @@ public static async Task<SenparcHttpResponse> HttpResponsePostAsync(
886886
}
887887

888888
#if NET451
889-
var request = HttpPost_Common_Net45(url, cookieContainer, postStream, fileDictionary, refererUrl, encoding, cer, useAjax, headerAddition, timeOut, checkValidationResult, contentType);
889+
var request = HttpPost_Common_Net45(url, "POST", cookieContainer, postStream, fileDictionary, refererUrl, encoding, cer, useAjax, headerAddition, timeOut, checkValidationResult, contentType);
890890

891891
#region 输入二进制流
892892
if (postStream != null && postStream.Length > 0)

src/Senparc.Weixin.Tests/Senparc.Weixin.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.0" />
10+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
1212
<PackageReference Include="Moq" Version="4.8.3" />
1313
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />

0 commit comments

Comments
 (0)