Skip to content

Commit 2b64bac

Browse files
authored
Merge pull request #71 from bing-framework/dev_v6.0
publish 6.0.0
2 parents 98c53b9 + b80d9fa commit 2b64bac

File tree

1,472 files changed

+31930
-13138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,472 files changed

+31930
-13138
lines changed

.editorconfig

Lines changed: 87 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,22 @@ root = true
88
indent_style = space
99
# (Please don't specify an indent_size here; that has too many unintended consequences.)
1010

11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.csproj]
15+
end_of_line = crlf
16+
17+
[*.sln]
18+
end_of_line = crlf
19+
20+
[*.ps1]
21+
indent_size = 4
22+
end_of_line = crlf
23+
1124
# Code files
1225
[*.{cs,csx,vb,vbx}]
26+
# 缩进和间距
1327
indent_size = 4
1428
insert_final_newline = true
1529
charset = utf-8-bom
@@ -30,9 +44,77 @@ indent_size = 2
3044
end_of_line = lf
3145
indent_size = 2
3246

47+
# C# 命名规则
48+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions
49+
[*.cs]
50+
## 接口示例:IPascalCase
51+
dotnet_naming_rule.interface_rule.symbols = interface_symbol
52+
dotnet_naming_rule.interface_rule.style = interface_style
53+
dotnet_naming_rule.interface_rule.severity = error
54+
dotnet_naming_symbols.interface_symbol.applicable_kinds = interface
55+
dotnet_naming_style.interface_style.required_prefix = I
56+
dotnet_naming_style.interface_style.capitalization = pascal_case
57+
58+
## 类,结构,枚举,委托,方法,属性,事件示例: PascalCase
59+
dotnet_naming_rule.pascal_case_rule.symbols = pascal_case_symbol
60+
dotnet_naming_rule.pascal_case_rule.style = pascal_case_style
61+
dotnet_naming_rule.pascal_case_rule.severity = error
62+
dotnet_naming_symbols.pascal_case_symbol.applicable_kinds = class, struct, enum, delegate, method, property, event
63+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
64+
65+
## 私有字段示例: _camelCase
66+
dotnet_naming_rule.private_field_rule.symbols = private_field_symbol
67+
dotnet_naming_rule.private_field_rule.style = private_field_style
68+
dotnet_naming_rule.private_field_rule.severity = suggestion
69+
dotnet_naming_symbols.private_field_symbol.applicable_kinds = field
70+
dotnet_naming_symbols.private_field_symbol.applicable_accessibilities = private
71+
dotnet_naming_style.private_field_style.required_prefix = _
72+
dotnet_naming_style.private_field_style.capitalization = camel_case
73+
74+
## 非私有字段示例: PascalCase
75+
dotnet_naming_rule.non_private_field_rule.symbols = non_private_field_symbol
76+
dotnet_naming_rule.non_private_field_rule.style = non_private_field_style
77+
dotnet_naming_rule.non_private_field_rule.severity = error
78+
dotnet_naming_symbols.non_private_field_symbol.applicable_kinds = field
79+
dotnet_naming_symbols.non_private_field_symbol.applicable_accessibilities = public, internal, protected, protected_internal
80+
dotnet_naming_style.non_private_field_style.capitalization = pascal_case
81+
82+
## 非私有只读字段示例: PascalCase
83+
dotnet_naming_rule.protected_readonly_field_rule.symbols = protected_readonly_field_symbol
84+
dotnet_naming_rule.protected_readonly_field_rule.style = protected_readonly_field_style
85+
dotnet_naming_rule.protected_readonly_field_rule.severity = error
86+
dotnet_naming_symbols.protected_readonly_field_symbol.applicable_kinds = field, property
87+
dotnet_naming_symbols.protected_readonly_field_symbol.applicable_accessibilities = public, internal, protected, protected_internal
88+
dotnet_naming_symbols.protected_readonly_field_symbol.required_modifiers = readonly
89+
dotnet_naming_style.protected_readonly_field_style.capitalization = pascal_case
90+
91+
## 参数示例: camelCase
92+
dotnet_naming_rule.parameter_rule.symbols = parameter_symbol
93+
dotnet_naming_rule.parameter_rule.style = parameter_style
94+
dotnet_naming_rule.parameter_rule.severity = error
95+
dotnet_naming_symbols.parameter_symbol.applicable_kinds = parameter
96+
dotnet_naming_style.parameter_style.capitalization = camel_case
97+
98+
## 常量示例: ALL_UPPER
99+
dotnet_naming_rule.const_rule.symbols = const_symbol
100+
dotnet_naming_rule.const_rule.style = const_style
101+
dotnet_naming_rule.const_rule.severity = suggestion
102+
dotnet_naming_symbols.const_symbol.required_modifiers = const
103+
dotnet_naming_symbols.const_symbol.applicable_kinds = field
104+
dotnet_naming_style.const_style.capitalization = pascal_case # all_upper
105+
# dotnet_naming_style.const_style.word_separator = _
106+
107+
## 异步方法示例: xxxAsync
108+
dotnet_naming_rule.async_method_rule.symbols = async_method_symbol
109+
dotnet_naming_rule.async_method_rule.style = async_method_style
110+
dotnet_naming_rule.async_method_rule.severity = error
111+
dotnet_naming_symbols.async_method_symbol.required_modifiers = async
112+
dotnet_naming_symbols.async_method_symbol.applicable_kinds = method
113+
dotnet_naming_style.async_method_style.required_suffix = Async
114+
33115
# Dotnet code style settings:
34116
[*.{cs,vb}]
35-
# Sort using and Import directives with System.* appearing first
117+
# Sort using and Import directives with System.* appearing first(using排序)
36118
dotnet_sort_system_directives_first = true
37119
# Avoid "this." and "Me." if not necessary
38120
dotnet_style_qualification_for_field = false:suggestion
@@ -51,78 +133,9 @@ dotnet_style_coalesce_expression = true:suggestion
51133
dotnet_style_null_propagation = true:suggestion
52134
dotnet_style_explicit_tuple_names = true:suggestion
53135

54-
# Non-private static fields are PascalCase
55-
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
56-
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
57-
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
58-
59-
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
60-
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected
61-
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
62-
63-
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
64-
65-
# Constants are PascalCase
66-
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
67-
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
68-
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
69-
70-
dotnet_naming_symbols.constants.applicable_kinds = field, local
71-
dotnet_naming_symbols.constants.required_modifiers = const
72-
73-
dotnet_naming_style.constant_style.capitalization = pascal_case
74-
75-
# Static fields are camelCase and start with s_
76-
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
77-
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
78-
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
79-
80-
dotnet_naming_symbols.static_fields.applicable_kinds = field
81-
dotnet_naming_symbols.static_fields.required_modifiers = static
82-
83-
dotnet_naming_style.static_field_style.capitalization = camel_case
84-
dotnet_naming_style.static_field_style.required_prefix = s_
85-
86-
# Instance fields are camelCase and start with _
87-
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
88-
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
89-
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
90-
91-
dotnet_naming_symbols.instance_fields.applicable_kinds = field
92-
93-
dotnet_naming_style.instance_field_style.capitalization = camel_case
94-
dotnet_naming_style.instance_field_style.required_prefix = _
95-
96-
# Locals and parameters are camelCase
97-
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
98-
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
99-
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
100-
101-
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
102-
103-
dotnet_naming_style.camel_case_style.capitalization = camel_case
104-
105-
# Local functions are PascalCase
106-
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
107-
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
108-
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
109-
110-
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
111-
112-
dotnet_naming_style.local_function_style.capitalization = pascal_case
113-
114-
# By default, name items with PascalCase
115-
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
116-
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
117-
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
118-
119-
dotnet_naming_symbols.all_members.applicable_kinds = *
120-
121-
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
122-
123136
# CSharp code style settings:
124137
[*.cs]
125-
# Indentation preferences
138+
# Indentation preferences(缩进)
126139
csharp_indent_block_contents = true
127140
csharp_indent_braces = false
128141
csharp_indent_case_contents = true
@@ -152,7 +165,7 @@ csharp_style_inlined_variable_declaration = true:suggestion
152165
csharp_style_throw_expression = true:suggestion
153166
csharp_style_conditional_delegate_call = true:suggestion
154167

155-
# Newline settings
168+
# Newline settings(换行)
156169
csharp_new_line_before_open_brace = all
157170
csharp_new_line_before_else = true
158171
csharp_new_line_before_catch = true
@@ -161,7 +174,7 @@ csharp_new_line_before_members_in_object_initializers = true
161174
csharp_new_line_before_members_in_anonymous_types = true
162175
csharp_new_line_between_query_expression_clauses = true
163176

164-
# Spacing
177+
# Spacing(间距)
165178
csharp_space_after_cast = false
166179
csharp_space_after_colon_in_inheritance_clause = true
167180
csharp_space_after_keywords_in_control_flow_statements = true
@@ -177,4 +190,4 @@ csharp_space_between_parentheses = false
177190
# Blocks are allowed
178191
csharp_prefer_braces = true:silent
179192
csharp_preserve_single_line_blocks = true
180-
csharp_preserve_single_line_statements = true
193+
csharp_preserve_single_line_statements = true
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: 错误报告
3+
about: 创建一个报告来帮助我们改进
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**描述这个 Bug**
10+
11+
请简要清晰地描述这个错误是什么。
12+
13+
**复现步骤**
14+
15+
复现该问题的步骤如下:
16+
1. ...
17+
2. ...
18+
3. ....
19+
20+
**期望的行为**
21+
22+
请简要描述你原本预期会发生什么。
23+
24+
**截图**
25+
26+
如有需要,请添加截图来帮助说明你的问题。
27+
28+
**运行时版本**
29+
30+
- dotnet 版本:
31+
- `Bing` 版本:
32+
33+
**其他上下文信息**
34+
35+
请添加与该问题有关的其他上下文信息。
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: 功能请求
3+
about: 为该项目提出一个改进建议
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**该功能请求是否与某个问题相关?请描述**
10+
11+
请简要清晰地描述这个问题。例如:每当我遇到 [...] 的时候,我总是感到困扰。
12+
13+
**你期望的解决方案**
14+
15+
请简要清晰地描述你希望实现什么样的功能或行为。
16+
17+
**你考虑过的替代方案**
18+
19+
请简要描述你曾考虑过的其他解决方案或替代功能。
20+
21+
**其他补充信息**
22+
23+
请在此添加与功能请求相关的其他上下文信息或截图。
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: docfx
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
- "master"
7+
- "dev"
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
actions: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in progress and the latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
name: "publish docs"
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
runs-on: ubuntu-latest
28+
steps:
29+
# Check out the branch that triggered this workflow to the 'source' subdirectory
30+
- name: Checkout Code
31+
uses: actions/checkout@v4
32+
- name: Setup .NET SDK
33+
uses: actions/setup-dotnet@v4
34+
with:
35+
dotnet-version: |
36+
6.0.x
37+
7.0.x
38+
8.0.x
39+
9.0.x
40+
- name: install dotnet tools
41+
run: |
42+
dotnet tool install -g dotnet-execute
43+
dotnet tool install -g docfx
44+
# Run a build
45+
- name: Build docs
46+
run: |
47+
dotnet-exec info
48+
dotnet build
49+
docfx ./docs/docfx.json
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
with:
53+
path: 'docs/_site'
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4
57+
# - name: cloudflare-pages
58+
# uses: cloudflare/wrangler-action@v3
59+
# with:
60+
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
61+
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
62+
# command: pages deploy docs/_site --project-name=bing-utils

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,4 +265,5 @@ __pycache__/
265265
*.DotSettings
266266
/bus
267267
/output/netstandard2.0
268-
Bing*.xml
268+
Bing*.xml
269+
/global.json

0 commit comments

Comments
 (0)