From 3432fcbfc46e9a1f67debca5114bc9e8a3f162a1 Mon Sep 17 00:00:00 2001 From: Adrian Ochmann Date: Thu, 12 Jan 2023 09:54:02 +0100 Subject: [PATCH 1/5] refactor: moved build props --- Cogworks.AzureSearch.sln | 4 ++-- Directory.Build.props => src/Directory.Build.props | 0 Directory.Build.targets => src/Directory.Build.targets | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename Directory.Build.props => src/Directory.Build.props (100%) rename Directory.Build.targets => src/Directory.Build.targets (100%) diff --git a/Cogworks.AzureSearch.sln b/Cogworks.AzureSearch.sln index 478cff6..8231102 100644 --- a/Cogworks.AzureSearch.sln +++ b/Cogworks.AzureSearch.sln @@ -14,11 +14,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".solution-items", ".solutio linting\.editorconfig = linting\.editorconfig CHANGELOG.md = CHANGELOG.md linting\codeanalysis.ruleset = linting\codeanalysis.ruleset - Directory.Build.props = Directory.Build.props - Directory.Build.targets = Directory.Build.targets LICENSE = LICENSE README.md = README.md linting\stylecop.json = linting\stylecop.json + src\Directory.Build.props = src\Directory.Build.props + src\Directory.Build.targets = src\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{A82EFC5A-0A90-4701-8106-2C5044592572}" diff --git a/Directory.Build.props b/src/Directory.Build.props similarity index 100% rename from Directory.Build.props rename to src/Directory.Build.props diff --git a/Directory.Build.targets b/src/Directory.Build.targets similarity index 100% rename from Directory.Build.targets rename to src/Directory.Build.targets From a8a2f2993c8bd122af244dc754dd2dae64e89416 Mon Sep 17 00:00:00 2001 From: Adrian Ochmann Date: Thu, 12 Jan 2023 10:08:33 +0100 Subject: [PATCH 2/5] refactor: added main editorconfig --- .editorconfig | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 - 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..b8b2229 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,65 @@ + +# Version: 1.6.2 (Using https://semver.org/) +# Updated: 2020-11-02 +# See https://github.com/RehanSaeed/EditorConfig/releases for release notes. +# See https://github.com/RehanSaeed/EditorConfig for updates to this file. +# See http://EditorConfig.org for more information about .editorconfig files. + +########################################## +# Common Settings +########################################## + +# This file is the top-most EditorConfig file +root = true + +# All Files +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +insert_final_newline = false +trim_trailing_whitespace = true + +########################################## +# File Extension Settings +########################################## + +# Visual Studio Solution Files +[*.sln] +indent_style = tab + +# Visual Studio XML Project Files +[*.{csproj,vbproj,vcxproj.filters,proj,projitems,shproj}] +indent_size = 2 + +# XML Configuration Files +[*.{xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}] +indent_size = 2 + +# JSON Files +[*.{json,json5,webmanifest}] +indent_size = 2 + +# YAML Files +[*.{yml,yaml}] +indent_size = 2 + +# Markdown Files +[*.md] +trim_trailing_whitespace = false + +# Web Files +[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,svg,vue}] +indent_size = 2 + +# Batch Files +[*.{cmd,bat}] +end_of_line = crlf + +# Bash Files +[*.sh] +end_of_line = lf + +# Makefiles +[Makefile] +indent_style = tab \ No newline at end of file diff --git a/.gitignore b/.gitignore index 003a23f..eb37c39 100644 --- a/.gitignore +++ b/.gitignore @@ -805,6 +805,5 @@ $RECYCLE.BIN/ # End of https://www.toptal.com/developers/gitignore/api/windows,linux,macos,visualstudio,visualstudiocode,rider,csharp,aspnetcore,dotnetcore -.editorconfig !linting/.editorconfig *.hash From 7bdb353c632504294b224f328916727cfc178d2a Mon Sep 17 00:00:00 2001 From: Adrian Ochmann Date: Fri, 7 Apr 2023 13:06:45 +0200 Subject: [PATCH 3/5] chore: updated linting --- Cogworks.AzureSearch.sln | 29 +- Cogworks.AzureSearch.sln.DotSettings | 2 + linting/.editorconfig | 357 -------------- linting/codeanalysis.ruleset | 456 ------------------ linting/stylecop.json | 42 -- src/.editorconfig | 452 ++++++++++++++++- .../Constants/StringConstants/Separators.cs | 2 +- .../src/Constants/StringConstants/Terms.cs | 2 +- .../IndexCreateOrUpdateException.cs | 2 +- src/Directory.Build.props | 32 +- src/Directory.Build.targets | 15 +- .../tests/.editorconfig | 2 + .../AutofacIocExtensionTests.cs | 86 ++-- .../tests/.editorconfig | 2 + .../LightInjectIocExtensionTests.cs | 87 ++-- .../tests/.editorconfig | 2 + ...AzureSearch.IoC.Microsoft.UnitTests.csproj | 2 +- .../MicrosoftIocExtensionTests.cs | 87 ++-- .../tests/.editorconfig | 2 + .../UmbracoIocExtensionTests.cs | 101 ++-- 20 files changed, 677 insertions(+), 1085 deletions(-) create mode 100644 Cogworks.AzureSearch.sln.DotSettings delete mode 100644 linting/.editorconfig delete mode 100644 linting/codeanalysis.ruleset delete mode 100644 linting/stylecop.json create mode 100644 src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/.editorconfig create mode 100644 src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/.editorconfig create mode 100644 src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/.editorconfig create mode 100644 src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/.editorconfig diff --git a/Cogworks.AzureSearch.sln b/Cogworks.AzureSearch.sln index 8231102..e0c42a1 100644 --- a/Cogworks.AzureSearch.sln +++ b/Cogworks.AzureSearch.sln @@ -11,14 +11,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".solution-items", ".solution-items", "{9D0073AC-CE06-400A-B362-297CB9A332BE}" ProjectSection(SolutionItems) = preProject - linting\.editorconfig = linting\.editorconfig CHANGELOG.md = CHANGELOG.md - linting\codeanalysis.ruleset = linting\codeanalysis.ruleset LICENSE = LICENSE README.md = README.md - linting\stylecop.json = linting\stylecop.json - src\Directory.Build.props = src\Directory.Build.props - src\Directory.Build.targets = src\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{A82EFC5A-0A90-4701-8106-2C5044592572}" @@ -49,6 +44,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{965C0D6C-B421-48EF-9E02-82FF044B9CEA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{99E4E02C-94B6-43AC-AB9B-F04BE5D8BC92}" + ProjectSection(SolutionItems) = preProject + src\IoC.Providers\Cogworks.AzureSearch.IoC.Microsoft\tests\.editorconfig = src\IoC.Providers\Cogworks.AzureSearch.IoC.Microsoft\tests\.editorconfig + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{E0093B96-E28A-4471-8417-026A9B1101A8}" EndProject @@ -61,6 +59,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A3AAC530-960E-4732-AB87-DBA9470B229D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CD92425E-77AC-451B-9595-0A91D6661B6F}" + ProjectSection(SolutionItems) = preProject + src\IoC.Providers\Cogworks.AzureSearch.IoC.Autofac\tests\.editorconfig = src\IoC.Providers\Cogworks.AzureSearch.IoC.Autofac\tests\.editorconfig + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cogworks.AzureSearch.IoC.Autofac", "src\IoC.Providers\Cogworks.AzureSearch.IoC.Autofac\src\Cogworks.AzureSearch.IoC.Autofac.csproj", "{F74DA3A4-F44F-4484-A48C-416DEBDC73A7}" EndProject @@ -73,6 +74,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8CAFFC72-9B26-484D-98F4-0DF8D4D5FE6C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0DC139DC-86BE-4EBC-8110-E78B39D02A05}" + ProjectSection(SolutionItems) = preProject + src\IoC.Providers\Cogworks.AzureSearch.IoC.LightInject\tests\.editorconfig = src\IoC.Providers\Cogworks.AzureSearch.IoC.LightInject\tests\.editorconfig + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{CE0638CA-4C05-4DD7-AC83-3271F729B474}" EndProject @@ -85,6 +89,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C13DFF15-6FB7-4BA8-A82B-13F92287D332}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3BC9DA9E-CB54-4799-A7DF-7F993BFA89E9}" + ProjectSection(SolutionItems) = preProject + src\IoC.Providers\Cogworks.AzureSearch.IoC.Umbraco\tests\.editorconfig = src\IoC.Providers\Cogworks.AzureSearch.IoC.Umbraco\tests\.editorconfig + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{1F0E1693-8441-48D0-B4F6-37E816B5E898}" EndProject @@ -92,6 +99,17 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cogworks.AzureSearch.IoC.Um EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cogworks.AzureSearch.IoC.Umbraco.UnitTests", "src\IoC.Providers\Cogworks.AzureSearch.IoC.Umbraco\tests\UnitTests\Cogworks.AzureSearch.IoC.Umbraco.UnitTests\Cogworks.AzureSearch.IoC.Umbraco.UnitTests.csproj", "{723295D3-FD9C-47FC-AC58-2E075D7573A9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".lintings", ".lintings", "{70875320-89C3-421E-9C1D-8C9761579456}" + ProjectSection(SolutionItems) = preProject + src\.editorconfig = src\.editorconfig + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".project-configuration", ".project-configuration", "{F58D91B1-B2EB-4D83-BEC9-F57F9FB897FC}" + ProjectSection(SolutionItems) = preProject + src\Directory.Build.props = src\Directory.Build.props + src\Directory.Build.targets = src\Directory.Build.targets + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -173,6 +191,7 @@ Global {1F0E1693-8441-48D0-B4F6-37E816B5E898} = {3BC9DA9E-CB54-4799-A7DF-7F993BFA89E9} {C24EEC89-FDED-4AA1-AB44-26FD6D3D8533} = {C13DFF15-6FB7-4BA8-A82B-13F92287D332} {723295D3-FD9C-47FC-AC58-2E075D7573A9} = {1F0E1693-8441-48D0-B4F6-37E816B5E898} + {70875320-89C3-421E-9C1D-8C9761579456} = {F58D91B1-B2EB-4D83-BEC9-F57F9FB897FC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DC813CF7-BD65-4CD5-B0B7-7B1F828A9909} diff --git a/Cogworks.AzureSearch.sln.DotSettings b/Cogworks.AzureSearch.sln.DotSettings new file mode 100644 index 0000000..ad32730 --- /dev/null +++ b/Cogworks.AzureSearch.sln.DotSettings @@ -0,0 +1,2 @@ + + True \ No newline at end of file diff --git a/linting/.editorconfig b/linting/.editorconfig deleted file mode 100644 index 4149498..0000000 --- a/linting/.editorconfig +++ /dev/null @@ -1,357 +0,0 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file -root = true - -# Don't use tabs for indentation. -[*] -indent_style = space -# (Please don't specify an indent_size here; that has too many unintended consequences.) - -# Code files -[*.{cs,csx,vb,vbx}] -indent_size = 4 -insert_final_newline = false -charset = utf-8-bom -trim_trailing_whitespace = true - -# XML project files -[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] -indent_size = 2 - -# XML config files -[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] -indent_size = 2 - -# JSON files -[*.json] -indent_size = 2 - -# Powershell files -[*.ps1] -indent_size = 2 - -# Shell script files -[*.sh] -end_of_line = lf -indent_size = 2 - -# Dotnet code style settings: -[*.{cs,vb}] -# Sort using and Import directives with System.* appearing first -dotnet_sort_system_directives_first = true -dotnet_separate_import_directive_groups = false - -# Avoid "this." and "Me." if not necessary -dotnet_style_qualification_for_event = false:error -dotnet_style_qualification_for_field = false:error -dotnet_style_qualification_for_method = false:error -dotnet_style_qualification_for_property = false:error - -# Suggest more modern language features when available -dotnet_style_object_initializer = true:suggestion -dotnet_style_collection_initializer = true:suggestion -dotnet_style_coalesce_expression = true:suggestion -dotnet_style_null_propagation = true:suggestion -dotnet_style_explicit_tuple_names = true:suggestion - -# Non-private static fields are PascalCase -dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = error -dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields -dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style - -dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field -dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected -dotnet_naming_symbols.non_private_static_fields.required_modifiers = static - -dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case - -# Non-private readonly fields are PascalCase -dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = error -dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields -dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_readonly_field_style - -dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field -dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected -dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly - -dotnet_naming_style.non_private_readonly_field_style.capitalization = pascal_case - -# Constants are PascalCase -dotnet_naming_rule.constants_should_be_pascal_case.severity = error -dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants -dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style - -dotnet_naming_symbols.constants.applicable_kinds = field -dotnet_naming_symbols.constants.required_modifiers = const - -dotnet_naming_style.constant_style.capitalization = pascal_case - -# Static fields are camelCase and start with _ -dotnet_naming_rule.static_fields_should_be_camel_case.severity = error -dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields -dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style - -dotnet_naming_symbols.static_fields.applicable_kinds = field -dotnet_naming_symbols.static_fields.required_modifiers = static - -dotnet_naming_style.static_field_style.capitalization = camel_case -dotnet_naming_style.static_field_style.required_prefix = _ - -# Instance fields are camelCase and start with _ -dotnet_naming_rule.instance_fields_should_be_camel_case.severity = error -dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields -dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style - -dotnet_naming_symbols.instance_fields.applicable_kinds = field - -dotnet_naming_style.instance_field_style.capitalization = camel_case -dotnet_naming_style.instance_field_style.required_prefix = _ - -# Locals and parameters are camelCase -dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion -dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters -dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style - -dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local - -dotnet_naming_style.camel_case_style.capitalization = camel_case - -# Local functions are PascalCase -dotnet_naming_rule.local_functions_should_be_pascal_case.severity = error -dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions -dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style - -dotnet_naming_symbols.local_functions.applicable_kinds = local_function - -dotnet_naming_style.local_function_style.capitalization = pascal_case - -# By default, name items with PascalCase -dotnet_naming_rule.members_should_be_pascal_case.severity = error -dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members -dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style - -dotnet_naming_symbols.all_members.applicable_kinds = * - -dotnet_naming_style.pascal_case_style.capitalization = pascal_case - -# CSharp code style settings: - -# IDE0046: Convert to conditional expression -dotnet_diagnostic.IDE0046.severity = suggestion - -[*.cs] -# Newline settings -csharp_new_line_before_open_brace = all -csharp_new_line_before_else = true -csharp_new_line_before_catch = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_members_in_anonymous_types = true -csharp_new_line_between_query_expression_clauses = true - -# Indentation preferences -csharp_indent_block_contents = true -csharp_indent_braces = false -csharp_indent_case_contents = true -csharp_indent_case_contents_when_block = true -csharp_indent_switch_labels = true -csharp_indent_labels = flush_left - -# Prefer "var" everywhere -csharp_style_var_for_built_in_types = true:suggestion -csharp_style_var_when_type_is_apparent = true:suggestion -csharp_style_var_elsewhere = true:suggestion - -# Prefer method-like constructs to have a block body -csharp_style_expression_bodied_methods = true:suggestion -csharp_style_expression_bodied_constructors = true:suggestion -csharp_style_expression_bodied_operators = true:suggestion - -# Prefer property-like constructs to have an expression-body -csharp_style_expression_bodied_properties = true:suggestion -csharp_style_expression_bodied_indexers = true:suggestion -csharp_style_expression_bodied_accessors = true:silent -csharp_style_expression_bodied_local_functions = false:suggestion -csharp_style_expression_bodied_lambdas = true:suggestion - - -# Suggest more modern language features when available -csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion -csharp_style_pattern_matching_over_as_with_null_check = true:suggestion -csharp_style_inlined_variable_declaration = true:suggestion -csharp_style_throw_expression = true:suggestion -csharp_style_conditional_delegate_call = true:suggestion -csharp_style_prefer_switch_expression = true:suggestion - -# Space preferences -csharp_space_after_cast = false -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_after_comma = true -csharp_space_after_dot = false -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_after_semicolon_in_for_statement = true -csharp_space_around_binary_operators = before_and_after -csharp_space_around_declaration_statements = false -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_before_comma = false -csharp_space_before_dot = false -csharp_space_before_open_square_brackets = false -csharp_space_before_semicolon_in_for_statement = false -csharp_space_between_empty_square_brackets = false -csharp_space_between_method_call_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_declaration_name_and_open_parenthesis = false -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_parentheses = false -csharp_space_between_square_brackets = false - -# Blocks are allowed -csharp_prefer_braces = true:error -csharp_preserve_single_line_blocks = true -csharp_preserve_single_line_statements = true - -# warning RS0037: PublicAPI.txt is missing '#nullable enable' -dotnet_diagnostic.RS0037.severity = none - -# Ganerated - -#### Naming styles #### - -# Naming rules - -dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion -dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface -dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i - -dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.types_should_be_pascal_case.symbols = types -dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case - -dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members -dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case - -# Symbol specifications - -dotnet_naming_symbols.interface.applicable_kinds = interface -dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.interface.required_modifiers = - -dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum -dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.types.required_modifiers = - -dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method -dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.non_field_members.required_modifiers = - -# Naming styles - -dotnet_naming_style.pascal_case.required_prefix = -dotnet_naming_style.pascal_case.required_suffix = -dotnet_naming_style.pascal_case.word_separator = -dotnet_naming_style.pascal_case.capitalization = pascal_case - -dotnet_naming_style.begins_with_i.required_prefix = I -dotnet_naming_style.begins_with_i.required_suffix = -dotnet_naming_style.begins_with_i.word_separator = -dotnet_naming_style.begins_with_i.capitalization = pascal_case - -# 'using' directive preferences -csharp_using_directive_placement = outside_namespace:error - -# Expression-level preferences -csharp_prefer_simple_default_expression = true:suggestion -csharp_style_pattern_local_over_anonymous_function = true:suggestion -csharp_style_prefer_index_operator = true:suggestion -csharp_style_prefer_range_operator = true:suggestion -csharp_style_unused_value_assignment_preference = discard_variable:error -csharp_style_unused_value_expression_statement_preference = discard_variable:error - -# Modifier preferences -csharp_prefer_static_local_function = true:warning -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async - -# Parameter preferences -dotnet_code_quality_unused_parameters = all:error - -# Field preferences -dotnet_style_readonly_field = true:error - -# Expression-level preferences -csharp_style_deconstructed_variable_declaration = true:suggestion -dotnet_style_prefer_auto_properties = true:warning -dotnet_style_prefer_compound_assignment = true:suggestion -dotnet_style_prefer_conditional_expression_over_assignment = true:warning -dotnet_style_prefer_conditional_expression_over_return = true:suggestion -dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion -dotnet_style_prefer_inferred_tuple_names = true:suggestion -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion - -# Modifier preferences -dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent - -# Parentheses preferences -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent - -# Language keywords vs BCL types preferences -dotnet_style_predefined_type_for_locals_parameters_members = true:error -dotnet_style_predefined_type_for_member_access = true:error - -# Code-block preferences -csharp_prefer_simple_using_statement = true:suggestion - - -# Treat all cs files in this folder as generated code - -# SA1202: Elements should be ordered by access -dotnet_diagnostic.SA1202.severity = none - -# CA1021: Avoid out parameters -dotnet_diagnostic.CA1021.severity = none - -# CA1308: Normalize strings to uppercase -dotnet_diagnostic.CA1308.severity = suggestion - -# CA1310: Specify StringComparison for correctness -dotnet_diagnostic.CA1310.severity = suggestion - -# SA1629: Documentation text should end with a period -dotnet_diagnostic.SA1629.severity = suggestion - -# SA1101: Prefix local calls with this -dotnet_diagnostic.SA1101.severity = none - -# CA2007: Consider calling ConfigureAwait on the awaited task -dotnet_diagnostic.CA2007.severity = suggestion - -# IDE0073: The file header is missing or not located at the top of the file -dotnet_diagnostic.IDE0046.severity = none - -# SA1200: A C# using directive is placed outside of a namespace element. -dotnet_diagnostic.SA1200.severity = none - -# SA1633: A C# code file is missing a standard file header. -dotnet_diagnostic.SA1633.severity = none - -# CA1032: Implement standard exception constructors -dotnet_diagnostic.CA1032.severity = none - - -[*.generated.cs] - -generated_code = true - -dotnet_diagnostic.SYN.severity = none -dotnet_diagnostic.CS0108.severity = none -dotnet_diagnostic.CS1591.severity = none -dotnet_diagnostic.CS3008.severity = none -dotnet_diagnostic.CS3009.severity = none -dotnet_diagnostic.CS0114.severity = none -dotnet_diagnostic.CS8019.severity = none \ No newline at end of file diff --git a/linting/codeanalysis.ruleset b/linting/codeanalysis.ruleset deleted file mode 100644 index 2d1c51e..0000000 --- a/linting/codeanalysis.ruleset +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/linting/stylecop.json b/linting/stylecop.json deleted file mode 100644 index 766e11b..0000000 --- a/linting/stylecop.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", - "settings": { - "maintainabilityRules": {}, - "indentation": {}, - "documentationRules": { - "companyName": "The Cogworks Ltd", - "copyrightText": "Copyright (c) 2020 {companyName}\nSee LICENSE for more details.", - "headerDecoration": "-----------------------------------------------------------------", - "xmlHeader": true, - "documentInterfaces": false, - "documentInternalElements": false, - "documentExposedElements": false, - "documentPrivateElements": false, - "documentPrivateFields": false, - "documentationCulture": "en-GB", - "fileNamingConvention": "stylecop" - }, - "layoutRules": { - "newlineAtEndOfFile": "omit", - "allowConsecutiveUsings": false - }, - "spacingRules": { - - }, - "namingRules": { - "allowCommonHungarianPrefixes": false - }, - "orderingRules": { - "elementOrder": [ - "kind", - "constant", - "accessibility", - "static", - "readonly" - ], - "usingDirectivesPlacement": "outsideNamespace", - "blankLinesBetweenUsingGroups": "omit" - }, - "readabilityRules": {} - } -} \ No newline at end of file diff --git a/src/.editorconfig b/src/.editorconfig index 169cce3..807c153 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -1,4 +1,452 @@ +# Don't use tabs for indentation. +[*] +indent_style = space +# (Please don't specify an indent_size here; that has too many unintended consequences.) + +# Code files +[*.{cs,csx,vb,vbx}] +indent_size = 4 +insert_final_newline = false +charset = utf-8-bom +trim_trailing_whitespace = true + +# XML project files +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] +indent_size = 2 + +# XML config files +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] +indent_size = 2 + +# JSON files +[*.json] +indent_size = 2 + +# Powershell files +[*.ps1] +indent_size = 2 + +# Shell script files +[*.sh] +end_of_line = lf +indent_size = 2 + +# Dotnet code style settings: +[*.{cs,vb}] +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true +dotnet_separate_import_directive_groups = false + +# Avoid "this." and "Me." if not necessary +dotnet_style_qualification_for_event = false:error +dotnet_style_qualification_for_field = false:error +dotnet_style_qualification_for_method = false:error +dotnet_style_qualification_for_property = false:error + +# Suggest more modern language features when available +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion + +# Non-private static fields are PascalCase +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = error +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style + +dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field +dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected +dotnet_naming_symbols.non_private_static_fields.required_modifiers = static + +dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case + +# Non-private readonly fields are PascalCase +dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = error +dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields +dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_readonly_field_style + +dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected +dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly + +dotnet_naming_style.non_private_readonly_field_style.capitalization = pascal_case + +# Constants are PascalCase +dotnet_naming_rule.constants_should_be_pascal_case.severity = error +dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants +dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style + +dotnet_naming_symbols.constants.applicable_kinds = field +dotnet_naming_symbols.constants.required_modifiers = const + +dotnet_naming_style.constant_style.capitalization = pascal_case + +# Static fields are camelCase and start with _ +dotnet_naming_rule.static_fields_should_be_camel_case.severity = error +dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields +dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style + +dotnet_naming_symbols.static_fields.applicable_kinds = field +dotnet_naming_symbols.static_fields.required_modifiers = static + +dotnet_naming_style.static_field_style.capitalization = camel_case +dotnet_naming_style.static_field_style.required_prefix = _ + +# Instance fields are camelCase and start with _ +dotnet_naming_rule.instance_fields_should_be_camel_case.severity = error +dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields +dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style + +dotnet_naming_symbols.instance_fields.applicable_kinds = field + +dotnet_naming_style.instance_field_style.capitalization = camel_case +dotnet_naming_style.instance_field_style.required_prefix = _ + +# Locals and parameters are camelCase +dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion +dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters +dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style + +dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local + +dotnet_naming_style.camel_case_style.capitalization = camel_case + +# Local functions are PascalCase +dotnet_naming_rule.local_functions_should_be_pascal_case.severity = error +dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions +dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style + +dotnet_naming_symbols.local_functions.applicable_kinds = local_function + +dotnet_naming_style.local_function_style.capitalization = pascal_case + +# By default, name items with PascalCase +dotnet_naming_rule.members_should_be_pascal_case.severity = error +dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members +dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style + +dotnet_naming_symbols.all_members.applicable_kinds = * + +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +# CSharp code style settings: + +# IDE0046: Convert to conditional expression +dotnet_diagnostic.IDE0046.severity = suggestion + [*.cs] +# Newline settings +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left + +# Prefer "var" everywhere +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = true:suggestion + +# Prefer method-like constructs to have a block body +csharp_style_expression_bodied_methods = true:suggestion +csharp_style_expression_bodied_constructors = true:suggestion +csharp_style_expression_bodied_operators = true:suggestion + +# Prefer property-like constructs to have an expression-body +csharp_style_expression_bodied_properties = true:suggestion +csharp_style_expression_bodied_indexers = true:suggestion +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_local_functions = false:suggestion +csharp_style_expression_bodied_lambdas = true:suggestion + + +# Suggest more modern language features when available +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion +csharp_style_prefer_switch_expression = true:suggestion + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false + +# Blocks are allowed +csharp_prefer_braces = true:error +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = true + +# warning RS0037: PublicAPI.txt is missing '#nullable enable' +dotnet_diagnostic.RS0037.severity = none + +# Ganerated + +#### Naming styles #### + +# Naming rules + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# Symbol specifications + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +# Naming styles + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +# 'using' directive preferences +csharp_using_directive_placement = outside_namespace:error + +# Expression-level preferences +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:error +csharp_style_unused_value_expression_statement_preference = discard_variable:error + +# Modifier preferences +csharp_prefer_static_local_function = true:warning +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async + +# Parameter preferences +dotnet_code_quality_unused_parameters = all:error + +# Field preferences +dotnet_style_readonly_field = true:error + +# Expression-level preferences +csharp_style_deconstructed_variable_declaration = true:suggestion +dotnet_style_prefer_auto_properties = true:warning +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:warning +dotnet_style_prefer_conditional_expression_over_return = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion + +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent + +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:error +dotnet_style_predefined_type_for_member_access = true:error + +# Code-block preferences +csharp_prefer_simple_using_statement = true:suggestion + + +################### +# Custom rules +################### + +# SA1200: Using directive should appear within a namespace declaration +dotnet_diagnostic.SA1200.severity = none + +# SA1633: The file header is missing or not located at the top of the file. +dotnet_diagnostic.SA1633.severity = none + +# SA1413: Use trailing comma in multi-line initializers +dotnet_diagnostic.SA1413.severity = none + +# SA1201: +dotnet_diagnostic.SA1201.severity = none + + +# SA1202: Elements should be ordered by access +dotnet_diagnostic.SA1202.severity = warning + +# SA1209: Using alias directives should be placed after all using namespace directives. +dotnet_diagnostic.SA1202.severity = warning + +# CA1021: Avoid out parameters +dotnet_diagnostic.CA1021.severity = none + +# CA1308: Normalize strings to uppercase +dotnet_diagnostic.CA1308.severity = suggestion + +# CA1310: Specify StringComparison for correctness +dotnet_diagnostic.CA1310.severity = suggestion + +# SA1629: Documentation text should end with a period +dotnet_diagnostic.SA1629.severity = suggestion + +# CA1041: Mark assemblies with CLSCompliantAttribute +dotnet_diagnostic.CA1014.severity = none + +# CA1040: Avoid empty interfaces +dotnet_diagnostic.CA1040.severity = suggestion + +# SA1512: A single-line comment within C# code is followed by a blank line. +dotnet_diagnostic.SA1512.severity = none + +# CS8714: The type cannot be used as type parameter in the generic type or method. +dotnet_diagnostic.CS8714.severity = none + +# CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. +dotnet_diagnostic.CS1998.severity = suggestion + +# CS0452: The type 'type name' must be a reference type in order to use it as parameter 'parameter name' in the generic type or method 'identifier of generic'. +dotnet_diagnostic.CS0452.severity = none + +# CS8019: Unnecessary using directive. # Note: there is bug ignore it for generated code - in this case disabled it for now. +dotnet_diagnostic.CS8019.severity = suggestion + +# CA1032: A type extends System.Exception but doesn't declare all the required constructors. +dotnet_diagnostic.CA1032.severity = suggestion + +# EX002: Use context aware exception constructor. +dotnet_diagnostic.EX002.severity = suggestion + +# IDE0021: This style rule concerns the use of expression bodies versus block bodies for constructors. +dotnet_diagnostic.IDE0021.severity = suggestion + +# IDE0022: This style rule concerns the use of expression bodies versus block bodies for methods. +dotnet_diagnostic.IDE0022.severity = suggestion + +# IDE0023: This style rule concerns the use of expression bodies versus block bodies for operators. +dotnet_diagnostic.IDE0023.severity = suggestion + +# IDE0024: This style rule concerns the use of expression bodies versus block bodies for operators. + +dotnet_diagnostic.IDE0024.severity = suggestion + +# IDE0025: This style rule concerns the use of expression bodies versus block bodies for properties. + +dotnet_diagnostic.IDE0025.severity = suggestion + +# IDE0026: This style rule concerns the use of expression bodies versus block bodies for indexers. + +dotnet_diagnostic.IDE0026.severity = suggestion + +# IDE0027: This style rule concerns the use of expression bodies versus block bodies for accessors. + +dotnet_diagnostic.IDE0027.severity = suggestion + +# IDE0053: This style rule concerns the use of expression bodies versus block bodies for lambdas. + +dotnet_diagnostic.IDE0053.severity = suggestion + +# IDE0061: This style rule concerns the use of expression bodies versus block bodies for local functions. Local functions are private methods of a type that are nested in another member. + +dotnet_diagnostic.IDE0061.severity = suggestion + +# SA1313: The name of a parameter in C# does not begin with a lower-case letter. +dotnet_diagnostic.SA1313.severity = suggestion + +# SA1513: A closing brace within a C# element, statement, or expression is not followed by a blank line. + +dotnet_diagnostic.SA1513.severity = suggestion + +# SA1000: The spacing around a C# keyword is incorrect. + +dotnet_diagnostic.SA1000.severity = suggestion + +# CS0311: The type 'type1' cannot be used as type parameter 'T' in the generic type or method ''. There is no implicit reference conversion from 'type1' to 'type2'. + +dotnet_diagnostic.CS0311.severity = none + +# CA1711: Identifiers should not have incorrect suffix. + +dotnet_diagnostic.CA1711.severity = none + +# SA1005: A single-line comment within a C# code file does not begin with a single space. + +dotnet_diagnostic.SA1005.severity = suggestion + +# SA1515: A single-line comment within a C# code file does not begin with a single space. + +dotnet_diagnostic.SA1515.severity = suggestion + +# CS5001: Program does not contain a static 'Main' method suitable for an entry point + +dotnet_diagnostic.CS5001.severity = none + +# CS8603: Possible null reference return. + +dotnet_diagnostic.CS8603.severity = suggestion + +# SA1516:: Adjacent C# elements are not separated by a blank line. + +dotnet_diagnostic.SA1516.severity = suggestion + +# Treat all cs files in this folder as generated code + +[*.generated.cs] + +generated_code = true -# IDE0063: Use simple 'using' statement -csharp_prefer_simple_using_statement = false +dotnet_diagnostic.SYN.severity = none +dotnet_diagnostic.CS0108.severity = none +dotnet_diagnostic.CS1591.severity = none +dotnet_diagnostic.CS3008.severity = none +dotnet_diagnostic.CS3009.severity = none +dotnet_diagnostic.CS0114.severity = none +dotnet_diagnostic.CS8019.severity = none \ No newline at end of file diff --git a/src/Cogworks.AzureSearch/src/Constants/StringConstants/Separators.cs b/src/Cogworks.AzureSearch/src/Constants/StringConstants/Separators.cs index 602a893..2b87614 100644 --- a/src/Cogworks.AzureSearch/src/Constants/StringConstants/Separators.cs +++ b/src/Cogworks.AzureSearch/src/Constants/StringConstants/Separators.cs @@ -1,6 +1,6 @@ namespace Cogworks.AzureSearch.Constants.StringConstants { - public class Separators + public static class Separators { public const string Comma = ","; public const string Vertical = "|"; diff --git a/src/Cogworks.AzureSearch/src/Constants/StringConstants/Terms.cs b/src/Cogworks.AzureSearch/src/Constants/StringConstants/Terms.cs index 7d6f8ff..e53191b 100644 --- a/src/Cogworks.AzureSearch/src/Constants/StringConstants/Terms.cs +++ b/src/Cogworks.AzureSearch/src/Constants/StringConstants/Terms.cs @@ -1,6 +1,6 @@ namespace Cogworks.AzureSearch.Constants.StringConstants { - public class Terms + public static class Terms { public const string Null = "null"; } diff --git a/src/Cogworks.AzureSearch/src/Exceptions/IndexExceptions/IndexCreateOrUpdateException.cs b/src/Cogworks.AzureSearch/src/Exceptions/IndexExceptions/IndexCreateOrUpdateException.cs index 34206ef..63491d5 100644 --- a/src/Cogworks.AzureSearch/src/Exceptions/IndexExceptions/IndexCreateOrUpdateException.cs +++ b/src/Cogworks.AzureSearch/src/Exceptions/IndexExceptions/IndexCreateOrUpdateException.cs @@ -2,7 +2,7 @@ namespace Cogworks.AzureSearch.Exceptions.IndexExceptions { - public class IndexCreateOrUpdateException :DomainException + public class IndexCreateOrUpdateException : DomainException { public override string Code => "index_create_or_update_error"; diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 9e0e231..46d02a1 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,33 +1,39 @@ - - - Cogworks + + + The Cogworks Limited $(Company) Copyright (c) $(Company) $([System.DateTime]::Now.Year) + https://github.com/thecogworks/Cogworks.AzureSearch + https://github.com/thecogworks/Cogworks.AzureSearch + git + latest 1591;1701;1702;8032;NU1701;AD0001 false true false + false - - - - + + disable + disable + - - $(MSBuildThisFileDirectory)linting\codeanalysis.ruleset + + disable + disable - - - - + + + + \ No newline at end of file diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 72a3d87..0c98d16 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,16 +1,3 @@ - - - - - - - - - - - - + \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/.editorconfig b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/.editorconfig new file mode 100644 index 0000000..c226ee8 --- /dev/null +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/.editorconfig @@ -0,0 +1,2 @@ +[*.cs] +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = none \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests/AutofacIocExtensionTests.cs b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests/AutofacIocExtensionTests.cs index 8094262..f2a95e7 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests/AutofacIocExtensionTests.cs +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests/AutofacIocExtensionTests.cs @@ -62,17 +62,16 @@ public void Should_ReturnDedicatedRepositoryInstance(Type desiredObjectType) // Arrange // ReSharper disable once PossibleNullReferenceException - using (var scope = _autofacContainerBuilder.Build().BeginLifetimeScope().BeginLifetimeScope()) - { - // Act - var instance = scope.Resolve(desiredObjectType); - - // Assert - Assert.NotNull(instance); - Assert.True(desiredObjectType.IsInstanceOfType(instance)); - Assert.NotEmpty(instance.GetType().GenericTypeArguments); - Assert.Equal(desiredObjectType.GenericTypeArguments[0], instance.GetType().GenericTypeArguments[0]); - } + using var scope = _autofacContainerBuilder.Build().BeginLifetimeScope().BeginLifetimeScope(); + + // Act + var instance = scope.Resolve(desiredObjectType); + + // Assert + Assert.NotNull(instance); + Assert.True(desiredObjectType.IsInstanceOfType(instance)); + Assert.NotEmpty(instance.GetType().GenericTypeArguments); + Assert.Equal(desiredObjectType.GenericTypeArguments[0], instance.GetType().GenericTypeArguments[0]); } [Theory] @@ -120,11 +119,10 @@ public void Should_ThrowException_When_IndexNotRegistered(Type desiredObjectType var exceptionRecord = Record.Exception(() => { // ReSharper disable once PossibleNullReferenceException - using (var scope = _autofacContainerBuilder.Build().BeginLifetimeScope()) - { - // Act - _ = scope.Resolve(desiredObjectType); - } + using var scope = _autofacContainerBuilder.Build().BeginLifetimeScope(); + + // Act + _ = scope.Resolve(desiredObjectType); }); // Assert @@ -149,16 +147,12 @@ public void Should_ReturnCustomSearchService() _containerBuilder.RegisterDomainSearcher(); // ReSharper disable once PossibleNullReferenceException - using (var scope = _autofacContainerBuilder.Build().BeginLifetimeScope()) - { - - var customTestSearch = scope.Resolve(); + using var scope = _autofacContainerBuilder.Build().BeginLifetimeScope(); - // Assert - Assert.NotNull(customTestSearch); + var customTestSearch = scope.Resolve(); - - } + // Assert + Assert.NotNull(customTestSearch); } [Fact] @@ -170,21 +164,20 @@ public void Should_InvokeCustomSearchServiceDomainMethod() _containerBuilder.RegisterDomainSearcher(mockedCustomTestSearch); // ReSharper disable once PossibleNullReferenceException - using (var scope = _autofacContainerBuilder.Build().BeginLifetimeScope()) - { - var customTestSearch = scope.Resolve(); + using var scope = _autofacContainerBuilder.Build().BeginLifetimeScope(); - customTestSearch.SomeCustomSearchExample(); + var customTestSearch = scope.Resolve(); - // Assert - Assert.NotNull(customTestSearch); + customTestSearch.SomeCustomSearchExample(); + + // Assert + Assert.NotNull(customTestSearch); - mockedCustomTestSearch.Received(1).SomeCustomSearchExample(); + mockedCustomTestSearch.Received(1).SomeCustomSearchExample(); - customTestSearch.SomeCustomSearchExample(); + customTestSearch.SomeCustomSearchExample(); - mockedCustomTestSearch.Received(2).SomeCustomSearchExample(); - } + mockedCustomTestSearch.Received(2).SomeCustomSearchExample(); } [Fact] @@ -205,19 +198,18 @@ public void Should_GetDedicatedIndexWithProperName() // Act // ReSharper disable once PossibleNullReferenceException - using (var scope = _autofacContainerBuilder.Build().BeginLifetimeScope()) - { - var firstTestDocumentIndexDefinition = scope.Resolve>(); - var secondTestDocumentIndexDefinition = scope.Resolve>(); - var thirdTestDocumentIndexDefinition = scope.Resolve>(); - - // Assert - Assert.NotNull(firstTestDocumentIndexDefinition); - Assert.NotNull(secondTestDocumentIndexDefinition); - Assert.Equal(FirstDocumentIndexName, firstTestDocumentIndexDefinition.IndexName); - Assert.Equal(SecondDocumentIndexName, secondTestDocumentIndexDefinition.IndexName); - Assert.Equal(ThirdDocumentIndexName, thirdTestDocumentIndexDefinition.IndexName); - } + using var scope = _autofacContainerBuilder.Build().BeginLifetimeScope(); + + var firstTestDocumentIndexDefinition = scope.Resolve>(); + var secondTestDocumentIndexDefinition = scope.Resolve>(); + var thirdTestDocumentIndexDefinition = scope.Resolve>(); + + // Assert + Assert.NotNull(firstTestDocumentIndexDefinition); + Assert.NotNull(secondTestDocumentIndexDefinition); + Assert.Equal(FirstDocumentIndexName, firstTestDocumentIndexDefinition.IndexName); + Assert.Equal(SecondDocumentIndexName, secondTestDocumentIndexDefinition.IndexName); + Assert.Equal(ThirdDocumentIndexName, thirdTestDocumentIndexDefinition.IndexName); } } } \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/.editorconfig b/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/.editorconfig new file mode 100644 index 0000000..c226ee8 --- /dev/null +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/.editorconfig @@ -0,0 +1,2 @@ +[*.cs] +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = none \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests/LightInjectIocExtensionTests.cs b/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests/LightInjectIocExtensionTests.cs index 0f2d502..5dc21de 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests/LightInjectIocExtensionTests.cs +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests/LightInjectIocExtensionTests.cs @@ -61,17 +61,16 @@ public void Should_ReturnDedicatedRepositoryInstance(Type desiredObjectType) // Arrange // ReSharper disable once PossibleNullReferenceException - using (var scope = _container.BeginScope()) - { - // Act - var instance = scope.GetInstance(desiredObjectType); - - // Assert - Assert.NotNull(instance); - Assert.True(desiredObjectType.IsInstanceOfType(instance)); - Assert.NotEmpty(instance.GetType().GenericTypeArguments); - Assert.Equal(desiredObjectType.GenericTypeArguments[0], instance.GetType().GenericTypeArguments[0]); - } + using var scope = _container.BeginScope(); + + // Act + var instance = scope.GetInstance(desiredObjectType); + + // Assert + Assert.NotNull(instance); + Assert.True(desiredObjectType.IsInstanceOfType(instance)); + Assert.NotEmpty(instance.GetType().GenericTypeArguments); + Assert.Equal(desiredObjectType.GenericTypeArguments[0], instance.GetType().GenericTypeArguments[0]); } [Theory] @@ -117,11 +116,10 @@ public void Should_ThrowException_When_IndexNotRegistered(Type desiredObjectType var exceptionRecord = Record.Exception(() => { // ReSharper disable once PossibleNullReferenceException - using (var scope = _container.BeginScope()) - { - // Act - _ = scope.GetInstance(desiredObjectType); - } + using var scope = _container.BeginScope(); + + // Act + _ = scope.GetInstance(desiredObjectType); }); // Assert @@ -146,13 +144,12 @@ public void Should_ReturnCustomSearchService() _containerBuilder.RegisterDomainSearcher(); // ReSharper disable once PossibleNullReferenceException - using (var scope = _container.BeginScope()) - { - var customTestSearch = scope.GetInstance(); + using var scope = _container.BeginScope(); - // Assert - Assert.NotNull(customTestSearch); - } + var customTestSearch = scope.GetInstance(); + + // Assert + Assert.NotNull(customTestSearch); } [Fact] @@ -164,21 +161,20 @@ public void Should_InvokeCustomSearchServiceDomainMethod() _containerBuilder.RegisterDomainSearcher(mockedCustomTestSearch); // ReSharper disable once PossibleNullReferenceException - using (var scope = _container.BeginScope()) - { - var customTestSearch = scope.GetInstance(); + using var scope = _container.BeginScope(); - customTestSearch.SomeCustomSearchExample(); + var customTestSearch = scope.GetInstance(); - // Assert - Assert.NotNull(customTestSearch); + customTestSearch.SomeCustomSearchExample(); + + // Assert + Assert.NotNull(customTestSearch); - mockedCustomTestSearch.Received(1).SomeCustomSearchExample(); + mockedCustomTestSearch.Received(1).SomeCustomSearchExample(); - customTestSearch.SomeCustomSearchExample(); + customTestSearch.SomeCustomSearchExample(); - mockedCustomTestSearch.Received(2).SomeCustomSearchExample(); - } + mockedCustomTestSearch.Received(2).SomeCustomSearchExample(); } [Fact] @@ -199,20 +195,19 @@ public void Should_GetDedicatedIndexWithProperName() // Act // ReSharper disable once PossibleNullReferenceException - using (var scope = _container.BeginScope()) - { - var firstTestDocumentIndexDefinition = scope.GetInstance>(); - var secondTestDocumentIndexDefinition = scope.GetInstance>(); - var thirdTestDocumentIndexDefinition = scope.GetInstance>(); - - // Assert - Assert.NotNull(firstTestDocumentIndexDefinition); - Assert.NotNull(secondTestDocumentIndexDefinition); - Assert.NotNull(thirdTestDocumentIndexDefinition); - Assert.Equal(FirstDocumentIndexName, firstTestDocumentIndexDefinition.IndexName); - Assert.Equal(SecondDocumentIndexName, secondTestDocumentIndexDefinition.IndexName); - Assert.Equal(ThirdDocumentIndexName, thirdTestDocumentIndexDefinition.IndexName); - } + using var scope = _container.BeginScope(); + + var firstTestDocumentIndexDefinition = scope.GetInstance>(); + var secondTestDocumentIndexDefinition = scope.GetInstance>(); + var thirdTestDocumentIndexDefinition = scope.GetInstance>(); + + // Assert + Assert.NotNull(firstTestDocumentIndexDefinition); + Assert.NotNull(secondTestDocumentIndexDefinition); + Assert.NotNull(thirdTestDocumentIndexDefinition); + Assert.Equal(FirstDocumentIndexName, firstTestDocumentIndexDefinition.IndexName); + Assert.Equal(SecondDocumentIndexName, secondTestDocumentIndexDefinition.IndexName); + Assert.Equal(ThirdDocumentIndexName, thirdTestDocumentIndexDefinition.IndexName); } } } \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/.editorconfig b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/.editorconfig new file mode 100644 index 0000000..c226ee8 --- /dev/null +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/.editorconfig @@ -0,0 +1,2 @@ +[*.cs] +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = none \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests.csproj b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests.csproj index 28ae7c4..7fba58a 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests.csproj +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net6.0;net5.0 false diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/MicrosoftIocExtensionTests.cs b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/MicrosoftIocExtensionTests.cs index e7da159..aa3b060 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/MicrosoftIocExtensionTests.cs +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/MicrosoftIocExtensionTests.cs @@ -61,17 +61,16 @@ public void Should_ReturnDedicatedRepositoryInstance(Type desiredObjectType) // Arrange // ReSharper disable once PossibleNullReferenceException - using (var serviceProvider = _serviceContainer.BuildServiceProvider()) - { - // Act - var instance = serviceProvider.GetService(desiredObjectType); - - // Assert - Assert.NotNull(instance); - Assert.True(desiredObjectType.IsInstanceOfType(instance)); - Assert.NotEmpty(instance.GetType().GenericTypeArguments); - Assert.Equal(desiredObjectType.GenericTypeArguments[0], instance.GetType().GenericTypeArguments[0]); - } + using var serviceProvider = _serviceContainer.BuildServiceProvider(); + + // Act + var instance = serviceProvider.GetService(desiredObjectType); + + // Assert + Assert.NotNull(instance); + Assert.True(desiredObjectType.IsInstanceOfType(instance)); + Assert.NotEmpty(instance.GetType().GenericTypeArguments); + Assert.Equal(desiredObjectType.GenericTypeArguments[0], instance.GetType().GenericTypeArguments[0]); } [Theory] @@ -119,11 +118,10 @@ public void Should_ThrowException_When_IndexNotRegistered(Type desiredObjectType var exceptionRecord = Record.Exception(() => { // ReSharper disable once PossibleNullReferenceException - using (var serviceProvider = _serviceContainer.BuildServiceProvider()) - { - // Act - _ = serviceProvider.GetService(desiredObjectType); - } + using var serviceProvider = _serviceContainer.BuildServiceProvider(); + + // Act + _ = serviceProvider.GetService(desiredObjectType); }); // Assert @@ -148,13 +146,12 @@ public void Should_ReturnCustomSearchService() _containerBuilder.RegisterDomainSearcher(); // ReSharper disable once PossibleNullReferenceException - using (var serviceProvider = _serviceContainer.BuildServiceProvider()) - { - var customTestSearch = serviceProvider.GetService(); + using var serviceProvider = _serviceContainer.BuildServiceProvider(); - // Assert - Assert.NotNull(customTestSearch); - } + var customTestSearch = serviceProvider.GetService(); + + // Assert + Assert.NotNull(customTestSearch); } [Fact] @@ -166,21 +163,20 @@ public void Should_InvokeCustomSearchServiceDomainMethod() _containerBuilder.RegisterDomainSearcher(mockedCustomTestSearch); // ReSharper disable once PossibleNullReferenceException - using (var serviceProvider = _serviceContainer.BuildServiceProvider()) - { - var customTestSearch = serviceProvider.GetService(); + using var serviceProvider = _serviceContainer.BuildServiceProvider(); - customTestSearch.SomeCustomSearchExample(); + var customTestSearch = serviceProvider.GetService(); - // Assert - Assert.NotNull(customTestSearch); + customTestSearch.SomeCustomSearchExample(); + + // Assert + Assert.NotNull(customTestSearch); - mockedCustomTestSearch.Received(1).SomeCustomSearchExample(); + mockedCustomTestSearch.Received(1).SomeCustomSearchExample(); - customTestSearch.SomeCustomSearchExample(); + customTestSearch.SomeCustomSearchExample(); - mockedCustomTestSearch.Received(2).SomeCustomSearchExample(); - } + mockedCustomTestSearch.Received(2).SomeCustomSearchExample(); } [Fact] @@ -201,20 +197,19 @@ public void Should_GetDedicatedIndexWithProperName() // Act // ReSharper disable once PossibleNullReferenceException - using (var serviceProvider = _serviceContainer.BuildServiceProvider()) - { - var firstTestDocumentIndexDefinition = serviceProvider.GetService>(); - var secondTestDocumentIndexDefinition = serviceProvider.GetService>(); - var thirdTestDocumentIndexDefinition = serviceProvider.GetService>(); - - // Assert - Assert.NotNull(firstTestDocumentIndexDefinition); - Assert.NotNull(secondTestDocumentIndexDefinition); - Assert.NotNull(thirdTestDocumentIndexDefinition); - Assert.Equal(FirstDocumentIndexName, firstTestDocumentIndexDefinition.IndexName); - Assert.Equal(SecondDocumentIndexName, secondTestDocumentIndexDefinition.IndexName); - Assert.Equal(ThirdDocumentIndexName, thirdTestDocumentIndexDefinition.IndexName); - } + using var serviceProvider = _serviceContainer.BuildServiceProvider(); + + var firstTestDocumentIndexDefinition = serviceProvider.GetService>(); + var secondTestDocumentIndexDefinition = serviceProvider.GetService>(); + var thirdTestDocumentIndexDefinition = serviceProvider.GetService>(); + + // Assert + Assert.NotNull(firstTestDocumentIndexDefinition); + Assert.NotNull(secondTestDocumentIndexDefinition); + Assert.NotNull(thirdTestDocumentIndexDefinition); + Assert.Equal(FirstDocumentIndexName, firstTestDocumentIndexDefinition.IndexName); + Assert.Equal(SecondDocumentIndexName, secondTestDocumentIndexDefinition.IndexName); + Assert.Equal(ThirdDocumentIndexName, thirdTestDocumentIndexDefinition.IndexName); } } } \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/.editorconfig b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/.editorconfig new file mode 100644 index 0000000..c226ee8 --- /dev/null +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/.editorconfig @@ -0,0 +1,2 @@ +[*.cs] +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = none \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests/UmbracoIocExtensionTests.cs b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests/UmbracoIocExtensionTests.cs index 1c8de9b..def931f 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests/UmbracoIocExtensionTests.cs +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests/UmbracoIocExtensionTests.cs @@ -42,7 +42,7 @@ public UmbracoIocExtensionTests() var dirName = Path.GetDirectoryName( Assembly.GetExecutingAssembly() .Location - .Replace("bin\\Debug", string.Empty)); + .Replace("bin\\Debug", string.Empty)) ?? string.Empty; var typeLoader = new TypeLoader( Substitute.For(), @@ -59,7 +59,7 @@ public UmbracoIocExtensionTests() _containerBuilder = _umbracoBuilder.RegisterAzureSearch() .RegisterClientOptions("test", "test", "https://localhost") - .RegisterIndexOptions(false, false) + .RegisterIndexOptions(false) .RegisterIndexDefinitions(FirstDocumentIndexName) .RegisterIndexDefinitions(SecondDocumentIndexName) .RegisterIndexDefinitions(customIndex: new SearchIndex(ThirdDocumentIndexName)); @@ -90,17 +90,16 @@ public void Should_ReturnDedicatedRepositoryInstance(Type desiredObjectType) _umbracoBuilder.Build(); var serviceProvider = _serviceCollection.BuildServiceProvider(); - using (var scope = serviceProvider.CreateScope()) - { - // Act - var instance = scope.ServiceProvider.GetService(desiredObjectType); - - // Assert - Assert.NotNull(instance); - Assert.True(desiredObjectType.IsInstanceOfType(instance)); - Assert.NotEmpty(instance.GetType().GenericTypeArguments); - Assert.Equal(desiredObjectType.GenericTypeArguments[0], instance.GetType().GenericTypeArguments[0]); - } + using var scope = serviceProvider.CreateScope(); + + // Act + var instance = scope.ServiceProvider.GetService(desiredObjectType); + + // Assert + Assert.NotNull(instance); + Assert.True(desiredObjectType.IsInstanceOfType(instance)); + Assert.NotEmpty(instance.GetType().GenericTypeArguments); + Assert.Equal(desiredObjectType.GenericTypeArguments[0], instance.GetType().GenericTypeArguments[0]); } [Theory] @@ -148,11 +147,10 @@ public void Should_ThrowException_When_IndexNotRegistered(Type desiredObjectType _umbracoBuilder.Build(); var serviceProvider = _serviceCollection.BuildServiceProvider(); - using (var scope = serviceProvider.CreateScope()) - { - // Act - _ = scope.ServiceProvider.GetService(desiredObjectType); - } + using var scope = serviceProvider.CreateScope(); + + // Act + _ = scope.ServiceProvider.GetService(desiredObjectType); }); // Assert @@ -179,13 +177,12 @@ public void Should_ReturnCustomSearchService() _umbracoBuilder.Build(); var serviceProvider = _serviceCollection.BuildServiceProvider(); - using (var scope = serviceProvider.CreateScope()) - { - var customTestSearch = scope.ServiceProvider.GetService(); + using var scope = serviceProvider.CreateScope(); + + var customTestSearch = scope.ServiceProvider.GetService(); - // Assert - Assert.NotNull(customTestSearch); - } + // Assert + Assert.NotNull(customTestSearch); } [Fact] @@ -200,22 +197,21 @@ public void Should_InvokeCustomSearchServiceDomainMethod() _umbracoBuilder.Build(); var serviceProvider = _serviceCollection.BuildServiceProvider(); - using (var scope = serviceProvider.CreateScope()) - { - var customTestSearch = scope.ServiceProvider.GetService(); + using var scope = serviceProvider.CreateScope(); - // Act - customTestSearch.SomeCustomSearchExample(); + var customTestSearch = scope.ServiceProvider.GetService(); + + // Act + customTestSearch.SomeCustomSearchExample(); - // Assert - Assert.NotNull(customTestSearch); + // Assert + Assert.NotNull(customTestSearch); - mockedCustomTestSearch.Received(1).SomeCustomSearchExample(); + mockedCustomTestSearch.Received(1).SomeCustomSearchExample(); - customTestSearch.SomeCustomSearchExample(); + customTestSearch.SomeCustomSearchExample(); - mockedCustomTestSearch.Received(2).SomeCustomSearchExample(); - } + mockedCustomTestSearch.Received(2).SomeCustomSearchExample(); } [Fact] @@ -237,24 +233,23 @@ public void Should_GetDedicatedIndexWithProperName() var serviceProvider = _serviceCollection.BuildServiceProvider(); // Act - using (var scope = serviceProvider.CreateScope()) - { - var provider = scope.ServiceProvider; - var firstTestDocumentIndexDefinition = - provider.GetService>(); - var secondTestDocumentIndexDefinition = - provider.GetService>(); - var thirdTestDocumentIndexDefinition = - provider.GetService>(); - - // Assert - Assert.NotNull(firstTestDocumentIndexDefinition); - Assert.NotNull(secondTestDocumentIndexDefinition); - Assert.NotNull(thirdTestDocumentIndexDefinition); - Assert.Equal(FirstDocumentIndexName, firstTestDocumentIndexDefinition.IndexName); - Assert.Equal(SecondDocumentIndexName, secondTestDocumentIndexDefinition.IndexName); - Assert.Equal(ThirdDocumentIndexName, thirdTestDocumentIndexDefinition.IndexName); - } + using var scope = serviceProvider.CreateScope(); + + var provider = scope.ServiceProvider; + var firstTestDocumentIndexDefinition = + provider.GetService>(); + var secondTestDocumentIndexDefinition = + provider.GetService>(); + var thirdTestDocumentIndexDefinition = + provider.GetService>(); + + // Assert + Assert.NotNull(firstTestDocumentIndexDefinition); + Assert.NotNull(secondTestDocumentIndexDefinition); + Assert.NotNull(thirdTestDocumentIndexDefinition); + Assert.Equal(FirstDocumentIndexName, firstTestDocumentIndexDefinition.IndexName); + Assert.Equal(SecondDocumentIndexName, secondTestDocumentIndexDefinition.IndexName); + Assert.Equal(ThirdDocumentIndexName, thirdTestDocumentIndexDefinition.IndexName); } } } \ No newline at end of file From df9513f1e127436c2a66759486c28ad23d2b714a Mon Sep 17 00:00:00 2001 From: Adrian Ochmann Date: Fri, 7 Apr 2023 13:25:41 +0200 Subject: [PATCH 4/5] refactor: updated packaging configuration --- .../src/Cogworks.AzureSearch.csproj | 12 ++++++++- .../src/Cogworks.AzureSearch.nuspec | 25 ----------------- src/Directory.Build.props | 12 ++++++++- .../Cogworks.AzureSearch.IoC.Autofac.csproj | 12 ++++++++- .../Cogworks.AzureSearch.IoC.Autofac.nuspec | 27 ------------------- ...ogworks.AzureSearch.IoC.LightInject.csproj | 10 +++++++ ...ogworks.AzureSearch.IoC.LightInject.nuspec | 26 ------------------ .../Cogworks.AzureSearch.IoC.Microsoft.csproj | 12 ++++++++- .../Cogworks.AzureSearch.IoC.Microsoft.nuspec | 27 ------------------- .../Cogworks.AzureSearch.IoC.Umbraco.csproj | 23 ++++++++-------- 10 files changed, 66 insertions(+), 120 deletions(-) delete mode 100644 src/Cogworks.AzureSearch/src/Cogworks.AzureSearch.nuspec delete mode 100644 src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/src/Cogworks.AzureSearch.IoC.Autofac.nuspec delete mode 100644 src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/src/Cogworks.AzureSearch.IoC.LightInject.nuspec delete mode 100644 src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/src/Cogworks.AzureSearch.IoC.Microsoft.nuspec diff --git a/src/Cogworks.AzureSearch/src/Cogworks.AzureSearch.csproj b/src/Cogworks.AzureSearch/src/Cogworks.AzureSearch.csproj index cad3093..b51585f 100644 --- a/src/Cogworks.AzureSearch/src/Cogworks.AzureSearch.csproj +++ b/src/Cogworks.AzureSearch/src/Cogworks.AzureSearch.csproj @@ -2,6 +2,16 @@ netstandard2.0 + true + Cogworks.AzureSearch + Cogworks.AzureSearch + A wrapper to Azure Search allowing to easily setup Azure Search indexes, searchers. + A wrapper to Azure Search allowing to easily setup Azure Search indexes, searchers. + Azure Cognitive Search Wrapper + + Apache-2.0 + README.md + . @@ -29,4 +39,4 @@ - + \ No newline at end of file diff --git a/src/Cogworks.AzureSearch/src/Cogworks.AzureSearch.nuspec b/src/Cogworks.AzureSearch/src/Cogworks.AzureSearch.nuspec deleted file mode 100644 index e5e4b02..0000000 --- a/src/Cogworks.AzureSearch/src/Cogworks.AzureSearch.nuspec +++ /dev/null @@ -1,25 +0,0 @@ - - - - Cogworks.AzureSearch - $version$ - Cogworks.AzureSearch - Cogworks - Cogworks - https://github.com/thecogworks/Cogworks.AzureSearch - - Apache-2.0 - false - A wrapper to Azure Search allowing to easily setup Azure Search indexes, searchers. - The Cogworks Limited $CopyrightYear$ - Azure Search - - - - - - - - - - \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 46d02a1..8f71370 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -12,11 +12,21 @@ latest - 1591;1701;1702;8032;NU1701;AD0001 + 1591;1701;1702;8032;NU5104;NU1701;NU5128;AD0001;CA1041;CS0311;CS5001 false true false false + true + true + true + true + snupkg + true + true + true + true + false diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/src/Cogworks.AzureSearch.IoC.Autofac.csproj b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/src/Cogworks.AzureSearch.IoC.Autofac.csproj index e6100b7..9f02bd5 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/src/Cogworks.AzureSearch.IoC.Autofac.csproj +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/src/Cogworks.AzureSearch.IoC.Autofac.csproj @@ -2,6 +2,16 @@ netstandard2.0 + true + Cogworks.AzureSearch.IoC.Autofac + Cogworks.AzureSearch.IoC.Autofac + An Autofac extension to Cogworks.AzureSearch. + An Autofac extension to Cogworks.AzureSearch. + Azure Cognitive Search Wrapper, Autofac, container, IoC + + Apache-2.0 + README.md + . @@ -10,4 +20,4 @@ - + \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/src/Cogworks.AzureSearch.IoC.Autofac.nuspec b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/src/Cogworks.AzureSearch.IoC.Autofac.nuspec deleted file mode 100644 index 1969f39..0000000 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/src/Cogworks.AzureSearch.IoC.Autofac.nuspec +++ /dev/null @@ -1,27 +0,0 @@ - - - - Cogworks.AzureSearch.IoC.Autofac - $version$ - Cogworks.AzureSearch.IoC.Autofac - Cogworks - Cogworks - https://github.com/thecogworks/Cogworks.AzureSearch.IoC.Autofac - - Apache-2.0 - false - An Autofac extension to Cogworks.AzureSearch. - The Cogworks Limited $CopyrightYear$ - Azure Search, Autofac, container, IoC - - - - - - - - - - - - \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/src/Cogworks.AzureSearch.IoC.LightInject.csproj b/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/src/Cogworks.AzureSearch.IoC.LightInject.csproj index 7c50bba..af88ea7 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/src/Cogworks.AzureSearch.IoC.LightInject.csproj +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/src/Cogworks.AzureSearch.IoC.LightInject.csproj @@ -2,6 +2,16 @@ netstandard2.0 + true + Cogworks.AzureSearch.IoC.LightInject + Cogworks.AzureSearch.IoC.LightInject + An LightInject extension to Cogworks.AzureSearch. + An LightInject extension to Cogworks.AzureSearch. + Azure Cognitive Search Wrapper, LightInject, container, IoC + + Apache-2.0 + README.md + . diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/src/Cogworks.AzureSearch.IoC.LightInject.nuspec b/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/src/Cogworks.AzureSearch.IoC.LightInject.nuspec deleted file mode 100644 index b7a865b..0000000 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/src/Cogworks.AzureSearch.IoC.LightInject.nuspec +++ /dev/null @@ -1,26 +0,0 @@ - - - - Cogworks.AzureSearch.IoC.LightInject - $version$ - Cogworks.AzureSearch.IoC.LightInject - Cogworks - Cogworks - https://github.com/thecogworks/Cogworks.AzureSearch.IoC.LightInject - - Apache-2.0 - false - An LightInject extension to Cogworks.AzureSearch. - The Cogworks Limited $CopyrightYear$ - Azure Search, LightInject, container, IoC - - - - - - - - - - - \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/src/Cogworks.AzureSearch.IoC.Microsoft.csproj b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/src/Cogworks.AzureSearch.IoC.Microsoft.csproj index ab1c0a9..0c94e4f 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/src/Cogworks.AzureSearch.IoC.Microsoft.csproj +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/src/Cogworks.AzureSearch.IoC.Microsoft.csproj @@ -2,6 +2,16 @@ netstandard2.0 + true + Cogworks.AzureSearch.IoC.Microsoft + Cogworks.AzureSearch.IoC.Microsoft + An Microsoft extension to Cogworks.AzureSearch. + An Microsoft extension to Cogworks.AzureSearch. + Azure Cognitive Search Wrapper, Microsoft, container, IoC + + Apache-2.0 + README.md + . @@ -10,4 +20,4 @@ - + \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/src/Cogworks.AzureSearch.IoC.Microsoft.nuspec b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/src/Cogworks.AzureSearch.IoC.Microsoft.nuspec deleted file mode 100644 index cab619a..0000000 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/src/Cogworks.AzureSearch.IoC.Microsoft.nuspec +++ /dev/null @@ -1,27 +0,0 @@ - - - - Cogworks.AzureSearch.IoC.Microsoft - $version$ - Cogworks.AzureSearch.IoC.Microsoft - Cogworks - Cogworks - https://github.com/thecogworks/Cogworks.AzureSearch.IoC.Microsoft - - Apache-2.0 - false - An Microsoft DependencyInjection extension to Cogworks.AzureSearch. - The Cogworks Limited $CopyrightYear$ - Azure Search, Microsoft, Dependency Injection, container, IoC - - - - - - - - - - - - \ No newline at end of file diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/src/Cogworks.AzureSearch.IoC.Umbraco.csproj b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/src/Cogworks.AzureSearch.IoC.Umbraco.csproj index bfbccd9..be26328 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/src/Cogworks.AzureSearch.IoC.Umbraco.csproj +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/src/Cogworks.AzureSearch.IoC.Umbraco.csproj @@ -1,16 +1,17 @@  - net6.0;net5.0 - . - Cogworks.AzureSearch.IoC.Umbraco - Cogworks.AzureSearch.IoC.Umbraco - An Umbraco extension to Cogworks.AzureSearch. - An Umbraco 9 extension to Cogworks.AzureSearch - Azure Search Umbraco container IoC - - Apache-2.0 - README.md - + net6.0;net5.0 + . + Cogworks.AzureSearch.IoC.Umbraco + Cogworks.AzureSearch.IoC.Umbraco + An Umbraco extension to Cogworks.AzureSearch. + An Umbraco 9 extension to Cogworks.AzureSearch + Azure Search Umbraco container IoC + + Apache-2.0 + README.md + true + From d0bd107a02830f3c713c09cd0c016736ffa11d9d Mon Sep 17 00:00:00 2001 From: Adrian Ochmann Date: Fri, 7 Apr 2023 13:32:57 +0200 Subject: [PATCH 5/5] refactor: updated project configurations --- Cogworks.AzureSearch.sln | 3 +++ src/Cogworks.AzureSearch/tests/.editorconfig | 2 ++ .../Cogworks.AzureSearch.UnitTests.csproj | 5 ++--- .../Cogworks.AzureSearch.IoC.Autofac.UnitTests.csproj | 5 ++--- .../Cogworks.AzureSearch.IoC.LightInject.UnitTests.csproj | 5 ++--- .../Cogworks.AzureSearch.IoC.Microsoft.UnitTests.csproj | 3 +-- .../Cogworks.AzureSearch.IoC.Umbraco.UnitTests.csproj | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 src/Cogworks.AzureSearch/tests/.editorconfig diff --git a/Cogworks.AzureSearch.sln b/Cogworks.AzureSearch.sln index e0c42a1..26b4099 100644 --- a/Cogworks.AzureSearch.sln +++ b/Cogworks.AzureSearch.sln @@ -6,6 +6,9 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B85EEFD6-B048-478E-A032-3CCE3F0B3093}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B5DAEDD1-13AF-4A74-BD24-42EBCB1A18D0}" + ProjectSection(SolutionItems) = preProject + src\Cogworks.AzureSearch\tests\.editorconfig = src\Cogworks.AzureSearch\tests\.editorconfig + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{180E9BD6-30B9-4D88-B88C-9F289D316967}" EndProject diff --git a/src/Cogworks.AzureSearch/tests/.editorconfig b/src/Cogworks.AzureSearch/tests/.editorconfig new file mode 100644 index 0000000..c226ee8 --- /dev/null +++ b/src/Cogworks.AzureSearch/tests/.editorconfig @@ -0,0 +1,2 @@ +[*.cs] +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = none \ No newline at end of file diff --git a/src/Cogworks.AzureSearch/tests/UnitTests/Cogworks.AzureSearch.UnitTests/Cogworks.AzureSearch.UnitTests.csproj b/src/Cogworks.AzureSearch/tests/UnitTests/Cogworks.AzureSearch.UnitTests/Cogworks.AzureSearch.UnitTests.csproj index af3a3ab..cebf0ed 100644 --- a/src/Cogworks.AzureSearch/tests/UnitTests/Cogworks.AzureSearch.UnitTests/Cogworks.AzureSearch.UnitTests.csproj +++ b/src/Cogworks.AzureSearch/tests/UnitTests/Cogworks.AzureSearch.UnitTests/Cogworks.AzureSearch.UnitTests.csproj @@ -1,9 +1,8 @@  - netcoreapp3.1 - - false + net6.0;net5.0 + false diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests.csproj b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests.csproj index cbe3235..77a24b8 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests.csproj +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Autofac/tests/UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests/Cogworks.AzureSearch.IoC.Autofac.UnitTests.csproj @@ -1,9 +1,8 @@  - netcoreapp3.1 - - false + net6.0;net5.0 + false diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests.csproj b/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests.csproj index edb9a4a..448e35b 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests.csproj +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.LightInject/tests/UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests/Cogworks.AzureSearch.IoC.LightInject.UnitTests.csproj @@ -1,9 +1,8 @@  - netcoreapp3.1 - - false + net6.0;net5.0 + false diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests.csproj b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests.csproj index 7fba58a..5fef267 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests.csproj +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Microsoft/tests/UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests/Cogworks.AzureSearch.IoC.Microsoft.UnitTests.csproj @@ -2,8 +2,7 @@ net6.0;net5.0 - - false + false diff --git a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests.csproj b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests.csproj index 950e5f5..4d810cf 100644 --- a/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests.csproj +++ b/src/IoC.Providers/Cogworks.AzureSearch.IoC.Umbraco/tests/UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests/Cogworks.AzureSearch.IoC.Umbraco.UnitTests.csproj @@ -1,6 +1,6 @@  - false + false