Skip to content

Commit 0e34f75

Browse files
committed
Merge branch 'development'
2 parents a412a43 + a2d2125 commit 0e34f75

104 files changed

Lines changed: 6199 additions & 5584 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.

.editorconfig

Lines changed: 85 additions & 179 deletions
Original file line numberDiff line numberDiff line change
@@ -1,191 +1,97 @@
1-
###############################
2-
# PandaTech Editor Config #
3-
###############################
1+
# .editorconfig — Asatryan.MonoSlice template
2+
# Only entries that deviate from Roslyn SDK defaults. Restating defaults is intentionally avoided.
3+
# Build-time enforcement requires <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>.
44

5+
root = true
56

6-
################################
7-
# ReSharper Generated Settings #
8-
################################
9-
7+
############################################################
8+
# All files — EditorConfig spec keys (no SDK provides these)
9+
############################################################
1010
[*]
11-
charset = utf-8-bom
12-
end_of_line = crlf
13-
trim_trailing_whitespace = false
14-
insert_final_newline = false
11+
charset = utf-8
12+
end_of_line = lf
1513
indent_style = space
1614
indent_size = 4
15+
insert_final_newline = true
16+
trim_trailing_whitespace = true
1717

18-
# Microsoft .NET properties
19-
csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion
20-
csharp_style_prefer_utf8_string_literals = true:suggestion
21-
csharp_style_var_elsewhere = true:suggestion
22-
csharp_style_var_for_built_in_types = true:suggestion
23-
csharp_style_var_when_type_is_apparent = true:suggestion
24-
dotnet_naming_rule.unity_serialized_field_rule.import_to_resharper = True
25-
dotnet_naming_rule.unity_serialized_field_rule.resharper_description = Unity serialized field
26-
dotnet_naming_rule.unity_serialized_field_rule.resharper_guid = 5f0fdb63-c892-4d2c-9324-15c80b22a7ef
27-
dotnet_naming_rule.unity_serialized_field_rule.severity = warning
28-
dotnet_naming_rule.unity_serialized_field_rule.style = lower_camel_case_style
29-
dotnet_naming_rule.unity_serialized_field_rule.symbols = unity_serialized_field_symbols
30-
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
31-
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_accessibilities = *
32-
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds =
33-
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_applicable_kinds = unity_serialised_field
34-
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_required_modifiers = instance
35-
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
36-
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none
37-
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
38-
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
39-
dotnet_style_predefined_type_for_member_access = true:suggestion
40-
dotnet_style_qualification_for_event = false:suggestion
41-
dotnet_style_qualification_for_field = false:suggestion
42-
dotnet_style_qualification_for_method = false:suggestion
43-
dotnet_style_qualification_for_property = false:suggestion
44-
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
45-
46-
# ReSharper properties
47-
resharper_align_linq_query = true
48-
resharper_align_multiline_calls_chain = true
49-
resharper_apply_auto_detected_rules = false
50-
resharper_braces_for_for = required
51-
resharper_braces_for_foreach = required
52-
resharper_braces_for_ifelse = required
53-
resharper_braces_for_while = required
54-
resharper_cpp_insert_final_newline = true
55-
resharper_csharp_indent_size = 3
56-
resharper_csharp_max_enum_members_on_line = 0
57-
resharper_csharp_tab_width = 3
58-
resharper_csharp_wrap_arguments_style = chop_if_long
59-
resharper_csharp_wrap_parameters_style = chop_if_long
60-
resharper_formatter_off_tag = @formatter:off
61-
resharper_formatter_on_tag = @formatter:on
62-
resharper_formatter_tags_enabled = true
63-
resharper_keep_existing_declaration_parens_arrangement = false
64-
resharper_keep_existing_expr_member_arrangement = false
65-
resharper_keep_existing_initializer_arrangement = false
66-
resharper_keep_existing_switch_expression_arrangement = false
67-
resharper_max_array_initializer_elements_on_line = 0
68-
resharper_max_initializer_elements_on_line = 0
69-
resharper_place_accessorholder_attribute_on_same_line = false
70-
resharper_place_accessor_attribute_on_same_line = false
71-
resharper_place_field_attribute_on_same_line = false
72-
resharper_place_simple_anonymousmethod_on_single_line = false
73-
resharper_place_simple_embedded_statement_on_same_line = false
74-
resharper_place_simple_initializer_on_single_line = false
75-
resharper_place_simple_property_pattern_on_single_line = false
76-
resharper_use_indent_from_vs = false
77-
resharper_wrap_after_property_in_chained_method_calls = true
78-
resharper_wrap_array_initializer_style = chop_if_long
79-
resharper_wrap_chained_method_calls = chop_always
80-
resharper_wrap_linq_expressions = chop_always
81-
resharper_wrap_list_pattern = chop_if_long
82-
resharper_wrap_object_and_collection_initializer_style = chop_always
83-
resharper_wrap_property_pattern = chop_always
84-
85-
# ReSharper inspection severities
86-
resharper_arrange_redundant_parentheses_highlighting = hint
87-
resharper_arrange_this_qualifier_highlighting = hint
88-
resharper_arrange_type_member_modifiers_highlighting = hint
89-
resharper_arrange_type_modifiers_highlighting = hint
90-
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
91-
resharper_built_in_type_reference_style_highlighting = hint
92-
resharper_enforce_foreach_statement_braces_highlighting = warning
93-
resharper_enforce_for_statement_braces_highlighting = warning
94-
resharper_enforce_if_statement_braces_highlighting = warning
95-
resharper_enforce_lock_statement_braces_highlighting = warning
96-
resharper_enforce_using_statement_braces_highlighting = warning
97-
resharper_enforce_while_statement_braces_highlighting = warning
98-
resharper_mvc_action_not_resolved_highlighting = warning
99-
resharper_mvc_area_not_resolved_highlighting = warning
100-
resharper_mvc_controller_not_resolved_highlighting = warning
101-
resharper_mvc_masterpage_not_resolved_highlighting = warning
102-
resharper_mvc_partial_view_not_resolved_highlighting = warning
103-
resharper_mvc_template_not_resolved_highlighting = warning
104-
resharper_mvc_view_component_not_resolved_highlighting = warning
105-
resharper_mvc_view_component_view_not_resolved_highlighting = warning
106-
resharper_mvc_view_not_resolved_highlighting = warning
107-
resharper_razor_assembly_not_resolved_highlighting = warning
108-
resharper_redundant_base_qualifier_highlighting = warning
109-
resharper_web_config_module_not_resolved_highlighting = warning
110-
resharper_web_config_type_not_resolved_highlighting = warning
111-
resharper_web_config_wrong_module_highlighting = warning
112-
113-
[{*.har,*.jsb2,*.jsb3,*.json,*.jsonc,*.postman_collection,*.postman_collection.json,*.postman_environment,*.postman_environment.json,.babelrc,.eslintrc,.prettierrc,.stylelintrc,.ws-context,bowerrc,jest.config}]
114-
indent_style = space
18+
############################################################
19+
# Project + config files (2-space convention)
20+
############################################################
21+
[*.{csproj,props,targets,slnx,resx,xml,config,nuspec,json,yml,yaml,md}]
11522
indent_size = 2
11623

117-
[{*.yaml,*.yml}]
118-
indent_style = space
119-
indent_size = 2
120-
121-
[*.cs]
122-
indent_style = space
123-
indent_size = 3
124-
tab_width = 3
125-
126-
[*.{appxmanifest,asax,ascx,aspx,axaml,build,c,c++,c++m,cc,ccm,cginc,compute,cp,cpp,cppm,cshtml,cu,cuh,cxx,cxxm,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,ixx,master,ml,mli,mpp,mq4,mq5,mqh,mxx,nuspec,paml,razor,resw,resx,shader,skin,tpp,usf,ush,uxml,vb,xaml,xamlx,xoml,xsd}]
127-
indent_style = space
128-
indent_size = 4
129-
tab_width = 4
24+
[*.{cmd,bat}]
25+
end_of_line = crlf
13026

131-
#########################
132-
# Custom added settings #
133-
#########################
27+
############################################################
28+
# C# — surface style rules at build that ship below warning by default
29+
############################################################
13430
[*.cs]
135-
dotnet_diagnostic.cs8600.severity = error #Converting null literal or possible null value to non-nullable type.
136-
dotnet_diagnostic.cs8601.severity = error #Possible null reference assignment.
137-
dotnet_diagnostic.cs8602.severity = error #possible dereference of a null reference
138-
dotnet_diagnostic.cs8603.severity = error #possible null reference return
139-
dotnet_diagnostic.cs8604.severity = error #possible null reference argument for parameter
140-
dotnet_diagnostic.cs8605.severity = error #Unboxing a possibly null value
141-
dotnet_diagnostic.cs8618.severity = error # Non-nullable field is uninitialized. Consider declaring as nullable.
142-
dotnet_diagnostic.cs8625.severity = error # Cannot convert null literal to non-nullable reference type.
143-
dotnet_diagnostic.cs8762.severity = error # Nullability of reference types in type doesn't match overridden member.
144-
dotnet_diagnostic.cs1717.severity = error #variable is assigned to itself
145-
dotnet_diagnostic.cs1718.severity = error #comparison made to same variable
146-
dotnet_diagnostic.cs0659.severity = error #overriding object.Equals but not overriding object.GetHashCode
147-
dotnet_diagnostic.cs0251.severity = error #Indexing an array with a negative index (array indices always start at zero)
148-
dotnet_diagnostic.s3363.severity = none #Never set DateTime as PrimaryKey. Ignored as we never do it but have warnings for cache entities.
149-
dotnet_diagnostic.ca2016.severity = error #Forwarding cancellation tokens
150-
csharp_style_namespace_declarations = file_scoped:error
31+
dotnet_diagnostic.IDE0055.severity = warning # apply formatting (dotnet-format)
32+
dotnet_diagnostic.IDE0011.severity = warning # add braces; csharp_prefer_braces is true by default but ships silent
33+
34+
# Bug detectors escalated to error — fail the build, not just nag
35+
dotnet_diagnostic.CA1849.severity = error # call async methods in async context
36+
dotnet_diagnostic.CA1853.severity = error # unnecessary ContainsKey before indexer
37+
dotnet_diagnostic.CA1854.severity = error # prefer IDictionary.TryGetValue
38+
dotnet_diagnostic.CA1862.severity = error # use StringComparison overloads (no ToLower/ToUpper for compare)
39+
dotnet_diagnostic.CA2016.severity = error # forward CancellationToken to async calls
40+
dotnet_diagnostic.CA2017.severity = error # logging template parameter count mismatch
41+
dotnet_diagnostic.CA2023.severity = error # invalid braces in logging message template
42+
dotnet_diagnostic.CA2200.severity = error # rethrow correctly to preserve stack trace
43+
dotnet_diagnostic.CA2245.severity = error # do not assign property to itself
44+
dotnet_diagnostic.CS0659.severity = error # override Equals without GetHashCode
45+
dotnet_diagnostic.CS1717.severity = error # variable assigned to itself
46+
dotnet_diagnostic.CS1718.severity = error # comparison made to same variable
47+
48+
# Non-default option values
49+
csharp_style_namespace_declarations = file_scoped
50+
csharp_using_directive_placement = outside_namespace
51+
dotnet_sort_system_directives_first = true
52+
dotnet_separate_import_directive_groups = false
53+
dotnet_style_namespace_match_folder = true
54+
55+
# ReSharper / Rider inspection suppressions
15156
resharper_entity_framework_model_validation_unlimited_string_length_highlighting = none
15257

153-
154-
#########################
155-
# VS added settings #
156-
#########################
157-
158-
[*.cs]
159-
csharp_style_namespace_declarations = file_scoped:error
160-
csharp_indent_labels = one_less_than_current
161-
csharp_using_directive_placement = outside_namespace:silent
162-
csharp_prefer_simple_using_statement = true:suggestion
163-
csharp_prefer_braces = true:silent
164-
csharp_style_prefer_method_group_conversion = true:silent
165-
csharp_style_prefer_top_level_statements = true:silent
166-
csharp_style_prefer_primary_constructors = true:suggestion
167-
csharp_style_expression_bodied_methods = false:silent
168-
csharp_style_expression_bodied_constructors = false:silent
169-
csharp_style_expression_bodied_operators = false:silent
170-
csharp_style_expression_bodied_properties = true:silent
171-
csharp_style_expression_bodied_indexers = true:silent
172-
csharp_style_expression_bodied_accessors = true:silent
173-
csharp_style_expression_bodied_lambdas = true:silent
174-
csharp_style_expression_bodied_local_functions = false:silent
175-
176-
[{*.yaml,*.yml}]
177-
dotnet_style_namespace_match_folder = true:suggestion
178-
dotnet_style_operator_placement_when_wrapping = beginning_of_line
179-
tab_width = 3
180-
dotnet_style_coalesce_expression = true:suggestion
181-
dotnet_style_null_propagation = true:suggestion
182-
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
183-
dotnet_style_prefer_auto_properties = true:silent
184-
dotnet_style_object_initializer = true:suggestion
185-
dotnet_style_collection_initializer = true:suggestion
186-
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
187-
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
188-
189-
[*.csv]
190-
indent_style = tab
191-
tab_width = 4
58+
# ReSharper / Rider — brace enforcement for Rider Code Cleanup (mirrors IDE0011 scope)
59+
resharper_braces_for_ifelse = required
60+
resharper_braces_for_for = required
61+
resharper_braces_for_foreach = required
62+
resharper_braces_for_while = required
63+
resharper_braces_for_dowhile = required
64+
resharper_braces_for_using = required
65+
resharper_braces_for_lock = required
66+
resharper_braces_for_fixed = required
67+
68+
# ReSharper / Rider — attributes on their own line (Roslyn/dotnet format has no equivalent; Rider Reformat applies it)
69+
resharper_csharp_place_attribute_on_same_line = never
70+
71+
# Naming. More-specific rules first (Roslyn matches the first applicable rule).
72+
# Const fields: PascalCase regardless of accessibility (Framework Design Guidelines).
73+
dotnet_naming_rule.const_fields_pascal.severity = warning
74+
dotnet_naming_rule.const_fields_pascal.symbols = const_fields
75+
dotnet_naming_rule.const_fields_pascal.style = pascal_case
76+
dotnet_naming_symbols.const_fields.applicable_kinds = field
77+
dotnet_naming_symbols.const_fields.applicable_accessibilities = *
78+
dotnet_naming_symbols.const_fields.required_modifiers = const
79+
80+
# Static readonly fields: PascalCase (treated as compile-time-ish constants).
81+
dotnet_naming_rule.static_readonly_pascal.severity = warning
82+
dotnet_naming_rule.static_readonly_pascal.symbols = static_readonly_fields
83+
dotnet_naming_rule.static_readonly_pascal.style = pascal_case
84+
dotnet_naming_symbols.static_readonly_fields.applicable_kinds = field
85+
dotnet_naming_symbols.static_readonly_fields.applicable_accessibilities = *
86+
dotnet_naming_symbols.static_readonly_fields.required_modifiers = static, readonly
87+
88+
# Mutable private/internal instance fields: _camelCase.
89+
dotnet_naming_rule.private_fields_underscore.severity = warning
90+
dotnet_naming_rule.private_fields_underscore.symbols = private_fields
91+
dotnet_naming_rule.private_fields_underscore.style = underscore_camel
92+
dotnet_naming_symbols.private_fields.applicable_kinds = field
93+
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, internal
94+
95+
dotnet_naming_style.pascal_case.capitalization = pascal_case
96+
dotnet_naming_style.underscore_camel.required_prefix = _
97+
dotnet_naming_style.underscore_camel.capitalization = camel_case

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77

88
on:
99
push:
10-
branches: [main]
10+
branches: [ main ]
1111

1212
permissions:
1313
contents: read
@@ -31,8 +31,8 @@ jobs:
3131
- name: Build
3232
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release
3333

34-
# - name: Test
35-
# run: dotnet test --no-build --configuration Release --verbosity normal
34+
# - name: Test
35+
# run: dotnet test --no-build --configuration Release --verbosity normal
3636

3737
- name: Pack
3838
run: dotnet pack ${{ env.PROJECT_PATH }} --no-build --configuration Release --output ${{ env.OUTPUT_DIR }}
@@ -70,4 +70,4 @@ jobs:
7070
--api-key "$NUGET_API_KEY" \
7171
--source "${{ env.NUGET_SOURCE }}" \
7272
--skip-duplicate
73-
fi
73+
fi

.gitignore

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
# dotenv files
77
.env
88

9+
# MaxMind GeoIP databases — consumer's licensed artifact, mounted at runtime (Geo:DatabasePath).
10+
# Never commit: EULA forbids redistribution, file is ~tens of MB and refreshed weekly.
11+
*.mmdb
12+
913
# User-specific files
1014
*.rsuser
1115
*.suo
@@ -88,6 +92,8 @@ StyleCopReport.xml
8892
*.pgc
8993
*.pgd
9094
*.rsp
95+
# but not Directory.Build.rsp, as it configures directory-level build defaults
96+
!Directory.Build.rsp
9197
*.sbr
9298
*.tlb
9399
*.tli
@@ -422,10 +428,6 @@ autom4te.cache/
422428
tarballs/
423429
test-results/
424430

425-
# Mac bundle stuff
426-
*.dmg
427-
*.app
428-
429431
# content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
430432
# General
431433
.DS_Store
@@ -484,7 +486,7 @@ $RECYCLE.BIN/
484486
*.swp
485487

486488
# Added by me
487-
logs
488-
LocalFileStorage
489+
.logs
490+
.LocalFileStorage
489491
*.db*
490-
**.claude
492+
*.claude

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Three modes: `Disabled`, `EnabledForClients` (blocks non-admin routes), `Enabled
119119

120120
## Code Style
121121

122-
- 3-space indentation
122+
- 4-space indentation
123123
- File-scoped namespaces
124124
- C# 14 extension members for clean builder APIs
125125
- `partial class` + `[LoggerMessage]` for high-performance structured logging

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ builder.AddSerilog(
210210
### Log Backends
211211

212212
| Value | Output format |
213-
|-----------------|----------------------------------------------------|
213+
|-----------------|---------------------------------------------------|
214214
| `None` | Console only, no file output |
215215
| `ElasticSearch` | ECS JSON to file (forward with Filebeat/Logstash) |
216216
| `Loki` | Loki JSON to file (forward with Promtail) |
@@ -382,8 +382,10 @@ The list accepts comma- or semicolon-separated URLs. Invalid entries are logged
382382
Built on Polly via `Microsoft.Extensions.Http.Resilience`. Two pipeline variants share the same configuration constants
383383
from a single source of truth:
384384

385-
- **General pipeline** — registered globally via `AddResilienceDefaultPipeline()` on the builder, or used manually via `ResiliencePipelineProvider<string>`
386-
- **HTTP pipeline** — attached per-client via `AddResilienceDefaultPipeline()` on an `IHttpClientBuilder`, with additional `Retry-After` header support for 429 responses
385+
- **General pipeline** — registered globally via `AddResilienceDefaultPipeline()` on the builder, or used manually via
386+
`ResiliencePipelineProvider<string>`
387+
- **HTTP pipeline** — attached per-client via `AddResilienceDefaultPipeline()` on an `IHttpClientBuilder`, with
388+
additional `Retry-After` header support for 429 responses
387389

388390
### Options
389391

0 commit comments

Comments
 (0)