Skip to content

Commit 72cf4d2

Browse files
committed
🎉 下一代高性能的异步三菱PLC MC协议通信库
0 parents  commit 72cf4d2

File tree

266 files changed

+29138
-0
lines changed

Some content is hidden

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

266 files changed

+29138
-0
lines changed

.editorconfig

Lines changed: 348 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,348 @@
1+
# 如果要从更高级别的目录继承 .editorconfig 设置,请删除以下行
2+
root = true
3+
4+
# c# 文件
5+
[*.cs]
6+
7+
#### 文件头模板 ####
8+
file_header_template = Copyright (c) MAS (厦门威光) Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0. See LICENSE file in the project root for details.
9+
10+
#### Core EditorConfig 选项 ####
11+
12+
# 编码字符集
13+
charset = utf-8
14+
15+
# 缩进和间距
16+
indent_size = 4
17+
indent_style = space
18+
tab_width = 4
19+
20+
# 新行首选项
21+
end_of_line = crlf
22+
insert_final_newline = false
23+
24+
#### .NET 编码约定 ####
25+
26+
# 组织 Using
27+
dotnet_separate_import_directive_groups = false
28+
dotnet_sort_system_directives_first = false
29+
30+
# this. 和 Me. 首选项
31+
dotnet_style_qualification_for_event = false
32+
dotnet_style_qualification_for_field = false
33+
dotnet_style_qualification_for_method = false
34+
dotnet_style_qualification_for_property = false
35+
36+
# 语言关键字与 bcl 类型首选项
37+
dotnet_style_predefined_type_for_locals_parameters_members = true
38+
dotnet_style_predefined_type_for_member_access = true
39+
40+
# 括号首选项
41+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
42+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
43+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
44+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
45+
46+
# 修饰符首选项
47+
dotnet_style_require_accessibility_modifiers = for_non_interface_members
48+
49+
# 表达式级首选项
50+
dotnet_style_coalesce_expression = true
51+
dotnet_style_collection_initializer = true
52+
dotnet_style_explicit_tuple_names = true
53+
dotnet_style_namespace_match_folder = false
54+
dotnet_style_null_propagation = true
55+
dotnet_style_object_initializer = true
56+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
57+
dotnet_style_prefer_auto_properties = true
58+
dotnet_style_prefer_collection_expression = when_types_loosely_match
59+
dotnet_style_prefer_compound_assignment = true
60+
dotnet_style_prefer_conditional_expression_over_assignment = true
61+
dotnet_style_prefer_conditional_expression_over_return = true
62+
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
63+
dotnet_style_prefer_inferred_anonymous_type_member_names = true
64+
dotnet_style_prefer_inferred_tuple_names = true
65+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
66+
dotnet_style_prefer_simplified_boolean_expressions = true
67+
dotnet_style_prefer_simplified_interpolation = true
68+
69+
# 字段首选项
70+
dotnet_style_readonly_field = true
71+
72+
# 参数首选项
73+
dotnet_code_quality_unused_parameters = all
74+
75+
# 禁止显示首选项
76+
dotnet_remove_unnecessary_suppression_exclusions = none
77+
78+
# 新行首选项
79+
dotnet_style_allow_multiple_blank_lines_experimental = true
80+
dotnet_style_allow_statement_immediately_after_block_experimental = true
81+
82+
#### c# 编码约定 ####
83+
84+
# var 首选项
85+
csharp_style_var_elsewhere = false:silent
86+
csharp_style_var_for_built_in_types = false:silent
87+
csharp_style_var_when_type_is_apparent = false:silent
88+
89+
# Expression-bodied 成员
90+
csharp_style_expression_bodied_accessors = true:silent
91+
csharp_style_expression_bodied_constructors = false:silent
92+
csharp_style_expression_bodied_indexers = true:silent
93+
csharp_style_expression_bodied_lambdas = true:silent
94+
csharp_style_expression_bodied_local_functions = false:silent
95+
csharp_style_expression_bodied_methods = false:silent
96+
csharp_style_expression_bodied_operators = false:silent
97+
csharp_style_expression_bodied_properties = true:silent
98+
99+
# 模式匹配首选项
100+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
101+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
102+
csharp_style_prefer_extended_property_pattern = true:suggestion
103+
csharp_style_prefer_not_pattern = true:suggestion
104+
csharp_style_prefer_pattern_matching = true:suggestion
105+
csharp_style_prefer_switch_expression = true:suggestion
106+
107+
# Null 检查首选项
108+
csharp_style_conditional_delegate_call = true:suggestion
109+
110+
# 修饰符首选项
111+
csharp_prefer_static_local_function = true:suggestion
112+
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
113+
csharp_style_prefer_readonly_struct = true:suggestion
114+
csharp_style_prefer_readonly_struct_member = true:suggestion
115+
116+
# 代码块首选项
117+
csharp_prefer_braces = true:suggestion
118+
csharp_prefer_simple_using_statement = true:suggestion
119+
csharp_style_namespace_declarations = file_scoped:silent
120+
csharp_style_prefer_method_group_conversion = true:silent
121+
csharp_style_prefer_primary_constructors = true:suggestion
122+
csharp_style_prefer_top_level_statements = true:silent
123+
124+
# 表达式级首选项
125+
csharp_prefer_simple_default_expression = true:suggestion
126+
csharp_style_deconstructed_variable_declaration = true:suggestion
127+
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
128+
csharp_style_inlined_variable_declaration = true:suggestion
129+
csharp_style_prefer_index_operator = true:suggestion
130+
csharp_style_prefer_local_over_anonymous_function = true:suggestion
131+
csharp_style_prefer_null_check_over_type_check = true:suggestion
132+
csharp_style_prefer_range_operator = true:suggestion
133+
csharp_style_prefer_tuple_swap = true:suggestion
134+
csharp_style_prefer_utf8_string_literals = true:suggestion
135+
csharp_style_throw_expression = true:suggestion
136+
csharp_style_unused_value_assignment_preference = discard_variable:warning
137+
csharp_style_unused_value_expression_statement_preference = discard_variable:warning
138+
139+
# "using" 指令首选项
140+
csharp_using_directive_placement = outside_namespace:warning
141+
142+
# 新行首选项
143+
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
144+
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
145+
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
146+
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:warning
147+
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
148+
149+
#### C# 格式规则 ####
150+
151+
# 新行首选项
152+
csharp_new_line_before_catch = false
153+
csharp_new_line_before_else = false
154+
csharp_new_line_before_finally = false
155+
csharp_new_line_before_members_in_anonymous_types = false
156+
csharp_new_line_before_members_in_object_initializers = false
157+
csharp_new_line_before_open_brace = none
158+
csharp_new_line_between_query_expression_clauses = false
159+
160+
# 缩进首选项
161+
csharp_indent_block_contents = true
162+
csharp_indent_braces = false
163+
csharp_indent_case_contents = true
164+
csharp_indent_case_contents_when_block = true
165+
csharp_indent_labels = one_less_than_current
166+
csharp_indent_switch_labels = true
167+
168+
# 空格键首选项
169+
csharp_space_after_cast = false
170+
csharp_space_after_colon_in_inheritance_clause = true
171+
csharp_space_after_comma = true
172+
csharp_space_after_dot = false
173+
csharp_space_after_keywords_in_control_flow_statements = true
174+
csharp_space_after_semicolon_in_for_statement = true
175+
csharp_space_around_binary_operators = before_and_after
176+
csharp_space_around_declaration_statements = false
177+
csharp_space_before_colon_in_inheritance_clause = true
178+
csharp_space_before_comma = false
179+
csharp_space_before_dot = false
180+
csharp_space_before_open_square_brackets = false
181+
csharp_space_before_semicolon_in_for_statement = false
182+
csharp_space_between_empty_square_brackets = false
183+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
184+
csharp_space_between_method_call_name_and_opening_parenthesis = false
185+
csharp_space_between_method_call_parameter_list_parentheses = false
186+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
187+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
188+
csharp_space_between_method_declaration_parameter_list_parentheses = false
189+
csharp_space_between_parentheses = false
190+
csharp_space_between_square_brackets = false
191+
192+
# 包装首选项
193+
csharp_preserve_single_line_blocks = true
194+
csharp_preserve_single_line_statements = true
195+
196+
#### 命名样式 ####
197+
198+
# 命名规则
199+
200+
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
201+
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
202+
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
203+
204+
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
205+
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
206+
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
207+
208+
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
209+
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
210+
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
211+
212+
# 符号规范
213+
214+
dotnet_naming_symbols.interface.applicable_kinds = interface
215+
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
216+
dotnet_naming_symbols.interface.required_modifiers =
217+
218+
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
219+
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
220+
dotnet_naming_symbols.types.required_modifiers =
221+
222+
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
223+
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
224+
dotnet_naming_symbols.non_field_members.required_modifiers =
225+
226+
# 命名样式
227+
228+
dotnet_naming_style.pascal_case.required_prefix =
229+
dotnet_naming_style.pascal_case.required_suffix =
230+
dotnet_naming_style.pascal_case.word_separator =
231+
dotnet_naming_style.pascal_case.capitalization = pascal_case
232+
233+
dotnet_naming_style.begins_with_i.required_prefix = I
234+
dotnet_naming_style.begins_with_i.required_suffix =
235+
dotnet_naming_style.begins_with_i.word_separator =
236+
dotnet_naming_style.begins_with_i.capitalization = pascal_case
237+
csharp_prefer_static_anonymous_function = true:suggestion
238+
csharp_prefer_system_threading_lock = true:suggestion
239+
240+
dotnet_naming_style.end_in_async.required_suffix = Async
241+
242+
[*.{cs,vb}]
243+
dotnet_style_qualification_for_field = false:silent
244+
dotnet_style_qualification_for_property = false:silent
245+
dotnet_style_qualification_for_method = false:silent
246+
dotnet_style_qualification_for_event = false:silent
247+
end_of_line = crlf
248+
tab_width = 4
249+
indent_size = 4
250+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
251+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
252+
dotnet_code_quality_unused_parameters = all:warning
253+
dotnet_style_readonly_field = true:suggestion
254+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
255+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
256+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
257+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
258+
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
259+
dotnet_style_allow_statement_immediately_after_block_experimental = false:warning
260+
dotnet_style_coalesce_expression = true:suggestion
261+
dotnet_style_null_propagation = true:suggestion
262+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
263+
dotnet_style_prefer_auto_properties = true:silent
264+
dotnet_style_object_initializer = true:suggestion
265+
dotnet_style_collection_initializer = true:suggestion
266+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
267+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
268+
dotnet_style_prefer_conditional_expression_over_return = true:silent
269+
dotnet_style_explicit_tuple_names = true:suggestion
270+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
271+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
272+
dotnet_style_prefer_compound_assignment = true:suggestion
273+
dotnet_style_prefer_simplified_interpolation = true:suggestion
274+
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
275+
dotnet_style_namespace_match_folder = false:silent
276+
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
277+
dotnet_style_predefined_type_for_member_access = true:silent
278+
dotnet_diagnostic.CA1843.severity = warning
279+
dotnet_diagnostic.CA1842.severity = warning
280+
dotnet_diagnostic.CA1859.severity = warning
281+
dotnet_diagnostic.CA2011.severity = error
282+
dotnet_diagnostic.CA3061.severity = warning
283+
dotnet_diagnostic.IDE0079.severity = none
284+
insert_final_newline = true
285+
286+
# .NET Code Analysis
287+
288+
dotnet_diagnostic.CA1001.severity = warning
289+
dotnet_diagnostic.CA1009.severity = warning
290+
dotnet_diagnostic.CA1016.severity = warning
291+
dotnet_diagnostic.CA1033.severity = warning
292+
dotnet_diagnostic.CA1049.severity = warning
293+
dotnet_diagnostic.CA1060.severity = warning
294+
dotnet_diagnostic.CA1061.severity = warning
295+
dotnet_diagnostic.CA1063.severity = warning
296+
dotnet_diagnostic.CA1065.severity = warning
297+
dotnet_diagnostic.CA1301.severity = warning
298+
dotnet_diagnostic.CA1400.severity = warning
299+
dotnet_diagnostic.CA1401.severity = warning
300+
dotnet_diagnostic.CA1403.severity = warning
301+
dotnet_diagnostic.CA1404.severity = warning
302+
dotnet_diagnostic.CA1405.severity = warning
303+
dotnet_diagnostic.CA1410.severity = warning
304+
dotnet_diagnostic.CA1415.severity = warning
305+
dotnet_diagnostic.CA1821.severity = warning
306+
dotnet_diagnostic.CA1900.severity = warning
307+
dotnet_diagnostic.CA1901.severity = warning
308+
dotnet_diagnostic.CA2002.severity = warning
309+
dotnet_diagnostic.CA2100.severity = warning
310+
dotnet_diagnostic.CA2101.severity = warning
311+
dotnet_diagnostic.CA2108.severity = warning
312+
dotnet_diagnostic.CA2111.severity = warning
313+
dotnet_diagnostic.CA2112.severity = warning
314+
dotnet_diagnostic.CA2114.severity = warning
315+
dotnet_diagnostic.CA2116.severity = warning
316+
dotnet_diagnostic.CA2117.severity = warning
317+
dotnet_diagnostic.CA2122.severity = warning
318+
dotnet_diagnostic.CA2123.severity = warning
319+
dotnet_diagnostic.CA2124.severity = warning
320+
dotnet_diagnostic.CA2126.severity = warning
321+
dotnet_diagnostic.CA2131.severity = warning
322+
dotnet_diagnostic.CA2132.severity = warning
323+
dotnet_diagnostic.CA2133.severity = warning
324+
dotnet_diagnostic.CA2134.severity = warning
325+
dotnet_diagnostic.CA2137.severity = warning
326+
dotnet_diagnostic.CA2138.severity = warning
327+
dotnet_diagnostic.CA2140.severity = warning
328+
dotnet_diagnostic.CA2141.severity = warning
329+
dotnet_diagnostic.CA2146.severity = warning
330+
dotnet_diagnostic.CA2147.severity = warning
331+
dotnet_diagnostic.CA2149.severity = warning
332+
dotnet_diagnostic.CA2200.severity = warning
333+
dotnet_diagnostic.CA2202.severity = warning
334+
dotnet_diagnostic.CA2207.severity = warning
335+
dotnet_diagnostic.CA2212.severity = warning
336+
dotnet_diagnostic.CA2214.severity = warning
337+
dotnet_diagnostic.CA2216.severity = warning
338+
dotnet_diagnostic.CA2220.severity = warning
339+
dotnet_diagnostic.CA2229.severity = warning
340+
dotnet_diagnostic.CA2231.severity = warning
341+
dotnet_diagnostic.CA2232.severity = warning
342+
dotnet_diagnostic.CA2235.severity = warning
343+
dotnet_diagnostic.CA2236.severity = warning
344+
dotnet_diagnostic.CA2237.severity = warning
345+
dotnet_diagnostic.CA2238.severity = warning
346+
dotnet_diagnostic.CA2240.severity = warning
347+
dotnet_diagnostic.CA2241.severity = warning
348+
dotnet_diagnostic.CA2242.severity = warning

0 commit comments

Comments
 (0)