Skip to content

Commit a004673

Browse files
authored
Merge pull request #3 from bing-framework/feature/refactor_query
发布 1.0.0
2 parents f4b26ac + 83e41b5 commit a004673

113 files changed

Lines changed: 5179 additions & 5129 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.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,6 @@ paket-files/
259259

260260
# Python Tools for Visual Studio (PTVS)
261261
__pycache__/
262-
*.pyc
262+
*.pyc
263+
264+
/src/**/Bing.*.xml

Bing.Elasticsearch.sln

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ EndProject
2020
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bing.Extensions.Elasticsearch", "src\Bing.Extensions.Elasticsearch\Bing.Extensions.Elasticsearch.csproj", "{48567761-E7E4-4C07-AD42-A91A870342BC}"
2121
EndProject
2222
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_SolutionItems", "_SolutionItems", "{69DE1812-2212-49D3-AE5B-5879E808409D}"
23-
ProjectSection(SolutionItems) = preProject
24-
.gitignore = .gitignore
25-
common.props = common.props
26-
LICENSE = LICENSE
27-
Publish.bat = Publish.bat
28-
README.md = README.md
29-
version.dev.props = version.dev.props
30-
version.props = version.props
31-
EndProjectSection
3223
EndProject
3324
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "asset", "asset", "{A810AF16-6D16-4575-B8C1-407020AC3D51}"
3425
EndProject
@@ -41,6 +32,32 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "props", "props", "{DC7CEC85
4132
ProjectSection(SolutionItems) = preProject
4233
asset\props\misc.props = asset\props\misc.props
4334
asset\props\package.props = asset\props\package.props
35+
asset\props\sourcelink.env.props = asset\props\sourcelink.env.props
36+
asset\props\target.feature.props = asset\props\target.feature.props
37+
EndProjectSection
38+
EndProject
39+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
40+
ProjectSection(SolutionItems) = preProject
41+
README.md = README.md
42+
EndProjectSection
43+
EndProject
44+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{D902F0CD-F7E3-48AD-9B64-D941FB43BA4B}"
45+
EndProject
46+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{2B23A8AD-648E-4FBA-90E8-91F09B344A7D}"
47+
ProjectSection(SolutionItems) = preProject
48+
Publish.bat = Publish.bat
49+
EndProjectSection
50+
EndProject
51+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution", "solution", "{37514623-1ED9-44FC-9DE6-EF2D5236045A}"
52+
ProjectSection(SolutionItems) = preProject
53+
.gitattributes = .gitattributes
54+
.gitignore = .gitignore
55+
common.props = common.props
56+
common.tests.props = common.tests.props
57+
framework.tests.props = framework.tests.props
58+
LICENSE = LICENSE
59+
version.dev.props = version.dev.props
60+
version.props = version.props
4461
EndProjectSection
4562
EndProject
4663
Global
@@ -82,6 +99,10 @@ Global
8299
{A810AF16-6D16-4575-B8C1-407020AC3D51} = {69DE1812-2212-49D3-AE5B-5879E808409D}
83100
{EF57FEDA-1AA5-481C-83D9-762D46465A6E} = {A810AF16-6D16-4575-B8C1-407020AC3D51}
84101
{DC7CEC85-7D6A-4EF8-812F-28DD8B366909} = {A810AF16-6D16-4575-B8C1-407020AC3D51}
102+
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {69DE1812-2212-49D3-AE5B-5879E808409D}
103+
{D902F0CD-F7E3-48AD-9B64-D941FB43BA4B} = {69DE1812-2212-49D3-AE5B-5879E808409D}
104+
{2B23A8AD-648E-4FBA-90E8-91F09B344A7D} = {69DE1812-2212-49D3-AE5B-5879E808409D}
105+
{37514623-1ED9-44FC-9DE6-EF2D5236045A} = {69DE1812-2212-49D3-AE5B-5879E808409D}
85106
EndGlobalSection
86107
GlobalSection(ExtensibilityGlobals) = postSolution
87108
SolutionGuid = {88496F4E-9454-4B28-A676-4F17E15C22D2}

asset/props/package.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@
1010
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1111
<PackageTags>bing;es;elasticsearch;dotnetcore;aspnetcore;</PackageTags>
1212
</PropertyGroup>
13+
14+
<PropertyGroup>
15+
<!--创建符号包-->
16+
<IncludeSymbols>true</IncludeSymbols>
17+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
18+
</PropertyGroup>
1319
</Project>

asset/props/sourcelink.env.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<ItemGroup>
3+
<PackageReference Include="DotNetCore.SourceLink.Environment" Version="8.0.0" />
4+
</ItemGroup>
5+
</Project>

asset/props/target.feature.props

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<Project>
2+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
3+
<ImplicitUsings>enable</ImplicitUsings>
4+
<Nullable>disable</Nullable>
5+
</PropertyGroup>
6+
7+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
8+
<ImplicitUsings>enable</ImplicitUsings>
9+
<Nullable>disable</Nullable>
10+
</PropertyGroup>
11+
12+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
13+
<ImplicitUsings>enable</ImplicitUsings>
14+
<Nullable>disable</Nullable>
15+
</PropertyGroup>
16+
17+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
18+
<ImplicitUsings>enable</ImplicitUsings>
19+
<Nullable>disable</Nullable>
20+
</PropertyGroup>
21+
22+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
23+
<ImplicitUsings>enable</ImplicitUsings>
24+
<Nullable>disable</Nullable>
25+
</PropertyGroup>
26+
27+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
28+
<ImplicitUsings>enable</ImplicitUsings>
29+
<Nullable>disable</Nullable>
30+
</PropertyGroup>
31+
32+
</Project>

common.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<PropertyGroup>
33
<RootNamespace/>
44
<LangVersion>latest</LangVersion>
5-
<NoWarn>$(NoWarn);CS1591</NoWarn>
5+
<NoWarn Condition=" '$(Configuration)' == 'Debug' ">$(NoWarn);NETSDK1138</NoWarn>
6+
<NoWarn Condition=" '$(Configuration)' == 'Release' ">$(NoWarn);CS1591;NETSDK1138</NoWarn>
67
</PropertyGroup>
78

89
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -27,6 +28,10 @@
2728
<None Remove="$(AssemblyName).csproj.DotSettings" />
2829
</ItemGroup>
2930

31+
<Import Project="asset/props/target.feature.props"/>
32+
33+
<Import Project="asset/props/sourcelink.env.props"/>
34+
3035
<Import Project="asset/props/package.props"/>
3136

3237
<Import Project="asset/props/misc.props"/>

common.tests.props

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<Project>
2+
<PropertyGroup>
3+
<LangVersion>latest</LangVersion>
4+
<NoWarn>$(NoWarn);CS1591;NETSDK1138;</NoWarn>
5+
<IsPackable>false</IsPackable>
6+
</PropertyGroup>
7+
8+
<!--单元测试基础配置-->
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
11+
<!--Xunit核心框架包,提供了编写单元测试所需的基本功能和属性-->
12+
<PackageReference Include="xunit" Version="2.7.0" />
13+
<!--允许在Visual Studio的测试资源管理器中运行Xunit测试-->
14+
<PackageReference Include="xunit.runner.visualstudio" Condition="'$(TargetFramework)'!= 'netstandard2.0' And '$(TargetFramework)'!= 'netstandard2.1'">
15+
<Version Condition=" '$(TargetFramework)' != 'net452' ">2.5.7</Version>
16+
<Version Condition=" '$(TargetFramework)' == 'net452' ">2.4.3</Version>
17+
<Version Condition=" '$(TargetFramework)' == 'net5.0' ">2.4.5</Version>
18+
<Version Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">2.4.5</Version>
19+
<Version Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">2.4.3</Version>
20+
<Version Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">2.4.3</Version>
21+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
22+
<PrivateAssets>all</PrivateAssets>
23+
</PackageReference>
24+
<!--一个跨平台的代码覆盖率工具,用于收集测试覆盖率数据,特别是与CI/CD集成时非常有用-->
25+
<PackageReference Include="coverlet.collector" Version="6.0.1" />
26+
</ItemGroup>
27+
28+
<!--单元测试扩展包配置-->
29+
<ItemGroup>
30+
<!--.NET单元测试断言库,它提供了一种更自然、更易读的方式来编写测试断言-->
31+
<PackageReference Include="Shouldly" Version="4.2.1" />
32+
<!--.NET模拟框架,用于创建对象的模拟实例,帮助测试那些依赖于复杂外部资源的代码-->
33+
<PackageReference Include="Moq" Version="4.20.70" />
34+
</ItemGroup>
35+
36+
<Import Project="asset/props/sourcelink.env.props"/>
37+
</Project>

framework.tests.props

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<Project>
2+
<PropertyGroup>
3+
<TargetFrameworks>net9.0;net8.0;net6.0;</TargetFrameworks>
4+
</PropertyGroup>
5+
6+
<Import Project="./common.tests.props"/>
7+
8+
<PropertyGroup>
9+
<!-- 如果没有DI的需求,则将EnableDITestPackages设置为false -->
10+
<EnableDITestPackages>true</EnableDITestPackages>
11+
</PropertyGroup>
12+
13+
<ItemGroup Condition=" '$(EnableDITestPackages)' == 'true' ">
14+
<PackageReference Include="Xunit.DependencyInjection.Logging" Version="8.1.0" />
15+
<PackageReference Include="AspectCore.Extensions.Hosting" Version="2.4.0" />
16+
</ItemGroup>
17+
18+
<ItemGroup Condition="'$(EnableDITestPackages)' == 'true' and '$(TargetFramework)' == 'net6.0' ">
19+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.36" />
20+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
21+
<PackageReference Include="Xunit.DependencyInjection" Version="8.9.0" />
22+
</ItemGroup>
23+
24+
<ItemGroup Condition=" '$(EnableDITestPackages)' == 'true' and '$(TargetFramework)' == 'net8.0' ">
25+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.16" />
26+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
27+
<PackageReference Include="Xunit.DependencyInjection" Version="9.9.0" />
28+
</ItemGroup>
29+
30+
<ItemGroup Condition=" '$(EnableDITestPackages)' == 'true' and '$(TargetFramework)' == 'net9.0' ">
31+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="9.0.5" />
32+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.5" />
33+
<PackageReference Include="Xunit.DependencyInjection" Version="9.9.0" />
34+
</ItemGroup>
35+
36+
</Project>

samples/Bing.Elasticsearch.ConsoleSample/Bing.Elasticsearch.ConsoleSample.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

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

88
<Import Project="..\..\common.props" />
99

1010
<ItemGroup>
1111
<PackageReference Include="Bing.Utils" Version="$(BingUtilsPackageVersion)" />
12-
<PackageReference Include="FreeSql.Provider.MySql" Version="3.0.100" />
12+
<PackageReference Include="FreeSql.Provider.MySql" Version="3.2.821" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

samples/Bing.Elasticsearch.ConsoleSample/Samples/SaveInOutStockProductReportAct.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using Bing.Elasticsearch.ConsoleSample.Model.Reports;
1010
using Bing.Extensions;
1111
using Bing.Utils.Json;
12-
using Bing.Utils.Timing;
1312

1413
namespace Bing.Elasticsearch.ConsoleSample.Samples
1514
{

0 commit comments

Comments
 (0)