Skip to content

Commit f39cbc6

Browse files
committed
Merge branch 'develop'
2 parents cbf7aec + cef80d8 commit f39cbc6

27 files changed

+789
-499
lines changed

.editorconfig

Lines changed: 199 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,199 @@
1-
; EditorConfig to support per-solution formatting.
2-
; Use the EditorConfig VS add-in to make this work.
3-
; http://editorconfig.org/
4-
5-
; This is the default for the codeline.
6-
root = true
7-
8-
[*]
9-
end_of_line = CRLF
10-
11-
[*.{config,cs,xml}]
12-
indent_style = space
13-
indent_size = 4
14-
trim_trailing_whitespace = true
15-
16-
[*.{proj,props,sln,targets}]
17-
indent_style = tab
18-
trim_trailing_whitespace = true
19-
20-
[*.{kproj,csproj,json,ps1,psd1,psm1,resx,rst}]
21-
indent_style = space
22-
indent_size = 2
23-
trim_trailing_whitespace = true
24-
25-
[NuGet.Config]
26-
indent_style = space
27-
indent_size = 2
28-
trim_trailing_whitespace = true
1+
; EditorConfig to support per-solution formatting.
2+
; Use the EditorConfig VS add-in to make this work.
3+
; http://editorconfig.org/
4+
5+
; This is the default for the codeline.
6+
root = true
7+
8+
[*]
9+
indent_style = space
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
; .NET Code - almost, but not exactly, the same suggestions as corefx
14+
; https://github.com/dotnet/corefx/blob/master/.editorconfig
15+
[*.cs]
16+
indent_size = 4
17+
charset = utf-8-bom
18+
19+
; New line preferences
20+
csharp_new_line_before_open_brace = all
21+
csharp_new_line_before_else = true
22+
csharp_new_line_before_catch = true
23+
csharp_new_line_before_finally = true
24+
csharp_new_line_before_members_in_object_initializers = true
25+
csharp_new_line_before_members_in_anonymous_types = true
26+
csharp_new_line_between_query_expression_clauses = true
27+
28+
; Indentation preferences
29+
csharp_indent_block_contents = true
30+
csharp_indent_braces = false
31+
csharp_indent_case_contents = true
32+
csharp_indent_case_contents_when_block = true
33+
csharp_indent_switch_labels = true
34+
csharp_indent_labels = one_less_than_current
35+
36+
; Modifier preferences
37+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
38+
39+
; Avoid this. unless absolutely necessary
40+
dotnet_style_qualification_for_field = false:suggestion
41+
dotnet_style_qualification_for_property = false:suggestion
42+
dotnet_style_qualification_for_method = false:suggestion
43+
dotnet_style_qualification_for_event = false:suggestion
44+
45+
; Types: use keywords instead of BCL types, using var is fine.
46+
csharp_style_var_when_type_is_apparent = false:none
47+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
48+
dotnet_style_predefined_type_for_member_access = true:suggestion
49+
50+
; Name all constant fields using PascalCase
51+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
52+
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
53+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
54+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
55+
dotnet_naming_symbols.constant_fields.required_modifiers = const
56+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
57+
58+
; Static fields should be _camelCase
59+
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
60+
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
61+
dotnet_naming_rule.static_fields_should_be_camel_case.style = camel_case_underscore_style
62+
dotnet_naming_symbols.static_fields.applicable_kinds = field
63+
dotnet_naming_symbols.static_fields.required_modifiers = static
64+
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
65+
66+
; Static readonly fields should be PascalCase
67+
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.severity = suggestion
68+
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.symbols = static_readonly_fields
69+
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.style = pascal_case_style
70+
dotnet_naming_symbols.static_readonly_fields.applicable_kinds = field
71+
dotnet_naming_symbols.static_readonly_fields.required_modifiers = static, readonly
72+
dotnet_naming_symbols.static_readonly_fields.applicable_accessibilities = private, internal, private_protected
73+
74+
; Internal and private fields should be _camelCase
75+
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
76+
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
77+
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
78+
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
79+
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
80+
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
81+
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
82+
83+
; Code style defaults
84+
csharp_using_directive_placement = outside_namespace:suggestion
85+
dotnet_sort_system_directives_first = true
86+
csharp_prefer_braces = true:refactoring
87+
csharp_preserve_single_line_blocks = true:none
88+
csharp_preserve_single_line_statements = false:none
89+
csharp_prefer_static_local_function = true:suggestion
90+
csharp_prefer_simple_using_statement = false:none
91+
csharp_style_prefer_switch_expression = true:suggestion
92+
93+
; Code quality
94+
dotnet_style_readonly_field = true:suggestion
95+
dotnet_code_quality_unused_parameters = non_public:suggestion
96+
97+
; Expression-level preferences
98+
dotnet_style_object_initializer = true:suggestion
99+
dotnet_style_collection_initializer = true:suggestion
100+
dotnet_style_explicit_tuple_names = true:suggestion
101+
dotnet_style_coalesce_expression = true:suggestion
102+
dotnet_style_null_propagation = true:suggestion
103+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
104+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
105+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
106+
dotnet_style_prefer_auto_properties = true:suggestion
107+
dotnet_style_prefer_conditional_expression_over_assignment = true:refactoring
108+
dotnet_style_prefer_conditional_expression_over_return = true:refactoring
109+
csharp_prefer_simple_default_expression = true:suggestion
110+
111+
# Expression-bodied members
112+
csharp_style_expression_bodied_methods = true:refactoring
113+
csharp_style_expression_bodied_constructors = true:refactoring
114+
csharp_style_expression_bodied_operators = true:refactoring
115+
csharp_style_expression_bodied_properties = true:refactoring
116+
csharp_style_expression_bodied_indexers = true:refactoring
117+
csharp_style_expression_bodied_accessors = true:refactoring
118+
csharp_style_expression_bodied_lambdas = true:refactoring
119+
csharp_style_expression_bodied_local_functions = true:refactoring
120+
121+
# Pattern matching
122+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
123+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
124+
csharp_style_inlined_variable_declaration = true:suggestion
125+
126+
# Null checking preferences
127+
csharp_style_throw_expression = true:suggestion
128+
csharp_style_conditional_delegate_call = true:suggestion
129+
130+
# Other features
131+
csharp_style_namespace_declarations = file_scoped:suggestion
132+
csharp_style_prefer_index_operator = false:none
133+
csharp_style_prefer_range_operator = false:none
134+
csharp_style_pattern_local_over_anonymous_function = false:none
135+
136+
# Space preferences
137+
csharp_space_after_cast = false
138+
csharp_space_after_colon_in_inheritance_clause = true
139+
csharp_space_after_comma = true
140+
csharp_space_after_dot = false
141+
csharp_space_after_keywords_in_control_flow_statements = true
142+
csharp_space_after_semicolon_in_for_statement = true
143+
csharp_space_around_binary_operators = before_and_after
144+
csharp_space_around_declaration_statements = do_not_ignore
145+
csharp_space_before_colon_in_inheritance_clause = true
146+
csharp_space_before_comma = false
147+
csharp_space_before_dot = false
148+
csharp_space_before_open_square_brackets = false
149+
csharp_space_before_semicolon_in_for_statement = false
150+
csharp_space_between_empty_square_brackets = false
151+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
152+
csharp_space_between_method_call_name_and_opening_parenthesis = false
153+
csharp_space_between_method_call_parameter_list_parentheses = false
154+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
155+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
156+
csharp_space_between_method_declaration_parameter_list_parentheses = false
157+
csharp_space_between_parentheses = false
158+
csharp_space_between_square_brackets = false
159+
160+
; .NET project files and MSBuild - match defaults for VS
161+
[*.{csproj,nuspec,proj,projitems,props,shproj,targets,vbproj,vcxproj,vcxproj.filters,vsixmanifest,vsct}]
162+
indent_size = 2
163+
164+
; .NET solution files - match defaults for VS
165+
[*.sln]
166+
indent_style = tab
167+
168+
; Config - match XML and default nuget.config template
169+
[*.config]
170+
indent_size = 2
171+
172+
; Resources - match defaults for VS
173+
[*.resx]
174+
indent_size = 2
175+
176+
; Static analysis rulesets - match defaults for VS
177+
[*.ruleset]
178+
indent_size = 2
179+
180+
; HTML, XML - match defaults for VS
181+
[*.{cshtml,html,xml}]
182+
indent_size = 4
183+
184+
; JavaScript and JS mixes - match eslint settings; JSON also matches .NET Core templates
185+
[*.{js,json,ts,vue}]
186+
indent_size = 2
187+
188+
; Markdown - match markdownlint settings
189+
[*.{md,markdown}]
190+
indent_size = 2
191+
192+
; PowerShell - match defaults for New-ModuleManifest and PSScriptAnalyzer Invoke-Formatter
193+
[*.{ps1,psd1,psm1}]
194+
indent_size = 4
195+
charset = utf-8-bom
196+
197+
; ReStructuredText - standard indentation format from examples
198+
[*.rst]
199+
indent_size = 2

.git-blame-ignore-revs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ignore revisions in git blame - set your git config to use the file by convention:
2+
# git config blame.ignoreRevsFile .git-blame-ignore-revs
3+
#
4+
# Optional additional git config:
5+
# Mark any lines that have had a commit skipped using --ignore-rev with a `?`
6+
# git config --global blame.markIgnoredLines true
7+
# Mark any lines that were added in a skipped commit and can not be attributed with a `*`
8+
# git config --global blame.markUnblamableLines true
9+
10+
# Convert to file-scoped namespaces.
11+
4cff99d06649c3246454ab7d0cb0aebe38fbe607

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,6 @@ $RECYCLE.BIN/
164164

165165
# Mac crap
166166
.DS_Store
167+
168+
# JetBrains Rider
169+
.idea/

.vscode/extensions.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"recommendations": [
3+
"bierner.markdown-emoji",
4+
"davidanson.vscode-markdownlint",
5+
"editorconfig.editorconfig",
6+
"formulahendry.dotnet-test-explorer",
7+
"gruntfuggly.todo-tree",
8+
"ms-dotnettools.csharp",
9+
"ryanluker.vscode-coverage-gutters",
10+
"stkb.rewrap",
11+
"travisillig.vscode-json-stable-stringify"
12+
]
13+
}

.vscode/launch.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,12 @@
55
],
66
"console": "internalConsole",
77
"cwd": "${workspaceFolder}/test/Autofac.Extras.CommonServiceLocator.Test",
8-
"name": ".NET Core Launch (console)",
8+
"name": "Launch Tests (console)",
99
"preLaunchTask": "build",
10-
"program": "${workspaceFolder}/test/Autofac.Extras.CommonServiceLocator.Test/bin/Debug/netcoreapp2.1/Autofac.Extras.CommonServiceLocator.Test.dll",
10+
"program": "${workspaceFolder}/test/Autofac.Extras.CommonServiceLocator.Test/bin/Debug/net7.0/Autofac.Extras.CommonServiceLocator.Test.dll",
1111
"request": "launch",
1212
"stopAtEntry": false,
1313
"type": "coreclr"
14-
},
15-
{
16-
"name": ".NET Core Attach",
17-
"processId": "${command:pickProcess}",
18-
"request": "attach",
19-
"type": "coreclr"
2014
}
2115
],
2216
"version": "0.2.0"

.vscode/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
{
2+
"cSpell.words": [
3+
"autofac",
4+
"cref",
5+
"inheritdoc",
6+
"langword",
7+
"paramref",
8+
"seealso",
9+
"typeparam",
10+
"xunit"
11+
],
12+
"coverage-gutters.coverageBaseDir": "artifacts/coverage",
13+
"coverage-gutters.coverageFileNames": [
14+
"coverage.net7.0.info"
15+
],
216
"dotnet-test-explorer.runInParallel": true,
317
"dotnet-test-explorer.testProjectPath": "test/**/*.Test.csproj"
418
}

.vscode/tasks.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@
1515
"label": "build",
1616
"problemMatcher": "$msCompile",
1717
"type": "process"
18+
},
19+
{
20+
"args": [
21+
"test",
22+
"${workspaceFolder}/Autofac.Extras.CommonServiceLocator.sln",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary",
25+
"--results-directory",
26+
"\"artifacts/coverage\"",
27+
"--logger:trx",
28+
"/p:CoverletOutput=\"${workspaceFolder}/artifacts/coverage/\"",
29+
"/p:CollectCoverage=true",
30+
"/p:CoverletOutputFormat=lcov",
31+
"/p:Exclude=\"[System.*]*\"",
32+
"-m:1"
33+
],
34+
"command": "dotnet",
35+
"group": {
36+
"isDefault": true,
37+
"kind": "test"
38+
},
39+
"label": "test",
40+
"problemMatcher": "$msCompile",
41+
"type": "process"
1842
}
1943
],
2044
"version": "2.0.0"

Autofac.Extras.CommonServiceLocator.sln

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1212
appveyor.yml = appveyor.yml
1313
global.json = global.json
1414
NuGet.Config = NuGet.Config
15+
.gitignore = .gitignore
1516
EndProjectSection
1617
EndProject
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C495880E-5918-499B-8395-52286E81032E}"
19+
EndProject
20+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8D91D8BA-DBE1-43B5-9CBF-2D26B4DCEC69}"
21+
EndProject
22+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{44425304-538B-473A-BA28-D681D1882B30}"
23+
ProjectSection(SolutionItems) = preProject
24+
build\Analyzers.ruleset = build\Analyzers.ruleset
25+
build\Autofac.Build.psd1 = build\Autofac.Build.psd1
26+
build\Autofac.Build.psm1 = build\Autofac.Build.psm1
27+
build\CodeAnalysisDictionary.xml = build\CodeAnalysisDictionary.xml
28+
build\icon.png = build\icon.png
29+
EndProjectSection
30+
EndProject
1731
Global
1832
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1933
Debug|Any CPU = Debug|Any CPU
@@ -35,4 +49,8 @@ Global
3549
GlobalSection(ExtensibilityGlobals) = postSolution
3650
SolutionGuid = {5BF15888-EFB2-4BB2-B938-EAF74B956AB5}
3751
EndGlobalSection
52+
GlobalSection(NestedProjects) = preSolution
53+
{7A6DB23D-117E-4742-A9FA-8A6956DF6829} = {C495880E-5918-499B-8395-52286E81032E}
54+
{304C6D1B-7264-408E-BE9B-4F6E6462CF08} = {8D91D8BA-DBE1-43B5-9CBF-2D26B4DCEC69}
55+
EndGlobalSection
3856
EndGlobal

0 commit comments

Comments
 (0)