From 8da6e010dbfc7a4be3e61532ebfd2a1f5363df2f Mon Sep 17 00:00:00 2001 From: mif Date: Fri, 15 May 2020 10:41:53 +0500 Subject: [PATCH 1/6] fix: do not generate duplicate files for same generic types with different type arguments --- src/LazyCoder/Converter.cs | 1 - src/LazyCoder/DependencyFinder.cs | 3 ++ src/LazyCoder/Helpers.cs | 30 ++++++++++++++------ tests/LazyCoder.Tests/LazyCoder.Tests.csproj | 3 -- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/LazyCoder/Converter.cs b/src/LazyCoder/Converter.cs index bdbb7c8..4756de7 100644 --- a/src/LazyCoder/Converter.cs +++ b/src/LazyCoder/Converter.cs @@ -139,7 +139,6 @@ private static CsType[] FindExternals(TsFile tsFile) { return tsFile.Declarations .SelectMany(DependencyFinder.Find) - .Distinct() .ToArray(); } diff --git a/src/LazyCoder/DependencyFinder.cs b/src/LazyCoder/DependencyFinder.cs index ee3c89e..599bc61 100644 --- a/src/LazyCoder/DependencyFinder.cs +++ b/src/LazyCoder/DependencyFinder.cs @@ -17,6 +17,9 @@ public static CsType[] Find(TsDeclaration tsDeclaration) .Select(x => x.CsType) .Where(x => x != null) .Where(x => !x.OriginalType.IsGenericParameter) + .DistinctBy(x => x.OriginalType.IsGenericType + ? x.OriginalType.GetGenericTypeDefinition() + : x.OriginalType) .ToArray(); } diff --git a/src/LazyCoder/Helpers.cs b/src/LazyCoder/Helpers.cs index 1adeef8..f02d432 100644 --- a/src/LazyCoder/Helpers.cs +++ b/src/LazyCoder/Helpers.cs @@ -69,14 +69,7 @@ public static IEnumerable DistinctBy( this IEnumerable source, Func keySelector) { - var knownKeys = new HashSet((IEqualityComparer)null); - foreach (var item in source) - { - if (knownKeys.Add(keySelector(item))) - { - yield return item; - } - } + return source.Distinct(new ByKeyEqualityComparer(keySelector)); } public static string GetDirectory(CsDeclaration csDeclaration) @@ -118,5 +111,26 @@ public static bool IsNumber(this Type type) || type == typeof(double) || type == typeof(decimal); } + + private class ByKeyEqualityComparer: IEqualityComparer + { + private readonly Func getter; + + public ByKeyEqualityComparer(Func getter) + { + this.getter = getter; + } + + public bool Equals(T x, T y) + { + return EqualityComparer.Default.Equals(getter(x), + getter(y)); + } + + public int GetHashCode(T obj) + { + return EqualityComparer.Default.GetHashCode(getter(obj)); + } + } } } diff --git a/tests/LazyCoder.Tests/LazyCoder.Tests.csproj b/tests/LazyCoder.Tests/LazyCoder.Tests.csproj index 5d194f5..4823217 100644 --- a/tests/LazyCoder.Tests/LazyCoder.Tests.csproj +++ b/tests/LazyCoder.Tests/LazyCoder.Tests.csproj @@ -2,11 +2,8 @@ netcoreapp2.2 - false - 8 - enable From 0a0a096daef2b7e2e8164b0f9eb594caa6cc2cd4 Mon Sep 17 00:00:00 2001 From: mif Date: Tue, 19 May 2020 10:01:35 +0500 Subject: [PATCH 2/6] .editorconfig --- .editorconfig | 2350 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 2067 insertions(+), 283 deletions(-) diff --git a/.editorconfig b/.editorconfig index 2e9c5e1..f7b2a99 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,283 +1,2067 @@ -# http://EditorConfig.org - -################# -# Common Settings -################# - -# This file is the top-most EditorConfig file -root = true - -# All Files -[*] -charset = utf-8 -end_of_line = crlf -indent_style = space -indent_size = 4 -insert_final_newline = true -trim_trailing_whitespace = true -max_line_length=100 - -######################### -# File Extension Settings -######################### - -# Visual Studio Solution Files -[*.sln] -indent_style = tab - -# Visual Studio XML Project Files -[*.{csproj,vbproj,vcxproj,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}] -indent_size = 2 - -# YAML Files -[*.{yml,yaml}] -indent_size = 2 - -# Markdown Files -[*.md] -trim_trailing_whitespace = false - -# Web Files -[*.{htm,html,js,ts,tsx,css,sass,scss,less,svg,vue}] -indent_size = 2 -insert_final_newline = true - -# Batch Files -[*.{cmd,bat}] - -# Bash Files -[*.sh] -end_of_line = lf - -########################### -# .NET Language Conventions -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language-conventions -########################### - -# .NET Code Style Settings -[*.{cs,csx,cake,vb}] -# "this." and "Me." qualifiers -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#this_and_me -dotnet_style_qualification_for_field = false:warning -dotnet_style_qualification_for_property = false:warning -dotnet_style_qualification_for_method = false:warning -dotnet_style_qualification_for_event = false:warning -# Language keywords instead of framework type names for type references -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language_keywords -dotnet_style_predefined_type_for_locals_parameters_members = true:warning -dotnet_style_predefined_type_for_member_access = true:warning -# Modifier preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#normalize_modifiers -dotnet_style_require_accessibility_modifiers = always:warning -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async -visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async -dotnet_style_readonly_field = true:warning -# Parentheses preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#parentheses -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning -dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion -# Expression-level preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_level -dotnet_style_object_initializer = true:warning -dotnet_style_collection_initializer = true:warning -dotnet_style_explicit_tuple_names = true:warning -dotnet_style_prefer_inferred_tuple_names = true:warning -dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning -dotnet_style_prefer_auto_properties = true:warning -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning -dotnet_style_prefer_conditional_expression_over_assignment = false:suggestion -dotnet_style_prefer_conditional_expression_over_return = false:suggestion -# Null-checking preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#null_checking -dotnet_style_coalesce_expression = true:warning -dotnet_style_null_propagation = true:warning - -# C# Code Style Settings -[*.{cs,csx,cake}] -# Implicit and explicit types -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#implicit-and-explicit-types -csharp_style_var_for_built_in_types = true:warning -csharp_style_var_when_type_is_apparent = true:warning -csharp_style_var_elsewhere = true:warning -# Expression-bodied members -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_bodied_members -csharp_style_expression_bodied_methods = false:warning -csharp_style_expression_bodied_constructors = false:warning -csharp_style_expression_bodied_operators = false:warning -csharp_style_expression_bodied_properties = false:warning -csharp_style_expression_bodied_indexers = false:warning -csharp_style_expression_bodied_accessors = false:warning -# Pattern matching -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#pattern_matching -csharp_style_pattern_matching_over_is_with_cast_check = true:warning -csharp_style_pattern_matching_over_as_with_null_check = true:warning -# Inlined variable declarations -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#inlined_variable_declarations -csharp_style_inlined_variable_declaration = true:warning -# Expression-level preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_level_csharp -csharp_prefer_simple_default_expression = true:warning -csharp_style_deconstructed_variable_declaration = true:warning -csharp_style_pattern_local_over_anonymous_function = true:warning -# "Null" checking preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#null_checking_csharp -csharp_style_throw_expression = true:warning -csharp_style_conditional_delegate_call = true:warning -# Code block preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#code_block -csharp_prefer_braces = true:warning - -############################# -# .NET Formatting Conventions -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions -############################# - -# Organize usings -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#usings -dotnet_sort_system_directives_first = true -# C# formatting settings -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#c-formatting-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 options -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#indent -csharp_indent_case_contents = true -csharp_indent_switch_labels = true -csharp_indent_labels = no_change -# Spacing options -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#spacing -csharp_space_after_cast = false -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_parentheses = expressions -csharp_space_before_colon_in_inheritance_clause = false -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_around_binary_operators = before_and_after -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_between_method_call_empty_parameter_list_parentheses = false -# Wrapping options -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#wrapping -csharp_preserve_single_line_statements = false -csharp_preserve_single_line_blocks = true -# More Indentation options (Undocumented) -csharp_indent_block_contents = true -csharp_indent_braces = false -# Spacing Options (Undocumented) -csharp_space_after_comma = true -csharp_space_after_dot = false -csharp_space_after_semicolon_in_for_statement = true -csharp_space_around_declaration_statements = do_not_ignore -csharp_space_before_comma = false -csharp_space_before_dot = false -csharp_space_before_semicolon_in_for_statement = false -csharp_space_before_open_square_brackets = false -csharp_space_between_empty_square_brackets = false -csharp_space_between_method_declaration_name_and_open_parenthesis = false -csharp_space_between_square_brackets = false - -######################### -# .NET Naming conventions -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions -######################### - -[*.{cs,csx,cake,vb}] -# Naming Symbols -# constant_fields - Define constant fields -dotnet_naming_symbols.constant_fields.applicable_kinds = field -dotnet_naming_symbols.constant_fields.required_modifiers = const -# non_private_readonly_fields - Define public, internal and protected readonly fields -dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, internal, protected -dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field -dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly -# static_readonly_fields - Define static and readonly fields -dotnet_naming_symbols.static_readonly_fields.applicable_kinds = field -dotnet_naming_symbols.static_readonly_fields.required_modifiers = static, readonly -# private_readonly_fields - Define private readonly fields -dotnet_naming_symbols.private_readonly_fields.applicable_accessibilities = private -dotnet_naming_symbols.private_readonly_fields.applicable_kinds = field -dotnet_naming_symbols.private_readonly_fields.required_modifiers = readonly -# public_internal_fields - Define public and internal fields -dotnet_naming_symbols.public_internal_fields.applicable_accessibilities = public, internal -dotnet_naming_symbols.public_internal_fields.applicable_kinds = field -# private_protected_fields - Define private and protected fields -dotnet_naming_symbols.private_protected_fields.applicable_accessibilities = private, protected -dotnet_naming_symbols.private_protected_fields.applicable_kinds = field -# public_symbols - Define any public symbol -dotnet_naming_symbols.public_symbols.applicable_accessibilities = public, internal, protected, protected_internal -dotnet_naming_symbols.public_symbols.applicable_kinds = method, property, event, delegate -# parameters - Defines any parameter -dotnet_naming_symbols.parameters.applicable_kinds = parameter -# non_interface_types - Defines class, struct, enum and delegate types -dotnet_naming_symbols.non_interface_types.applicable_kinds = class, struct, enum, delegate -# interface_types - Defines interfaces -dotnet_naming_symbols.interface_types.applicable_kinds = interface - -# Naming Styles -# camel_case - Define the camelCase style -dotnet_naming_style.camel_case.capitalization = camel_case -# pascal_case - Define the Pascal_case style -dotnet_naming_style.pascal_case.capitalization = pascal_case -# first_upper - The first character must start with an upper-case character -dotnet_naming_style.first_upper.capitalization = first_word_upper -# prefix_interface_interface_with_i - Interfaces must be PascalCase and the first character of an interface must be an 'I' -dotnet_naming_style.prefix_interface_interface_with_i.capitalization = pascal_case -dotnet_naming_style.prefix_interface_interface_with_i.required_prefix = I - -# Naming Rules -# Constant fields must be PascalCase -dotnet_naming_rule.constant_fields_must_be_pascal_case.severity = warning -dotnet_naming_rule.constant_fields_must_be_pascal_case.symbols = constant_fields -dotnet_naming_rule.constant_fields_must_be_pascal_case.style = pascal_case -# Public, internal and protected readonly fields must be PascalCase -dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.severity = warning -dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.symbols = non_private_readonly_fields -dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.style = pascal_case -# Static readonly fields must be PascalCase -dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.severity = warning -dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.symbols = static_readonly_fields -dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.style = pascal_case -# Private readonly fields must be camelCase -dotnet_naming_rule.private_readonly_fields_must_be_camel_case.severity = warning -dotnet_naming_rule.private_readonly_fields_must_be_camel_case.symbols = private_readonly_fields -dotnet_naming_rule.private_readonly_fields_must_be_camel_case.style = camel_case -# Public and internal fields must be PascalCase -dotnet_naming_rule.public_internal_fields_must_be_pascal_case.severity = warning -dotnet_naming_rule.public_internal_fields_must_be_pascal_case.symbols = public_internal_fields -dotnet_naming_rule.public_internal_fields_must_be_pascal_case.style = pascal_case -# Private and protected fields must be camelCase -dotnet_naming_rule.private_protected_fields_must_be_camel_case.severity = warning -dotnet_naming_rule.private_protected_fields_must_be_camel_case.symbols = private_protected_fields -dotnet_naming_rule.private_protected_fields_must_be_camel_case.style = camel_case -# Public members must be capitalized -dotnet_naming_rule.public_members_must_be_capitalized.severity = warning -dotnet_naming_rule.public_members_must_be_capitalized.symbols = public_symbols -dotnet_naming_rule.public_members_must_be_capitalized.style = first_upper -# Parameters must be camelCase -dotnet_naming_rule.parameters_must_be_camel_case.severity = warning -dotnet_naming_rule.parameters_must_be_camel_case.symbols = parameters -dotnet_naming_rule.parameters_must_be_camel_case.style = camel_case -# Class, struct, enum and delegates must be PascalCase -dotnet_naming_rule.non_interface_types_must_be_pascal_case.severity = warning -dotnet_naming_rule.non_interface_types_must_be_pascal_case.symbols = non_interface_types -dotnet_naming_rule.non_interface_types_must_be_pascal_case.style = pascal_case -# Interfaces must be PascalCase and start with an 'I' -dotnet_naming_rule.interface_types_must_be_prefixed_with_i.severity = warning -dotnet_naming_rule.interface_types_must_be_prefixed_with_i.symbols = interface_types -dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style = prefix_interface_interface_with_i +root=true +# http://EditorConfig.org + +################# +# Common Settings +################# + +# This file is the top-most EditorConfig file + +# All Files +[*] +charset=utf-8 +end_of_line=lf +indent_style=space +indent_size=4 +insert_final_newline=false +trim_trailing_whitespace=false +max_line_length=100 + +# Microsoft .NET properties +csharp_indent_braces=false +csharp_indent_switch_labels=true +csharp_new_line_before_catch=true +csharp_new_line_before_else=true +csharp_new_line_before_finally=true +csharp_new_line_before_members_in_object_initializers=false +csharp_new_line_before_open_brace=all +csharp_new_line_between_query_expression_clauses=true +csharp_preferred_modifier_order=public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion +csharp_preserve_single_line_blocks=true +csharp_space_after_cast=true +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_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 +csharp_style_var_elsewhere=true:suggestion +csharp_style_var_for_built_in_types=true:suggestion +csharp_style_var_when_type_is_apparent=true:suggestion +csharp_using_directive_placement=outside_namespace:silent +dotnet_naming_rule.constants_rule.severity=warning +dotnet_naming_rule.constants_rule.style=upper_camel_case_style +dotnet_naming_rule.constants_rule.symbols=constants_symbols +dotnet_naming_rule.event_rule.severity=warning +dotnet_naming_rule.event_rule.style=upper_camel_case_style +dotnet_naming_rule.event_rule.symbols=event_symbols +dotnet_naming_rule.interfaces_rule.severity=warning +dotnet_naming_rule.interfaces_rule.style=i_upper_camel_case_style +dotnet_naming_rule.interfaces_rule.symbols=interfaces_symbols +dotnet_naming_rule.locals_rule.severity=warning +dotnet_naming_rule.locals_rule.style=lower_camel_case_style +dotnet_naming_rule.locals_rule.symbols=locals_symbols +dotnet_naming_rule.local_constants_rule.severity=warning +dotnet_naming_rule.local_constants_rule.style=lower_camel_case_style +dotnet_naming_rule.local_constants_rule.symbols=local_constants_symbols +dotnet_naming_rule.local_functions_rule.severity=warning +dotnet_naming_rule.local_functions_rule.style=upper_camel_case_style +dotnet_naming_rule.local_functions_rule.symbols=local_functions_symbols +dotnet_naming_rule.method_rule.severity=warning +dotnet_naming_rule.method_rule.style=upper_camel_case_style +dotnet_naming_rule.method_rule.symbols=method_symbols +dotnet_naming_rule.parameters_rule.severity=warning +dotnet_naming_rule.parameters_rule.style=lower_camel_case_style +dotnet_naming_rule.parameters_rule.symbols=parameters_symbols +dotnet_naming_rule.private_constants_rule.severity=warning +dotnet_naming_rule.private_constants_rule.style=lower_camel_case_style +dotnet_naming_rule.private_constants_rule.symbols=private_constants_symbols +dotnet_naming_rule.private_instance_fields_rule.severity=warning +dotnet_naming_rule.private_instance_fields_rule.style=lower_camel_case_style +dotnet_naming_rule.private_instance_fields_rule.symbols=private_instance_fields_symbols +dotnet_naming_rule.private_static_fields_rule.severity=warning +dotnet_naming_rule.private_static_fields_rule.style=lower_camel_case_style +dotnet_naming_rule.private_static_fields_rule.symbols=private_static_fields_symbols +dotnet_naming_rule.private_static_readonly_rule.severity=warning +dotnet_naming_rule.private_static_readonly_rule.style=lower_camel_case_style +dotnet_naming_rule.private_static_readonly_rule.symbols=private_static_readonly_symbols +dotnet_naming_rule.property_rule.severity=warning +dotnet_naming_rule.property_rule.style=upper_camel_case_style +dotnet_naming_rule.property_rule.symbols=property_symbols +dotnet_naming_rule.public_fields_rule.severity=warning +dotnet_naming_rule.public_fields_rule.style=lower_camel_case_style +dotnet_naming_rule.public_fields_rule.symbols=public_fields_symbols +dotnet_naming_rule.static_readonly_rule.severity=warning +dotnet_naming_rule.static_readonly_rule.style=upper_camel_case_style +dotnet_naming_rule.static_readonly_rule.symbols=static_readonly_symbols +dotnet_naming_rule.types_and_namespaces_rule.severity=warning +dotnet_naming_rule.types_and_namespaces_rule.style=upper_camel_case_style +dotnet_naming_rule.types_and_namespaces_rule.symbols=types_and_namespaces_symbols +dotnet_naming_rule.type_parameters_rule.severity=warning +dotnet_naming_rule.type_parameters_rule.style=t_upper_camel_case_style +dotnet_naming_rule.type_parameters_rule.symbols=type_parameters_symbols +dotnet_naming_style.i_upper_camel_case_style.capitalization=pascal_case +dotnet_naming_style.i_upper_camel_case_style.required_prefix=I +dotnet_naming_style.lower_camel_case_style.capitalization=camel_case +dotnet_naming_style.t_upper_camel_case_style.capitalization=pascal_case +dotnet_naming_style.t_upper_camel_case_style.required_prefix=T +dotnet_naming_style.upper_camel_case_style.capitalization=pascal_case +dotnet_naming_symbols.constants_symbols.applicable_accessibilities=public,internal,protected,protected_internal,private_protected +dotnet_naming_symbols.constants_symbols.applicable_kinds=field +dotnet_naming_symbols.constants_symbols.required_modifiers=const +dotnet_naming_symbols.event_symbols.applicable_accessibilities=* +dotnet_naming_symbols.event_symbols.applicable_kinds=event +dotnet_naming_symbols.interfaces_symbols.applicable_accessibilities=* +dotnet_naming_symbols.interfaces_symbols.applicable_kinds=interface +dotnet_naming_symbols.locals_symbols.applicable_accessibilities=* +dotnet_naming_symbols.locals_symbols.applicable_kinds=local +dotnet_naming_symbols.local_constants_symbols.applicable_accessibilities=* +dotnet_naming_symbols.local_constants_symbols.applicable_kinds=local +dotnet_naming_symbols.local_constants_symbols.required_modifiers=const +dotnet_naming_symbols.local_functions_symbols.applicable_accessibilities=* +dotnet_naming_symbols.local_functions_symbols.applicable_kinds=local_function +dotnet_naming_symbols.method_symbols.applicable_accessibilities=* +dotnet_naming_symbols.method_symbols.applicable_kinds=method +dotnet_naming_symbols.parameters_symbols.applicable_accessibilities=* +dotnet_naming_symbols.parameters_symbols.applicable_kinds=parameter +dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities=private +dotnet_naming_symbols.private_constants_symbols.applicable_kinds=field +dotnet_naming_symbols.private_constants_symbols.required_modifiers=const +dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities=private +dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds=field +dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities=private +dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds=field +dotnet_naming_symbols.private_static_fields_symbols.required_modifiers=static +dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities=private +dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds=field +dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers=static,readonly +dotnet_naming_symbols.property_symbols.applicable_accessibilities=* +dotnet_naming_symbols.property_symbols.applicable_kinds=property +dotnet_naming_symbols.public_fields_symbols.applicable_accessibilities=public,internal,protected,protected_internal,private_protected +dotnet_naming_symbols.public_fields_symbols.applicable_kinds=field +dotnet_naming_symbols.static_readonly_symbols.applicable_accessibilities=public,internal,protected,protected_internal,private_protected +dotnet_naming_symbols.static_readonly_symbols.applicable_kinds=field +dotnet_naming_symbols.static_readonly_symbols.required_modifiers=static,readonly +dotnet_naming_symbols.types_and_namespaces_symbols.applicable_accessibilities=* +dotnet_naming_symbols.types_and_namespaces_symbols.applicable_kinds=namespace,class,struct,enum,delegate +dotnet_naming_symbols.type_parameters_symbols.applicable_accessibilities=* +dotnet_naming_symbols.type_parameters_symbols.applicable_kinds=type_parameter +dotnet_style_parentheses_in_arithmetic_binary_operators=never_if_unnecessary:none +dotnet_style_parentheses_in_other_binary_operators=never_if_unnecessary:none +dotnet_style_parentheses_in_relational_binary_operators=never_if_unnecessary:none +dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion +dotnet_style_predefined_type_for_member_access=true:suggestion +dotnet_style_qualification_for_event=false:suggestion +dotnet_style_qualification_for_field=false:suggestion +dotnet_style_qualification_for_method=false:suggestion +dotnet_style_qualification_for_property=false:suggestion +dotnet_style_require_accessibility_modifiers=for_non_interface_members:suggestion + +# ReSharper properties +resharper_accessor_owner_body=expression_body +resharper_alignment_tab_fill_style=use_spaces +resharper_align_first_arg_by_paren=false +resharper_align_linq_query=false +resharper_align_multiline_argument=true +resharper_align_multiline_array_and_object_initializer=true +resharper_align_multiline_array_initializer=true +resharper_align_multiline_binary_expressions_chain=true +resharper_align_multiline_calls_chain=true +resharper_align_multiline_expression=true +resharper_align_multiline_extends_list=false +resharper_align_multiline_for_stmt=false +resharper_align_multiline_implements_list=true +resharper_align_multiline_parameter=true +resharper_align_multiline_switch_expression=false +resharper_align_multline_type_parameter_constrains=false +resharper_align_multline_type_parameter_list=false +resharper_align_tuple_components=false +resharper_allow_alias=true +resharper_allow_comment_after_lbrace=false +resharper_always_use_end_of_line_brace_style=false +resharper_apply_auto_detected_rules=true +resharper_apply_on_completion=false +resharper_arguments_anonymous_function=positional +resharper_arguments_literal=positional +resharper_arguments_named=positional +resharper_arguments_other=positional +resharper_arguments_skip_single=false +resharper_arguments_string_literal=positional +resharper_attribute_style=do_not_touch +resharper_autodetect_indent_settings=true +resharper_blank_lines_after_block_statements=1 +resharper_blank_lines_after_case=0 +resharper_blank_lines_after_control_transfer_statements=0 +resharper_blank_lines_after_imports=1 +resharper_blank_lines_after_multiline_statements=0 +resharper_blank_lines_after_options=1 +resharper_blank_lines_after_start_comment=1 +resharper_blank_lines_after_using_list=1 +resharper_blank_lines_around_auto_property=1 +resharper_blank_lines_around_block_case_section=0 +resharper_blank_lines_around_field=1 +resharper_blank_lines_around_global_attribute=0 +resharper_blank_lines_around_invocable=1 +resharper_blank_lines_around_local_method=1 +resharper_blank_lines_around_multiline_case_section=0 +resharper_blank_lines_around_namespace=1 +resharper_blank_lines_around_property=1 +resharper_blank_lines_around_razor_functions=1 +resharper_blank_lines_around_razor_helpers=1 +resharper_blank_lines_around_razor_sections=1 +resharper_blank_lines_around_region=1 +resharper_blank_lines_around_single_line_auto_property=0 +resharper_blank_lines_around_single_line_field=0 +resharper_blank_lines_around_single_line_invocable=0 +resharper_blank_lines_around_single_line_local_method=0 +resharper_blank_lines_around_single_line_property=0 +resharper_blank_lines_around_type=1 +resharper_blank_lines_before_block_statements=0 +resharper_blank_lines_before_case=0 +resharper_blank_lines_before_control_transfer_statements=0 +resharper_blank_lines_before_multiline_statements=0 +resharper_blank_lines_before_single_line_comment=0 +resharper_blank_lines_between_using_groups=0 +resharper_blank_lines_inside_namespace=0 +resharper_blank_lines_inside_region=1 +resharper_blank_lines_inside_type=0 +resharper_blank_line_after_pi=true +resharper_braces_for_dowhile=required +resharper_braces_for_fixed=required +resharper_braces_for_for=not_required +resharper_braces_for_foreach=not_required +resharper_braces_for_ifelse=not_required_for_both +resharper_braces_for_lock=required +resharper_braces_for_using=required +resharper_braces_for_while=not_required +resharper_braces_redundant=true +resharper_can_use_global_alias=true +resharper_constructor_or_destructor_body=block_body +resharper_continuous_indent_multiplier=1 +resharper_csharp_align_multiple_declaration=false +resharper_csharp_naming_rule.enum_member=AaBb +resharper_csharp_naming_rule.method_property_event=AaBb +resharper_csharp_naming_rule.other=AaBb +resharper_csharp_naming_rule.private_static_readonly=aaBb, AaBb +resharper_csharp_prefer_qualified_reference=false +resharper_default_exception_variable_name=e +resharper_delete_quotes_from_solid_values=false +resharper_disable_blank_line_changes=false +resharper_disable_formatter=false +resharper_disable_indenter=false +resharper_disable_int_align=false +resharper_disable_line_break_changes=false +resharper_disable_line_break_removal=false +resharper_disable_space_changes=false +resharper_empty_block_style=multiline +resharper_enable_wrapping=false +resharper_enforce_line_ending_style=true +resharper_event_handler_pattern_long=$object$On$event$ +resharper_event_handler_pattern_short=On$event$ +resharper_extra_spaces=remove_all +resharper_force_attribute_style=separate +resharper_force_chop_compound_do_expression=false +resharper_force_chop_compound_if_expression=false +resharper_force_chop_compound_while_expression=false +resharper_format_leading_spaces_decl=false +resharper_html_attribute_indent=align_by_first_attribute +resharper_html_linebreak_before_elements=body,div,p,form,h1,h2,h3 +resharper_html_max_blank_lines_between_tags=2 +resharper_html_pi_attribute_style=on_single_line +resharper_html_space_before_self_closing=false +resharper_ignore_space_preservation=false +resharper_include_prefix_comment_in_indent=false +resharper_indent_anonymous_method_block=true +resharper_indent_case_from_select=true +resharper_indent_child_elements=OneIndent +resharper_indent_inside_namespace=true +resharper_indent_invocation_pars=inside +resharper_indent_method_decl_pars=inside +resharper_indent_nested_fixed_stmt=false +resharper_indent_nested_foreach_stmt=false +resharper_indent_nested_for_stmt=false +resharper_indent_nested_lock_stmt=false +resharper_indent_nested_usings_stmt=false +resharper_indent_nested_while_stmt=false +resharper_indent_pars=inside +resharper_indent_preprocessor_if=no_indent +resharper_indent_preprocessor_other=no_indent +resharper_indent_preprocessor_region=usual_indent +resharper_indent_statement_pars=inside +resharper_indent_text=OneIndent +resharper_indent_typearg_angles=inside +resharper_indent_typeparam_angles=inside +resharper_indent_type_constraints=true +resharper_instance_members_qualify_declared_in=this_class, base_class +resharper_int_align=false +resharper_keep_blank_lines_in_code=2 +resharper_keep_blank_lines_in_declarations=2 +resharper_keep_existing_attribute_arrangement=false +resharper_keep_existing_declaration_block_arrangement=false +resharper_keep_existing_declaration_parens_arrangement=true +resharper_keep_existing_embedded_arrangement=true +resharper_keep_existing_embedded_block_arrangement=false +resharper_keep_existing_enum_arrangement=false +resharper_keep_existing_expr_member_arrangement=true +resharper_keep_existing_invocation_parens_arrangement=true +resharper_keep_existing_switch_expression_arrangement=true +resharper_keep_nontrivial_alias=true +resharper_keep_user_linebreaks=true +resharper_keep_user_wrapping=true +resharper_linebreaks_around_razor_statements=true +resharper_linebreaks_inside_tags_for_elements_longer_than=2147483647 +resharper_linebreaks_inside_tags_for_elements_with_child_elements=true +resharper_linebreaks_inside_tags_for_multiline_elements=true +resharper_linebreak_before_all_elements=false +resharper_linebreak_before_multiline_elements=true +resharper_linebreak_before_singleline_elements=false +resharper_local_function_body=block_body +resharper_max_array_initializer_elements_on_line=10000 +resharper_max_attribute_length_for_same_line=38 +resharper_max_enum_members_on_line=3 +resharper_max_formal_parameters_on_line=10000 +resharper_max_initializer_elements_on_line=1 +resharper_max_invocation_arguments_on_line=10000 +resharper_method_or_operator_body=block_body +resharper_nested_ternary_style=expanded +resharper_new_line_before_while=false +resharper_normalize_tag_names=false +resharper_no_indent_inside_elements=html,body,thead,tbody,tfoot +resharper_no_indent_inside_if_element_longer_than=200 +resharper_old_engine=false +resharper_outdent_binary_ops=false +resharper_outdent_commas=false +resharper_outdent_dots=false +resharper_outdent_ternary_ops=false +resharper_parentheses_non_obvious_operations=none, shift, bitwise_and, bitwise_exclusive_or, bitwise_inclusive_or, bitwise +resharper_parentheses_redundancy_style=remove_if_not_clarifies_precedence +resharper_pi_attributes_indent=align_by_first_attribute +resharper_place_accessorholder_attribute_on_same_line=if_owner_is_single_line +resharper_place_accessor_attribute_on_same_line=if_owner_is_single_line +resharper_place_comments_at_first_column=false +resharper_place_constructor_initializer_on_same_line=true +resharper_place_event_attribute_on_same_line=false +resharper_place_expr_accessor_on_single_line=if_owner_is_single_line +resharper_place_expr_method_on_single_line=if_owner_is_single_line +resharper_place_expr_property_on_single_line=if_owner_is_single_line +resharper_place_field_attribute_on_same_line=true +resharper_place_linq_into_on_new_line=true +resharper_place_method_attribute_on_same_line=false +resharper_place_property_attribute_on_same_line=false +resharper_place_simple_case_statement_on_same_line=false +resharper_place_simple_embedded_statement_on_same_line=if_owner_is_single_line +resharper_place_simple_initializer_on_single_line=false +resharper_place_simple_switch_expression_on_single_line=false +resharper_place_type_attribute_on_same_line=false +resharper_place_type_constraints_on_same_line=true +resharper_prefer_explicit_discard_declaration=false +resharper_prefer_separate_deconstructed_variables_declaration=false +resharper_preserve_spaces_inside_tags=pre,textarea +resharper_qualified_using_at_nested_scope=false +resharper_quote_style=doublequoted +resharper_razor_prefer_qualified_reference=true +resharper_remove_blank_lines_near_braces=false +resharper_remove_blank_lines_near_braces_in_code=true +resharper_remove_blank_lines_near_braces_in_declarations=true +resharper_remove_this_qualifier=true +resharper_resx_attribute_indent=single_indent +resharper_resx_linebreak_before_elements= +resharper_resx_max_blank_lines_between_tags=0 +resharper_resx_pi_attribute_style=do_not_touch +resharper_resx_space_before_self_closing=false +resharper_resx_wrap_tags_and_pi=false +resharper_resx_wrap_text=false +resharper_show_autodetect_configure_formatting_tip=true +resharper_sort_attributes=false +resharper_sort_class_selectors=false +resharper_sort_usings=true +resharper_sort_usings_lowercase_first=false +resharper_sort_usings_with_system_first=true +resharper_spaces_around_eq_in_attribute=false +resharper_spaces_around_eq_in_pi_attribute=false +resharper_spaces_inside_tags=false +resharper_space_after_attributes=true +resharper_space_after_attribute_target_colon=true +resharper_space_after_colon=true +resharper_space_after_colon_in_case=true +resharper_space_after_comma=true +resharper_space_after_last_attribute=false +resharper_space_after_last_pi_attribute=false +resharper_space_after_operator_keyword=true +resharper_space_after_triple_slash=true +resharper_space_after_type_parameter_constraint_colon=true +resharper_space_after_unary_operator=false +resharper_space_around_additive_op=true +resharper_space_around_alias_eq=true +resharper_space_around_assignment_op=true +resharper_space_around_lambda_arrow=true +resharper_space_around_member_access_operator=false +resharper_space_around_relational_op=true +resharper_space_around_shift_op=true +resharper_space_around_stmt_colon=true +resharper_space_around_ternary_operator=true +resharper_space_before_array_rank_parentheses=false +resharper_space_before_attribute_target_colon=false +resharper_space_before_checked_parentheses=false +resharper_space_before_colon=false +resharper_space_before_colon_in_case=false +resharper_space_before_comma=false +resharper_space_before_default_parentheses=false +resharper_space_before_empty_invocation_parentheses=false +resharper_space_before_empty_method_parentheses=false +resharper_space_before_invocation_parentheses=false +resharper_space_before_label_colon=false +resharper_space_before_method_parentheses=false +resharper_space_before_nameof_parentheses=false +resharper_space_before_nullable_mark=false +resharper_space_before_pointer_asterik_declaration=false +resharper_space_before_semicolon=false +resharper_space_before_singleline_accessorholder=true +resharper_space_before_sizeof_parentheses=false +resharper_space_before_trailing_comment=true +resharper_space_before_typeof_parentheses=false +resharper_space_before_type_argument_angle=false +resharper_space_before_type_parameter_angle=false +resharper_space_before_type_parameter_constraint_colon=true +resharper_space_before_type_parameter_parentheses=true +resharper_space_between_accessors_in_singleline_property=true +resharper_space_between_attribute_sections=true +resharper_space_between_keyword_and_expression=true +resharper_space_between_keyword_and_type=true +resharper_space_in_singleline_accessorholder=true +resharper_space_in_singleline_anonymous_method=true +resharper_space_in_singleline_method=true +resharper_space_near_postfix_and_prefix_op=false +resharper_space_within_array_initialization_braces=false +resharper_space_within_array_rank_empty_parentheses=false +resharper_space_within_array_rank_parentheses=false +resharper_space_within_attribute_angles=false +resharper_space_within_checked_parentheses=false +resharper_space_within_default_parentheses=false +resharper_space_within_empty_braces=true +resharper_space_within_empty_invocation_parentheses=false +resharper_space_within_empty_method_parentheses=false +resharper_space_within_expression_parentheses=false +resharper_space_within_invocation_parentheses=false +resharper_space_within_method_parentheses=false +resharper_space_within_nameof_parentheses=false +resharper_space_within_single_line_array_initializer_braces=true +resharper_space_within_sizeof_parentheses=false +resharper_space_within_tuple_parentheses=false +resharper_space_within_typeof_parentheses=false +resharper_space_within_type_argument_angles=false +resharper_space_within_type_parameter_angles=false +resharper_space_within_type_parameter_parentheses=false +resharper_special_else_if_treatment=true +resharper_static_members_qualify_members=none +resharper_static_members_qualify_with=do_not_change, declared_type +resharper_stick_comment=true +resharper_support_vs_event_naming_pattern=true +resharper_trailing_comma_in_multiline_lists=false +resharper_trailing_comma_in_singleline_lists=false +resharper_use_continuous_indent_inside_initializer_braces=true +resharper_use_continuous_indent_inside_parens=true +resharper_use_heuristics_for_body_style=true +resharper_use_indents_from_main_language_in_file=true +resharper_use_indent_from_previous_element=true +resharper_use_indent_from_vs=false +resharper_use_roslyn_logic_for_evident_types=false +resharper_vb_align_multiple_declaration=true +resharper_vb_place_field_attribute_on_same_line=true +resharper_vb_place_method_attribute_on_same_line=false +resharper_vb_place_type_attribute_on_same_line=false +resharper_vb_prefer_qualified_reference=false +resharper_vb_space_around_multiplicative_op=false +resharper_wrap_after_declaration_lpar=false +resharper_wrap_after_dot_in_method_calls=false +resharper_wrap_after_invocation_lpar=false +resharper_wrap_arguments_style=wrap_if_long +resharper_wrap_around_elements=true +resharper_wrap_array_initializer_style=wrap_if_long +resharper_wrap_before_arrow_with_expressions=false +resharper_wrap_before_binary_opsign=false +resharper_wrap_before_comma=false +resharper_wrap_before_declaration_lpar=false +resharper_wrap_before_declaration_rpar=false +resharper_wrap_before_extends_colon=false +resharper_wrap_before_first_type_parameter_constraint=false +resharper_wrap_before_invocation_lpar=false +resharper_wrap_before_invocation_rpar=false +resharper_wrap_before_linq_expression=false +resharper_wrap_before_ternary_opsigns=true +resharper_wrap_before_type_parameter_langle=false +resharper_wrap_chained_binary_expressions=wrap_if_long +resharper_wrap_chained_method_calls=wrap_if_long +resharper_wrap_enum_declaration=chop_always +resharper_wrap_extends_list_style=wrap_if_long +resharper_wrap_for_stmt_header_style=chop_if_long +resharper_wrap_lines=true +resharper_wrap_multiple_declaration_style=chop_if_long +resharper_wrap_multiple_type_parameter_constraints_style=chop_if_long +resharper_wrap_object_and_collection_initializer_style=chop_if_long +resharper_wrap_parameters_style=wrap_if_long +resharper_wrap_switch_expression=chop_always +resharper_wrap_ternary_expr_style=chop_always +resharper_wrap_verbatim_interpolated_strings=no_wrap +resharper_xmldoc_attribute_indent=single_indent +resharper_xmldoc_linebreak_before_elements=summary,remarks,example,returns,param,typeparam,value,para +resharper_xmldoc_max_blank_lines_between_tags=0 +resharper_xmldoc_pi_attribute_style=do_not_touch +resharper_xmldoc_space_before_self_closing=true +resharper_xmldoc_wrap_tags_and_pi=true +resharper_xmldoc_wrap_text=true +resharper_xml_attribute_indent=align_by_first_attribute +resharper_xml_linebreak_before_elements= +resharper_xml_max_blank_lines_between_tags=2 +resharper_xml_pi_attribute_style=do_not_touch +resharper_xml_space_before_self_closing=true +resharper_xml_wrap_tags_and_pi=true +resharper_xml_wrap_text=false + +# ReSharper inspection severities +resharper_abstract_class_constructor_can_be_made_protected_highlighting=hint +resharper_access_rights_in_text_highlighting=warning +resharper_access_to_disposed_closure_highlighting=warning +resharper_access_to_for_each_variable_in_closure_highlighting=warning +resharper_access_to_modified_closure_highlighting=warning +resharper_access_to_static_member_via_derived_type_highlighting=warning +resharper_address_of_marshal_by_ref_object_highlighting=warning +resharper_amd_dependency_path_problem_highlighting=none +resharper_angular_html_banana_highlighting=warning +resharper_annotate_can_be_null_parameter_highlighting=warning +resharper_annotate_can_be_null_type_member_highlighting=warning +resharper_annotate_not_null_parameter_highlighting=none +resharper_annotate_not_null_type_member_highlighting=none +resharper_annotation_conflict_in_hierarchy_highlighting=warning +resharper_annotation_redundancy_at_value_type_highlighting=warning +resharper_annotation_redundancy_in_hierarchy_highlighting=warning +resharper_arguments_style_anonymous_function_highlighting=hint +resharper_arguments_style_literal_highlighting=hint +resharper_arguments_style_named_expression_highlighting=hint +resharper_arguments_style_other_highlighting=hint +resharper_arguments_style_string_literal_highlighting=hint +resharper_arrange_accessor_owner_body_highlighting=suggestion +resharper_arrange_attributes_highlighting=none +resharper_arrange_constructor_or_destructor_body_highlighting=none +resharper_arrange_local_function_body_highlighting=none +resharper_arrange_method_or_operator_body_highlighting=none +resharper_arrange_redundant_parentheses_highlighting=hint +resharper_arrange_static_member_qualifier_highlighting=hint +resharper_arrange_this_qualifier_highlighting=hint +resharper_arrange_trailing_comma_in_multiline_lists_highlighting=hint +resharper_arrange_trailing_comma_in_singleline_lists_highlighting=hint +resharper_arrange_type_member_modifiers_highlighting=hint +resharper_arrange_type_modifiers_highlighting=hint +resharper_arrange_var_keywords_in_deconstructing_declaration_highlighting=suggestion +resharper_asp_content_placeholder_not_resolved_highlighting=error +resharper_asp_custom_page_parser_filter_type_highlighting=warning +resharper_asp_dead_code_highlighting=warning +resharper_asp_entity_highlighting=warning +resharper_asp_image_highlighting=warning +resharper_asp_invalid_control_type_highlighting=error +resharper_asp_not_resolved_highlighting=error +resharper_asp_ods_method_reference_resolve_error_highlighting=error +resharper_asp_resolve_warning_highlighting=warning +resharper_asp_skin_not_resolved_highlighting=error +resharper_asp_tag_attribute_with_optional_value_highlighting=warning +resharper_asp_theme_not_resolved_highlighting=error +resharper_asp_unused_register_directive_highlighting_highlighting=warning +resharper_asp_warning_highlighting=warning +resharper_assigned_value_is_never_used_highlighting=warning +resharper_assigned_value_wont_be_assigned_to_corresponding_field_highlighting=warning +resharper_assignment_in_conditional_expression_highlighting=warning +resharper_assignment_in_condition_expression_highlighting=warning +resharper_assignment_is_fully_discarded_highlighting=warning +resharper_assign_null_to_not_null_attribute_highlighting=warning +resharper_assign_to_constant_highlighting=error +resharper_assign_to_implicit_global_in_function_scope_highlighting=warning +resharper_asxx_path_error_highlighting=warning +resharper_async_iterator_invocation_without_await_foreach_highlighting=warning +resharper_auto_property_can_be_made_get_only_global_highlighting=suggestion +resharper_auto_property_can_be_made_get_only_local_highlighting=suggestion +resharper_bad_attribute_brackets_spaces_highlighting=none +resharper_bad_braces_spaces_highlighting=none +resharper_bad_child_statement_indent_highlighting=warning +resharper_bad_colon_spaces_highlighting=none +resharper_bad_comma_spaces_highlighting=none +resharper_bad_control_braces_indent_highlighting=suggestion +resharper_bad_control_braces_line_breaks_highlighting=none +resharper_bad_declaration_braces_indent_highlighting=none +resharper_bad_declaration_braces_line_breaks_highlighting=none +resharper_bad_empty_braces_line_breaks_highlighting=none +resharper_bad_expression_braces_indent_highlighting=none +resharper_bad_expression_braces_line_breaks_highlighting=none +resharper_bad_generic_brackets_spaces_highlighting=none +resharper_bad_indent_highlighting=none +resharper_bad_linq_line_breaks_highlighting=none +resharper_bad_list_line_breaks_highlighting=none +resharper_bad_member_access_spaces_highlighting=none +resharper_bad_namespace_braces_indent_highlighting=none +resharper_bad_parens_line_breaks_highlighting=none +resharper_bad_parens_spaces_highlighting=none +resharper_bad_preprocessor_indent_highlighting=none +resharper_bad_semicolon_spaces_highlighting=none +resharper_bad_spaces_after_keyword_highlighting=none +resharper_bad_square_brackets_spaces_highlighting=none +resharper_bad_switch_braces_indent_highlighting=none +resharper_bad_symbol_spaces_highlighting=none +resharper_base_member_has_params_highlighting=warning +resharper_base_method_call_with_default_parameter_highlighting=warning +resharper_base_object_equals_is_object_equals_highlighting=warning +resharper_base_object_get_hash_code_call_in_get_hash_code_highlighting=warning +resharper_bitwise_operator_on_enum_without_flags_highlighting=warning +resharper_block_scope_redeclaration_highlighting=error +resharper_built_in_type_reference_style_for_member_access_highlighting=hint +resharper_built_in_type_reference_style_highlighting=hint +resharper_by_ref_argument_is_volatile_field_highlighting=warning +resharper_caller_callee_using_error_highlighting=error +resharper_caller_callee_using_highlighting=warning +resharper_cannot_apply_equality_operator_to_type_highlighting=warning +resharper_center_tag_is_obsolete_highlighting=warning +resharper_check_for_reference_equality_instead_1_highlighting=suggestion +resharper_check_for_reference_equality_instead_2_highlighting=suggestion +resharper_check_for_reference_equality_instead_3_highlighting=suggestion +resharper_check_for_reference_equality_instead_4_highlighting=suggestion +resharper_check_namespace_highlighting=warning +resharper_class_cannot_be_instantiated_highlighting=warning +resharper_class_can_be_sealed_global_highlighting=none +resharper_class_can_be_sealed_local_highlighting=none +resharper_class_never_instantiated_global_highlighting=suggestion +resharper_class_never_instantiated_local_highlighting=suggestion +resharper_class_with_virtual_members_never_inherited_global_highlighting=suggestion +resharper_class_with_virtual_members_never_inherited_local_highlighting=suggestion +resharper_clear_attribute_is_obsolete_all_highlighting=warning +resharper_clear_attribute_is_obsolete_highlighting=warning +resharper_closure_on_modified_variable_highlighting=warning +resharper_coerced_equals_using_highlighting=warning +resharper_coerced_equals_using_with_null_undefined_highlighting=none +resharper_collection_never_queried_global_highlighting=warning +resharper_collection_never_queried_local_highlighting=warning +resharper_collection_never_updated_global_highlighting=warning +resharper_collection_never_updated_local_highlighting=warning +resharper_comma_not_valid_here_highlighting=error +resharper_comment_typo_highlighting=suggestion +resharper_compare_non_constrained_generic_with_null_highlighting=none +resharper_compare_of_floats_by_equality_operator_highlighting=warning +resharper_conditional_ternary_equal_branch_highlighting=warning +resharper_condition_is_always_const_highlighting=warning +resharper_condition_is_always_true_or_false_highlighting=warning +resharper_confusing_char_as_integer_in_constructor_highlighting=warning +resharper_constant_conditional_access_qualifier_highlighting=warning +resharper_constant_null_coalescing_condition_highlighting=warning +resharper_constructor_call_not_used_highlighting=warning +resharper_constructor_initializer_loop_highlighting=warning +resharper_container_annotation_redundancy_highlighting=warning +resharper_context_value_is_provided_highlighting=none +resharper_contract_annotation_not_parsed_highlighting=warning +resharper_convert_closure_to_method_group_highlighting=suggestion +resharper_convert_conditional_ternary_expression_to_switch_expression_highlighting=hint +resharper_convert_if_do_to_while_highlighting=suggestion +resharper_convert_if_statement_to_conditional_ternary_expression_highlighting=suggestion +resharper_convert_if_statement_to_null_coalescing_assignment_highlighting=suggestion +resharper_convert_if_statement_to_null_coalescing_expression_highlighting=suggestion +resharper_convert_if_statement_to_return_statement_highlighting=hint +resharper_convert_if_statement_to_switch_expression_highlighting=hint +resharper_convert_if_statement_to_switch_statement_highlighting=hint +resharper_convert_if_to_or_expression_highlighting=suggestion +resharper_convert_nullable_to_short_form_highlighting=suggestion +resharper_convert_switch_statement_to_switch_expression_highlighting=hint +resharper_convert_to_auto_property_highlighting=suggestion +resharper_convert_to_auto_property_when_possible_highlighting=hint +resharper_convert_to_auto_property_with_private_setter_highlighting=hint +resharper_convert_to_compound_assignment_highlighting=hint +resharper_convert_to_constant_global_highlighting=hint +resharper_convert_to_constant_local_highlighting=hint +resharper_convert_to_lambda_expression_highlighting=suggestion +resharper_convert_to_lambda_expression_when_possible_highlighting=none +resharper_convert_to_local_function_highlighting=suggestion +resharper_convert_to_null_coalescing_compound_assignment_highlighting=suggestion +resharper_convert_to_static_class_highlighting=suggestion +resharper_convert_to_using_declaration_highlighting=suggestion +resharper_convert_to_vb_auto_property_highlighting=suggestion +resharper_convert_to_vb_auto_property_when_possible_highlighting=hint +resharper_convert_to_vb_auto_property_with_private_setter_highlighting=hint +resharper_co_variant_array_conversion_highlighting=warning +resharper_create_specialized_overload_highlighting=hint +resharper_css_browser_compatibility_highlighting=warning +resharper_css_caniuse_feature_requires_prefix_highlighting=hint +resharper_css_caniuse_unsupported_feature_highlighting=hint +resharper_css_not_resolved_highlighting=error +resharper_css_obsolete_highlighting=hint +resharper_css_property_does_not_override_vendor_property_highlighting=warning +resharper_cyclic_reference_comment_highlighting=none +resharper_c_sharp_warnings_cs0078_highlighting=warning +resharper_c_sharp_warnings_cs0108_cs0114_highlighting=warning +resharper_c_sharp_warnings_cs0109_highlighting=warning +resharper_c_sharp_warnings_cs0162_highlighting=warning +resharper_c_sharp_warnings_cs0183_highlighting=warning +resharper_c_sharp_warnings_cs0184_highlighting=warning +resharper_c_sharp_warnings_cs0197_highlighting=warning +resharper_c_sharp_warnings_cs0252_cs0253_highlighting=warning +resharper_c_sharp_warnings_cs0420_highlighting=warning +resharper_c_sharp_warnings_cs0465_highlighting=warning +resharper_c_sharp_warnings_cs0469_highlighting=warning +resharper_c_sharp_warnings_cs0612_highlighting=warning +resharper_c_sharp_warnings_cs0618_highlighting=warning +resharper_c_sharp_warnings_cs0628_highlighting=warning +resharper_c_sharp_warnings_cs0642_highlighting=warning +resharper_c_sharp_warnings_cs0657_highlighting=warning +resharper_c_sharp_warnings_cs0658_highlighting=warning +resharper_c_sharp_warnings_cs0659_highlighting=warning +resharper_c_sharp_warnings_cs0660_cs0661_highlighting=warning +resharper_c_sharp_warnings_cs0665_highlighting=warning +resharper_c_sharp_warnings_cs0672_highlighting=warning +resharper_c_sharp_warnings_cs0693_highlighting=warning +resharper_c_sharp_warnings_cs1030_highlighting=warning +resharper_c_sharp_warnings_cs1058_highlighting=warning +resharper_c_sharp_warnings_cs1066_highlighting=warning +resharper_c_sharp_warnings_cs1522_highlighting=warning +resharper_c_sharp_warnings_cs1570_highlighting=warning +resharper_c_sharp_warnings_cs1571_highlighting=warning +resharper_c_sharp_warnings_cs1572_highlighting=warning +resharper_c_sharp_warnings_cs1573_highlighting=warning +resharper_c_sharp_warnings_cs1574_cs1584_cs1581_cs1580_highlighting=warning +resharper_c_sharp_warnings_cs1574_highlighting=warning +resharper_c_sharp_warnings_cs1580_highlighting=warning +resharper_c_sharp_warnings_cs1584_highlighting=warning +resharper_c_sharp_warnings_cs1587_highlighting=warning +resharper_c_sharp_warnings_cs1589_highlighting=warning +resharper_c_sharp_warnings_cs1590_highlighting=warning +resharper_c_sharp_warnings_cs1591_highlighting=warning +resharper_c_sharp_warnings_cs1592_highlighting=warning +resharper_c_sharp_warnings_cs1710_highlighting=warning +resharper_c_sharp_warnings_cs1711_highlighting=warning +resharper_c_sharp_warnings_cs1712_highlighting=warning +resharper_c_sharp_warnings_cs1717_highlighting=warning +resharper_c_sharp_warnings_cs1723_highlighting=warning +resharper_c_sharp_warnings_cs1911_highlighting=warning +resharper_c_sharp_warnings_cs1957_highlighting=warning +resharper_c_sharp_warnings_cs1981_highlighting=warning +resharper_c_sharp_warnings_cs1998_highlighting=warning +resharper_c_sharp_warnings_cs4014_highlighting=warning +resharper_c_sharp_warnings_cs7095_highlighting=warning +resharper_c_sharp_warnings_cs8094_highlighting=warning +resharper_c_sharp_warnings_cs8123_highlighting=warning +resharper_c_sharp_warnings_cs8383_highlighting=warning +resharper_c_sharp_warnings_cs8416_highlighting=warning +resharper_c_sharp_warnings_cs8417_highlighting=warning +resharper_c_sharp_warnings_cs8425_highlighting=warning +resharper_c_sharp_warnings_cs8509_highlighting=warning +resharper_c_sharp_warnings_cs8597_highlighting=warning +resharper_c_sharp_warnings_cs8600_highlighting=warning +resharper_c_sharp_warnings_cs8601_highlighting=warning +resharper_c_sharp_warnings_cs8602_highlighting=warning +resharper_c_sharp_warnings_cs8603_highlighting=warning +resharper_c_sharp_warnings_cs8604_highlighting=warning +resharper_c_sharp_warnings_cs8605_highlighting=warning +resharper_c_sharp_warnings_cs8606_highlighting=warning +resharper_c_sharp_warnings_cs8608_highlighting=warning +resharper_c_sharp_warnings_cs8609_highlighting=warning +resharper_c_sharp_warnings_cs8610_highlighting=warning +resharper_c_sharp_warnings_cs8611_highlighting=warning +resharper_c_sharp_warnings_cs8612_highlighting=warning +resharper_c_sharp_warnings_cs8613_highlighting=warning +resharper_c_sharp_warnings_cs8614_highlighting=warning +resharper_c_sharp_warnings_cs8615_highlighting=warning +resharper_c_sharp_warnings_cs8616_highlighting=warning +resharper_c_sharp_warnings_cs8617_highlighting=warning +resharper_c_sharp_warnings_cs8618_highlighting=warning +resharper_c_sharp_warnings_cs8619_highlighting=warning +resharper_c_sharp_warnings_cs8620_highlighting=warning +resharper_c_sharp_warnings_cs8621_highlighting=warning +resharper_c_sharp_warnings_cs8622_highlighting=warning +resharper_c_sharp_warnings_cs8624_highlighting=warning +resharper_c_sharp_warnings_cs8625_highlighting=warning +resharper_c_sharp_warnings_cs8629_highlighting=warning +resharper_c_sharp_warnings_cs8631_highlighting=warning +resharper_c_sharp_warnings_cs8632_highlighting=warning +resharper_c_sharp_warnings_cs8633_highlighting=warning +resharper_c_sharp_warnings_cs8634_highlighting=warning +resharper_c_sharp_warnings_cs8643_highlighting=warning +resharper_c_sharp_warnings_cs8644_highlighting=warning +resharper_c_sharp_warnings_cs8645_highlighting=warning +resharper_c_sharp_warnings_cs8656_highlighting=warning +resharper_c_sharp_warnings_cs8667_highlighting=warning +resharper_c_sharp_warnings_cs8714_highlighting=warning +resharper_c_sharp_warnings_wme006_highlighting=warning +resharper_declaration_hides_highlighting=hint +resharper_declaration_is_empty_highlighting=warning +resharper_declaration_visibility_error_highlighting=error +resharper_default_value_attribute_for_optional_parameter_highlighting=warning +resharper_delegate_subtraction_highlighting=warning +resharper_deleting_non_qualified_reference_highlighting=error +resharper_dl_tag_contains_non_dt_or_dd_elements_highlighting=hint +resharper_double_colons_expected_highlighting=error +resharper_double_colons_preferred_highlighting=suggestion +resharper_double_negation_of_boolean_highlighting=warning +resharper_double_negation_operator_highlighting=suggestion +resharper_duplicate_identifier_error_highlighting=error +resharper_duplicate_reference_comment_highlighting=warning +resharper_duplicate_resource_highlighting=warning +resharper_duplicating_local_declaration_highlighting=warning +resharper_duplicating_parameter_declaration_error_highlighting=error +resharper_duplicating_property_declaration_error_highlighting=error +resharper_duplicating_property_declaration_highlighting=warning +resharper_duplicating_switch_label_highlighting=warning +resharper_dynamic_shift_right_op_is_not_int_highlighting=warning +resharper_elided_trailing_element_highlighting=warning +resharper_empty_constructor_highlighting=warning +resharper_empty_destructor_highlighting=warning +resharper_empty_embedded_statement_highlighting=warning +resharper_empty_for_statement_highlighting=warning +resharper_empty_general_catch_clause_highlighting=warning +resharper_empty_namespace_highlighting=warning +resharper_empty_object_property_declaration_highlighting=error +resharper_empty_return_value_for_type_annotated_function_highlighting=warning +resharper_empty_statement_highlighting=warning +resharper_empty_title_tag_highlighting=hint +resharper_enc0001_highlighting=info +resharper_enc0002_highlighting=info +resharper_enc0003_highlighting=info +resharper_enc0004_highlighting=info +resharper_enc0005_highlighting=info +resharper_enc0006_highlighting=info +resharper_enc0007_highlighting=info +resharper_enc0008_highlighting=info +resharper_enc0009_highlighting=info +resharper_enc0010_highlighting=info +resharper_enc0011_highlighting=info +resharper_enc0012_highlighting=info +resharper_enc0013_highlighting=info +resharper_enc0014_highlighting=info +resharper_enc0015_highlighting=info +resharper_enc0016_highlighting=info +resharper_enc0017_highlighting=info +resharper_enc0018_highlighting=info +resharper_enc0019_highlighting=info +resharper_enc0020_highlighting=info +resharper_enc0021_highlighting=info +resharper_enc0023_highlighting=info +resharper_enc0024_highlighting=info +resharper_enc0025_highlighting=info +resharper_enc0026_highlighting=info +resharper_enc0028_highlighting=info +resharper_enc0029_highlighting=info +resharper_enc0030_highlighting=info +resharper_enc0031_highlighting=info +resharper_enc0032_highlighting=info +resharper_enc0033_highlighting=info +resharper_enc0034_highlighting=info +resharper_enc0035_highlighting=info +resharper_enc0036_highlighting=info +resharper_enc0037_highlighting=info +resharper_enc0038_highlighting=info +resharper_enc0039_highlighting=info +resharper_enc0040_highlighting=info +resharper_enc0041_highlighting=info +resharper_enc0044_highlighting=info +resharper_enc0045_highlighting=info +resharper_enc0046_highlighting=info +resharper_enc0047_highlighting=info +resharper_enc0048_highlighting=info +resharper_enc0049_highlighting=info +resharper_enc0050_highlighting=info +resharper_enc0051_highlighting=info +resharper_enc0052_highlighting=info +resharper_enc0053_highlighting=info +resharper_enc0054_highlighting=info +resharper_enc0055_highlighting=info +resharper_enc0056_highlighting=info +resharper_enc0057_highlighting=info +resharper_enc0058_highlighting=info +resharper_enc0059_highlighting=info +resharper_enc0060_highlighting=info +resharper_enc0061_highlighting=info +resharper_enc0062_highlighting=info +resharper_enc0063_highlighting=info +resharper_enc0064_highlighting=info +resharper_enc0065_highlighting=info +resharper_enc0066_highlighting=info +resharper_enc0067_highlighting=info +resharper_enc0068_highlighting=info +resharper_enc0069_highlighting=info +resharper_enc0070_highlighting=info +resharper_enc0071_highlighting=info +resharper_enc0072_highlighting=info +resharper_enc0073_highlighting=info +resharper_enc0074_highlighting=info +resharper_enc0075_highlighting=info +resharper_enc0076_highlighting=info +resharper_enc0080_highlighting=info +resharper_enc0081_highlighting=info +resharper_enc0082_highlighting=info +resharper_enc0083_highlighting=info +resharper_enc0084_highlighting=info +resharper_enc0085_highlighting=info +resharper_enc0086_highlighting=info +resharper_enc1001_highlighting=info +resharper_enc1002_highlighting=info +resharper_enc1003_highlighting=info +resharper_enc1004_highlighting=info +resharper_enforce_do_while_statement_braces_highlighting=none +resharper_enforce_fixed_statement_braces_highlighting=none +resharper_enforce_foreach_statement_braces_highlighting=none +resharper_enforce_for_statement_braces_highlighting=none +resharper_enforce_if_statement_braces_highlighting=none +resharper_enforce_lock_statement_braces_highlighting=none +resharper_enforce_using_statement_braces_highlighting=none +resharper_enforce_while_statement_braces_highlighting=none +resharper_enumerable_sum_in_explicit_unchecked_context_highlighting=warning +resharper_enum_underlying_type_is_int_highlighting=warning +resharper_equal_expression_comparison_highlighting=warning +resharper_error_in_xml_doc_reference_highlighting=error +resharper_es6_feature_highlighting=error +resharper_es7_feature_highlighting=error +resharper_escaped_keyword_highlighting=warning +resharper_eval_arguments_name_error_highlighting=error +resharper_event_never_invoked_global_highlighting=suggestion +resharper_event_never_invoked_highlighting=warning +resharper_event_never_subscribed_to_global_highlighting=suggestion +resharper_event_never_subscribed_to_local_highlighting=suggestion +resharper_event_unsubscription_via_anonymous_delegate_highlighting=warning +resharper_experimental_feature_highlighting=error +resharper_explicit_caller_info_argument_highlighting=warning +resharper_expression_is_always_const_highlighting=warning +resharper_expression_is_always_null_highlighting=warning +resharper_field_can_be_made_read_only_global_highlighting=suggestion +resharper_field_can_be_made_read_only_local_highlighting=suggestion +resharper_foreach_can_be_converted_to_query_using_another_get_enumerator_highlighting=hint +resharper_foreach_can_be_partly_converted_to_query_using_another_get_enumerator_highlighting=hint +resharper_format_string_placeholders_mismatch_highlighting=warning +resharper_format_string_problem_highlighting=warning +resharper_for_can_be_converted_to_foreach_highlighting=suggestion +resharper_for_statement_condition_is_true_highlighting=warning +resharper_functions_used_before_declared_highlighting=none +resharper_function_complexity_overflow_highlighting=none +resharper_function_never_returns_highlighting=warning +resharper_function_parameter_named_arguments_highlighting=warning +resharper_function_recursive_on_all_paths_highlighting=warning +resharper_function_used_out_of_scope_highlighting=warning +resharper_gc_suppress_finalize_for_type_without_destructor_highlighting=warning +resharper_generic_enumerator_not_disposed_highlighting=warning +resharper_heuristically_unreachable_code_highlighting=warning +resharper_heuristic_unreachable_code_highlighting=warning +resharper_hex_color_value_with_alpha_highlighting=error +resharper_html_attributes_quotes_highlighting=hint +resharper_html_attribute_not_resolved_highlighting=warning +resharper_html_attribute_value_not_resolved_highlighting=warning +resharper_html_dead_code_highlighting=warning +resharper_html_event_not_resolved_highlighting=warning +resharper_html_id_duplication_highlighting=warning +resharper_html_id_not_resolved_highlighting=warning +resharper_html_obsolete_highlighting=warning +resharper_html_path_error_highlighting=warning +resharper_html_tag_not_closed_highlighting=error +resharper_html_tag_not_resolved_highlighting=warning +resharper_html_tag_should_be_self_closed_highlighting=warning +resharper_html_tag_should_not_be_self_closed_highlighting=warning +resharper_html_warning_highlighting=warning +resharper_identifier_typo_highlighting=none +resharper_ignored_directive_highlighting=warning +resharper_implicit_any_error_highlighting=error +resharper_implicit_any_type_warning_highlighting=warning +resharper_import_keyword_not_with_invocation_highlighting=error +resharper_inactive_preprocessor_branch_highlighting=warning +resharper_inconsistently_synchronized_field_highlighting=warning +resharper_inconsistent_function_returns_highlighting=warning +resharper_inconsistent_naming_highlighting=warning +resharper_incorrect_blank_lines_near_braces_highlighting=none +resharper_incorrect_operand_in_type_of_comparison_highlighting=warning +resharper_incorrect_triple_slash_location_highlighting=warning +resharper_indexing_by_invalid_range_highlighting=warning +resharper_inheritdoc_consider_usage_highlighting=none +resharper_inheritdoc_invalid_usage_highlighting=warning +resharper_inline_out_variable_declaration_highlighting=suggestion +resharper_internal_or_private_member_not_documented_highlighting=none +resharper_interpolated_string_expression_is_not_i_formattable_highlighting=warning +resharper_introduce_optional_parameters_global_highlighting=suggestion +resharper_introduce_optional_parameters_local_highlighting=suggestion +resharper_introduce_variable_to_apply_guard_highlighting=hint +resharper_int_division_by_zero_highlighting=warning +resharper_int_relational_or_equality_expression_always_same_value_highlighting=warning +resharper_int_variable_overflow_highlighting=warning +resharper_int_variable_overflow_in_checked_context_highlighting=warning +resharper_int_variable_overflow_in_unchecked_context_highlighting=warning +resharper_invalid_attribute_value_highlighting=warning +resharper_invalid_json_syntax_highlighting=error +resharper_invalid_task_element_highlighting=none +resharper_invalid_value_highlighting=error +resharper_invalid_value_type_highlighting=warning +resharper_invalid_xml_doc_comment_highlighting=warning +resharper_invert_condition_1_highlighting=hint +resharper_invert_if_highlighting=hint +resharper_invocation_is_skipped_highlighting=hint +resharper_invocation_of_non_function_highlighting=warning +resharper_invoked_expression_maybe_non_function_highlighting=warning +resharper_invoke_as_extension_method_highlighting=suggestion +resharper_is_expression_always_false_highlighting=warning +resharper_is_expression_always_of_type_highlighting=warning +resharper_is_expression_always_true_highlighting=warning +resharper_iterator_method_result_is_ignored_highlighting=warning +resharper_iterator_never_returns_highlighting=warning +resharper_join_declaration_and_initializer_highlighting=suggestion +resharper_join_declaration_and_initializer_js_highlighting=suggestion +resharper_join_null_check_with_usage_highlighting=suggestion +resharper_join_null_check_with_usage_when_possible_highlighting=none +resharper_json_validation_failed_highlighting=error +resharper_js_path_not_found_highlighting=error +resharper_js_unreachable_code_highlighting=warning +resharper_jump_must_be_in_loop_highlighting=warning +resharper_label_or_semicolon_expected_highlighting=error +resharper_less_specific_overload_than_main_signature_highlighting=warning +resharper_lexical_declaration_needs_block_highlighting=error +resharper_localizable_element_highlighting=warning +resharper_local_function_can_be_made_static_highlighting=hint +resharper_local_function_redefined_later_highlighting=warning +resharper_local_name_captured_only_highlighting=warning +resharper_local_variable_hides_member_highlighting=warning +resharper_long_literal_ending_lower_l_highlighting=warning +resharper_loop_can_be_converted_to_query_highlighting=hint +resharper_loop_can_be_partly_converted_to_query_highlighting=none +resharper_loop_variable_is_never_changed_inside_loop_highlighting=warning +resharper_l_value_is_expected_highlighting=error +resharper_markup_attribute_typo_highlighting=suggestion +resharper_markup_text_typo_highlighting=suggestion +resharper_meaningless_default_parameter_value_highlighting=warning +resharper_member_can_be_internal_highlighting=none +resharper_member_can_be_made_static_global_highlighting=hint +resharper_member_can_be_made_static_local_highlighting=hint +resharper_member_can_be_private_global_highlighting=suggestion +resharper_member_can_be_private_local_highlighting=suggestion +resharper_member_can_be_protected_global_highlighting=suggestion +resharper_member_can_be_protected_local_highlighting=suggestion +resharper_member_hides_static_from_outer_class_highlighting=warning +resharper_member_initializer_value_ignored_highlighting=warning +resharper_merge_cast_with_type_check_highlighting=suggestion +resharper_merge_conditional_expression_highlighting=suggestion +resharper_merge_conditional_expression_when_possible_highlighting=none +resharper_merge_sequential_checks_highlighting=suggestion +resharper_merge_sequential_checks_when_possible_highlighting=none +resharper_method_has_async_overload_highlighting=suggestion +resharper_method_has_async_overload_with_cancellation_highlighting=suggestion +resharper_method_overload_with_optional_parameter_highlighting=warning +resharper_method_supports_cancellation_highlighting=suggestion +resharper_mismatched_asmdef_filename_highlighting=suggestion +resharper_missing_alt_attribute_in_img_tag_highlighting=hint +resharper_missing_attribute_highlighting=warning +resharper_missing_blank_lines_highlighting=none +resharper_missing_body_tag_highlighting=warning +resharper_missing_has_own_property_in_foreach_highlighting=warning +resharper_missing_head_and_body_tags_highlighting=warning +resharper_missing_head_tag_highlighting=warning +resharper_missing_indent_highlighting=none +resharper_missing_linebreak_highlighting=none +resharper_missing_space_highlighting=none +resharper_missing_title_tag_highlighting=hint +resharper_misuse_of_owner_function_this_highlighting=warning +resharper_more_specific_foreach_variable_type_available_highlighting=suggestion +resharper_more_specific_signature_after_less_specific_highlighting=warning +resharper_multiple_declarations_in_foreach_highlighting=error +resharper_multiple_nullable_attributes_usage_highlighting=warning +resharper_multiple_order_by_highlighting=warning +resharper_multiple_output_tags_highlighting=warning +resharper_multiple_resolve_candidates_in_text_highlighting=warning +resharper_multiple_spaces_highlighting=none +resharper_multiple_statements_on_one_line_highlighting=none +resharper_multiple_type_members_on_one_line_highlighting=none +resharper_must_use_return_value_highlighting=warning +resharper_mvc_action_not_resolved_highlighting=error +resharper_mvc_area_not_resolved_highlighting=error +resharper_mvc_controller_not_resolved_highlighting=error +resharper_mvc_invalid_model_type_highlighting=error +resharper_mvc_masterpage_not_resolved_highlighting=error +resharper_mvc_partial_view_not_resolved_highlighting=error +resharper_mvc_template_not_resolved_highlighting=error +resharper_mvc_view_component_not_resolved_highlighting=error +resharper_mvc_view_component_view_not_resolved_highlighting=error +resharper_mvc_view_not_resolved_highlighting=error +resharper_native_type_prototype_extending_highlighting=warning +resharper_native_type_prototype_overwriting_highlighting=warning +resharper_negative_equality_expression_highlighting=suggestion +resharper_negative_index_highlighting=warning +resharper_nested_string_interpolation_highlighting=suggestion +resharper_non_assigned_constant_highlighting=error +resharper_non_constant_equality_expression_has_constant_result_highlighting=warning +resharper_non_readonly_member_in_get_hash_code_highlighting=warning +resharper_non_volatile_field_in_double_check_locking_highlighting=warning +resharper_not_accessed_field_compiler_highlighting=warning +resharper_not_accessed_field_global_highlighting=suggestion +resharper_not_accessed_field_local_highlighting=warning +resharper_not_accessed_variable_compiler_highlighting=warning +resharper_not_accessed_variable_highlighting=warning +resharper_not_all_paths_return_value_highlighting=warning +resharper_not_assigned_out_parameter_highlighting=warning +resharper_not_declared_in_parent_culture_highlighting=warning +resharper_not_null_member_is_not_initialized_highlighting=warning +resharper_not_observable_annotation_redundancy_highlighting=warning +resharper_not_overridden_in_specific_culture_highlighting=warning +resharper_not_resolved_highlighting=warning +resharper_not_resolved_in_text_highlighting=warning +resharper_no_support_for_vb_highlighting=warning +resharper_n_unit_async_method_must_be_task_highlighting=warning +resharper_n_unit_incorrect_argument_type_highlighting=warning +resharper_n_unit_incorrect_expected_result_type_highlighting=warning +resharper_n_unit_method_with_parameters_and_test_attribute_highlighting=warning +resharper_n_unit_missing_arguments_in_test_case_attribute_highlighting=warning +resharper_n_unit_non_public_method_with_test_attribute_highlighting=warning +resharper_n_unit_redundant_argument_instead_of_expected_result_highlighting=warning +resharper_n_unit_redundant_argument_in_test_case_attribute_highlighting=warning +resharper_n_unit_redundant_expected_result_in_test_case_attribute_highlighting=warning +resharper_n_unit_test_case_attribute_requires_expected_result_highlighting=warning +resharper_n_unit_test_case_result_property_duplicates_expected_result_highlighting=warning +resharper_n_unit_test_case_result_property_is_obsolete_highlighting=warning +resharper_n_unit_test_case_source_cannot_be_resolved_highlighting=warning +resharper_n_unit_test_case_source_must_be_field_property_method_highlighting=warning +resharper_n_unit_test_case_source_must_be_static_highlighting=warning +resharper_n_unit_test_case_source_should_implement_i_enumerable_highlighting=warning +resharper_object_creation_as_statement_highlighting=warning +resharper_object_destructuring_without_parentheses_highlighting=error +resharper_object_literals_are_not_comma_free_highlighting=error +resharper_obsolete_element_error_highlighting=error +resharper_obsolete_element_highlighting=warning +resharper_octal_literals_not_allowed_error_highlighting=error +resharper_ol_tag_contains_non_li_elements_highlighting=hint +resharper_one_way_operation_contract_with_return_type_highlighting=warning +resharper_operation_contract_without_service_contract_highlighting=warning +resharper_operator_is_can_be_used_highlighting=warning +resharper_optional_parameter_hierarchy_mismatch_highlighting=warning +resharper_optional_parameter_ref_out_highlighting=warning +resharper_other_tags_inside_script1_highlighting=error +resharper_other_tags_inside_script2_highlighting=error +resharper_other_tags_inside_unclosed_script_highlighting=error +resharper_outdent_is_off_prev_level_highlighting=none +resharper_output_tag_required_highlighting=warning +resharper_overridden_with_empty_value_highlighting=warning +resharper_overridden_with_same_value_highlighting=suggestion +resharper_parameter_doesnt_make_any_sense_highlighting=warning +resharper_parameter_hides_member_highlighting=warning +resharper_parameter_only_used_for_precondition_check_global_highlighting=suggestion +resharper_parameter_only_used_for_precondition_check_local_highlighting=warning +resharper_parameter_type_can_be_enumerable_global_highlighting=hint +resharper_parameter_type_can_be_enumerable_local_highlighting=hint +resharper_parameter_value_is_not_used_highlighting=warning +resharper_partial_method_parameter_name_mismatch_highlighting=warning +resharper_partial_method_with_single_part_highlighting=warning +resharper_partial_type_with_single_part_highlighting=warning +resharper_path_not_resolved_highlighting=error +resharper_pattern_always_matches_highlighting=warning +resharper_pattern_always_of_type_highlighting=warning +resharper_pattern_never_matches_highlighting=warning +resharper_polymorphic_field_like_event_invocation_highlighting=warning +resharper_possible_infinite_inheritance_highlighting=warning +resharper_possible_intended_rethrow_highlighting=warning +resharper_possible_interface_member_ambiguity_highlighting=warning +resharper_possible_invalid_cast_exception_highlighting=warning +resharper_possible_invalid_cast_exception_in_foreach_loop_highlighting=warning +resharper_possible_invalid_operation_exception_highlighting=warning +resharper_possible_loss_of_fraction_highlighting=warning +resharper_possible_mistaken_argument_highlighting=warning +resharper_possible_mistaken_call_to_get_type_1_highlighting=warning +resharper_possible_mistaken_call_to_get_type_2_highlighting=warning +resharper_possible_multiple_enumeration_highlighting=warning +resharper_possible_multiple_write_access_in_double_check_locking_highlighting=warning +resharper_possible_null_reference_exception_highlighting=warning +resharper_possible_struct_member_modification_of_non_variable_struct_highlighting=warning +resharper_possible_unintended_linear_search_in_set_highlighting=warning +resharper_possible_unintended_queryable_as_enumerable_highlighting=suggestion +resharper_possible_unintended_reference_comparison_highlighting=warning +resharper_possible_write_to_me_highlighting=warning +resharper_possibly_impure_method_call_on_readonly_variable_highlighting=warning +resharper_possibly_incorrectly_broken_statement_highlighting=warning +resharper_possibly_missing_indexer_initializer_comma_highlighting=warning +resharper_possibly_mistaken_use_of_interpolated_string_insert_highlighting=warning +resharper_possibly_mistaken_use_of_params_method_highlighting=warning +resharper_possibly_unassigned_property_highlighting=hint +resharper_private_field_can_be_converted_to_local_variable_highlighting=warning +resharper_private_variable_can_be_made_readonly_highlighting=hint +resharper_property_getter_cannot_have_parameters_highlighting=error +resharper_property_not_resolved_highlighting=error +resharper_property_setter_must_have_single_parameter_highlighting=error +resharper_public_constructor_in_abstract_class_highlighting=suggestion +resharper_pure_attribute_on_void_method_highlighting=warning +resharper_qualified_expression_is_null_highlighting=warning +resharper_qualified_expression_maybe_null_highlighting=warning +resharper_razor_layout_not_resolved_highlighting=error +resharper_razor_section_not_resolved_highlighting=error +resharper_read_access_in_double_check_locking_highlighting=warning +resharper_redundant_abstract_modifier_highlighting=warning +resharper_redundant_anonymous_type_property_name_highlighting=warning +resharper_redundant_argument_default_value_highlighting=warning +resharper_redundant_array_creation_expression_highlighting=hint +resharper_redundant_array_lower_bound_specification_highlighting=warning +resharper_redundant_assignment_highlighting=warning +resharper_redundant_attribute_parentheses_highlighting=hint +resharper_redundant_attribute_usage_property_highlighting=suggestion +resharper_redundant_base_constructor_call_highlighting=warning +resharper_redundant_base_qualifier_highlighting=warning +resharper_redundant_blank_lines_highlighting=none +resharper_redundant_block_highlighting=warning +resharper_redundant_bool_compare_highlighting=warning +resharper_redundant_case_label_highlighting=warning +resharper_redundant_cast_0_highlighting=warning +resharper_redundant_cast_highlighting=warning +resharper_redundant_catch_clause_highlighting=warning +resharper_redundant_check_before_assignment_highlighting=warning +resharper_redundant_collection_initializer_element_braces_highlighting=hint +resharper_redundant_comparison_with_boolean_highlighting=warning +resharper_redundant_css_hack_highlighting=warning +resharper_redundant_declaration_semicolon_highlighting=hint +resharper_redundant_default_member_initializer_highlighting=warning +resharper_redundant_delegate_creation_highlighting=warning +resharper_redundant_disable_warning_comment_highlighting=warning +resharper_redundant_discarded_pattern_highlighting=suggestion +resharper_redundant_discard_designation_highlighting=suggestion +resharper_redundant_else_block_highlighting=warning +resharper_redundant_empty_case_else_highlighting=warning +resharper_redundant_empty_constructor_highlighting=warning +resharper_redundant_empty_finally_block_highlighting=warning +resharper_redundant_empty_object_creation_argument_list_highlighting=hint +resharper_redundant_empty_object_or_collection_initializer_highlighting=warning +resharper_redundant_empty_switch_section_highlighting=warning +resharper_redundant_enumerable_cast_call_highlighting=warning +resharper_redundant_explicit_array_creation_highlighting=warning +resharper_redundant_explicit_array_size_highlighting=warning +resharper_redundant_explicit_nullable_creation_highlighting=warning +resharper_redundant_explicit_params_array_creation_highlighting=suggestion +resharper_redundant_explicit_tuple_component_name_highlighting=warning +resharper_redundant_extends_list_entry_highlighting=warning +resharper_redundant_fixed_pointer_declaration_highlighting=suggestion +resharper_redundant_highlighting=warning +resharper_redundant_if_else_block_highlighting=hint +resharper_redundant_if_statement_then_keyword_highlighting=none +resharper_redundant_immediate_delegate_invocation_highlighting=suggestion +resharper_redundant_include_highlighting=warning +resharper_redundant_intermediate_variable_highlighting=hint +resharper_redundant_iterator_keyword_highlighting=warning +resharper_redundant_jump_statement_highlighting=warning +resharper_redundant_lambda_parameter_type_highlighting=warning +resharper_redundant_lambda_signature_parentheses_highlighting=hint +resharper_redundant_linebreak_highlighting=none +resharper_redundant_local_class_name_highlighting=hint +resharper_redundant_local_function_name_highlighting=hint +resharper_redundant_logical_conditional_expression_operand_highlighting=warning +resharper_redundant_me_qualifier_highlighting=warning +resharper_redundant_my_base_qualifier_highlighting=warning +resharper_redundant_my_class_qualifier_highlighting=warning +resharper_redundant_name_qualifier_highlighting=warning +resharper_redundant_not_null_constraint_highlighting=warning +resharper_redundant_nullable_annotation_on_reference_type_constraint_highlighting=warning +resharper_redundant_nullable_annotation_on_type_constraint_has_non_nullable_base_type_highlighting=warning +resharper_redundant_nullable_annotation_on_type_constraint_has_non_nullable_type_kind_highlighting=warning +resharper_redundant_nullable_type_mark_highlighting=warning +resharper_redundant_overflow_checking_context_highlighting=warning +resharper_redundant_overload_global_highlighting=suggestion +resharper_redundant_overload_local_highlighting=suggestion +resharper_redundant_overridden_member_highlighting=warning +resharper_redundant_params_highlighting=warning +resharper_redundant_parentheses_highlighting=none +resharper_redundant_parent_type_declaration_highlighting=warning +resharper_redundant_property_parentheses_highlighting=hint +resharper_redundant_property_pattern_clause_highlighting=suggestion +resharper_redundant_qualifier_highlighting=warning +resharper_redundant_query_order_by_ascending_keyword_highlighting=hint +resharper_redundant_range_bound_highlighting=suggestion +resharper_redundant_readonly_modifier_highlighting=suggestion +resharper_redundant_setter_value_parameter_declaration_highlighting=hint +resharper_redundant_space_highlighting=none +resharper_redundant_string_format_call_highlighting=warning +resharper_redundant_string_interpolation_highlighting=suggestion +resharper_redundant_string_to_char_array_call_highlighting=warning +resharper_redundant_string_type_highlighting=suggestion +resharper_redundant_ternary_expression_highlighting=warning +resharper_redundant_to_string_call_for_value_type_highlighting=hint +resharper_redundant_to_string_call_highlighting=warning +resharper_redundant_type_arguments_of_method_highlighting=warning +resharper_redundant_type_cast_highlighting=warning +resharper_redundant_type_cast_structural_highlighting=warning +resharper_redundant_type_specification_in_default_expression_highlighting=suggestion +resharper_redundant_units_highlighting=warning +resharper_redundant_unsafe_context_highlighting=warning +resharper_redundant_using_directive_highlighting=warning +resharper_redundant_variable_type_specification_highlighting=hint +resharper_redundant_verbatim_prefix_highlighting=suggestion +resharper_redundant_verbatim_string_prefix_highlighting=suggestion +resharper_reference_equals_with_value_type_highlighting=warning +resharper_reg_exp_inspections_highlighting=warning +resharper_remove_constructor_invocation_highlighting=none +resharper_remove_redundant_braces_highlighting=none +resharper_remove_redundant_or_statement_false_highlighting=suggestion +resharper_remove_redundant_or_statement_true_highlighting=suggestion +resharper_remove_to_list_1_highlighting=suggestion +resharper_remove_to_list_2_highlighting=suggestion +resharper_replace_indicing_with_array_destructuring_highlighting=hint +resharper_replace_indicing_with_short_hand_properties_after_destructuring_highlighting=hint +resharper_replace_undefined_checking_series_with_object_destructuring_highlighting=hint +resharper_replace_with_destructuring_swap_highlighting=hint +resharper_replace_with_first_or_default_1_highlighting=suggestion +resharper_replace_with_first_or_default_2_highlighting=suggestion +resharper_replace_with_first_or_default_3_highlighting=suggestion +resharper_replace_with_first_or_default_4_highlighting=suggestion +resharper_replace_with_last_or_default_1_highlighting=suggestion +resharper_replace_with_last_or_default_2_highlighting=suggestion +resharper_replace_with_last_or_default_3_highlighting=suggestion +resharper_replace_with_last_or_default_4_highlighting=suggestion +resharper_replace_with_of_type_1_highlighting=suggestion +resharper_replace_with_of_type_2_highlighting=suggestion +resharper_replace_with_of_type_3_highlighting=suggestion +resharper_replace_with_of_type_any_1_highlighting=suggestion +resharper_replace_with_of_type_any_2_highlighting=suggestion +resharper_replace_with_of_type_count_1_highlighting=suggestion +resharper_replace_with_of_type_count_2_highlighting=suggestion +resharper_replace_with_of_type_first_1_highlighting=suggestion +resharper_replace_with_of_type_first_2_highlighting=suggestion +resharper_replace_with_of_type_first_or_default_1_highlighting=suggestion +resharper_replace_with_of_type_first_or_default_2_highlighting=suggestion +resharper_replace_with_of_type_last_1_highlighting=suggestion +resharper_replace_with_of_type_last_2_highlighting=suggestion +resharper_replace_with_of_type_last_or_default_1_highlighting=suggestion +resharper_replace_with_of_type_last_or_default_2_highlighting=suggestion +resharper_replace_with_of_type_long_count_highlighting=suggestion +resharper_replace_with_of_type_single_1_highlighting=suggestion +resharper_replace_with_of_type_single_2_highlighting=suggestion +resharper_replace_with_of_type_single_or_default_1_highlighting=suggestion +resharper_replace_with_of_type_single_or_default_2_highlighting=suggestion +resharper_replace_with_of_type_where_highlighting=suggestion +resharper_replace_with_simple_assignment_false_highlighting=suggestion +resharper_replace_with_simple_assignment_true_highlighting=suggestion +resharper_replace_with_single_assignment_false_highlighting=suggestion +resharper_replace_with_single_assignment_true_highlighting=suggestion +resharper_replace_with_single_call_to_any_highlighting=suggestion +resharper_replace_with_single_call_to_count_highlighting=suggestion +resharper_replace_with_single_call_to_first_highlighting=suggestion +resharper_replace_with_single_call_to_first_or_default_highlighting=suggestion +resharper_replace_with_single_call_to_last_highlighting=suggestion +resharper_replace_with_single_call_to_last_or_default_highlighting=suggestion +resharper_replace_with_single_call_to_single_highlighting=suggestion +resharper_replace_with_single_call_to_single_or_default_highlighting=suggestion +resharper_replace_with_single_or_default_1_highlighting=suggestion +resharper_replace_with_single_or_default_2_highlighting=suggestion +resharper_replace_with_single_or_default_3_highlighting=suggestion +resharper_replace_with_single_or_default_4_highlighting=suggestion +resharper_replace_with_string_is_null_or_empty_highlighting=suggestion +resharper_required_base_types_conflict_highlighting=warning +resharper_required_base_types_direct_conflict_highlighting=warning +resharper_required_base_types_is_not_inherited_highlighting=warning +resharper_requires_fallback_color_highlighting=warning +resharper_resource_item_not_resolved_highlighting=error +resharper_resource_not_resolved_highlighting=error +resharper_resx_not_resolved_highlighting=warning +resharper_return_from_global_scopet_with_value_highlighting=warning +resharper_return_type_can_be_enumerable_global_highlighting=hint +resharper_return_type_can_be_enumerable_local_highlighting=hint +resharper_return_value_of_pure_method_is_not_used_highlighting=warning +resharper_safe_cast_is_used_as_type_check_highlighting=suggestion +resharper_same_imports_with_different_name_highlighting=warning +resharper_same_variable_assignment_highlighting=warning +resharper_script_tag_has_both_src_and_content_attributes_highlighting=error +resharper_script_tag_with_content_before_includes_highlighting=hint +resharper_sealed_member_in_sealed_class_highlighting=warning +resharper_sensitive_data_api_usage_tag_highlighting=warning +resharper_separate_control_transfer_statement_highlighting=none +resharper_service_contract_without_operations_highlighting=warning +resharper_shift_expression_real_shift_count_is_zero_highlighting=warning +resharper_shift_expression_result_equals_zero_highlighting=warning +resharper_shift_expression_right_operand_not_equal_real_count_highlighting=warning +resharper_shift_expression_zero_left_operand_highlighting=warning +resharper_similar_anonymous_type_nearby_highlighting=hint +resharper_similar_expressions_comparison_highlighting=warning +resharper_simplify_conditional_operator_highlighting=suggestion +resharper_simplify_conditional_ternary_expression_highlighting=suggestion +resharper_simplify_i_if_highlighting=suggestion +resharper_simplify_linq_expression_highlighting=suggestion +resharper_specify_a_culture_in_string_conversion_explicitly_highlighting=warning +resharper_specify_string_comparison_highlighting=hint +resharper_specify_variable_type_explicitly_highlighting=hint +resharper_stack_alloc_inside_loop_highlighting=warning +resharper_statement_termination_highlighting=warning +resharper_static_member_initializer_referes_to_member_below_highlighting=warning +resharper_static_member_in_generic_type_highlighting=warning +resharper_static_problem_in_text_highlighting=warning +resharper_string_compare_is_culture_specific_1_highlighting=warning +resharper_string_compare_is_culture_specific_2_highlighting=warning +resharper_string_compare_is_culture_specific_3_highlighting=warning +resharper_string_compare_is_culture_specific_4_highlighting=warning +resharper_string_compare_is_culture_specific_5_highlighting=warning +resharper_string_compare_is_culture_specific_6_highlighting=warning +resharper_string_compare_to_is_culture_specific_highlighting=warning +resharper_string_concatenation_to_template_string_highlighting=hint +resharper_string_ends_with_is_culture_specific_highlighting=none +resharper_string_index_of_is_culture_specific_1_highlighting=warning +resharper_string_index_of_is_culture_specific_2_highlighting=warning +resharper_string_index_of_is_culture_specific_3_highlighting=warning +resharper_string_last_index_of_is_culture_specific_1_highlighting=warning +resharper_string_last_index_of_is_culture_specific_2_highlighting=warning +resharper_string_last_index_of_is_culture_specific_3_highlighting=warning +resharper_string_literal_as_interpolation_argument_highlighting=suggestion +resharper_string_literal_typo_highlighting=none +resharper_string_literal_wrong_quotes_highlighting=hint +resharper_string_starts_with_is_culture_specific_highlighting=none +resharper_struct_can_be_made_read_only_highlighting=suggestion +resharper_struct_member_can_be_made_read_only_highlighting=none +resharper_suggest_base_type_for_parameter_highlighting=hint +resharper_suggest_discard_declaration_var_style_highlighting=hint +resharper_suggest_var_or_type_built_in_types_highlighting=hint +resharper_suggest_var_or_type_deconstruction_declarations_highlighting=hint +resharper_suggest_var_or_type_elsewhere_highlighting=hint +resharper_suggest_var_or_type_simple_types_highlighting=hint +resharper_super_call_prohibits_this_highlighting=error +resharper_suspicious_instanceof_check_highlighting=warning +resharper_suspicious_lambda_block_highlighting=warning +resharper_suspicious_this_usage_highlighting=warning +resharper_suspicious_typeof_check_highlighting=warning +resharper_suspicious_type_conversion_global_highlighting=warning +resharper_switch_expression_handles_some_known_enum_values_with_exception_in_default_highlighting=hint +resharper_switch_statement_for_enum_misses_default_section_highlighting=hint +resharper_switch_statement_handles_some_known_enum_values_with_default_highlighting=hint +resharper_switch_statement_missing_some_enum_cases_no_default_highlighting=hint +resharper_symbol_from_not_copied_locally_reference_used_warning_highlighting=warning +resharper_syntax_is_not_allowed_highlighting=warning +resharper_tabs_and_spaces_mismatch_highlighting=none +resharper_tabs_are_disallowed_highlighting=none +resharper_tabs_outside_indent_highlighting=none +resharper_tail_recursive_call_highlighting=hint +resharper_tasks_not_loaded_highlighting=warning +resharper_ternary_can_be_replaced_by_its_condition_highlighting=warning +resharper_this_in_global_context_highlighting=warning +resharper_thread_static_at_instance_field_highlighting=warning +resharper_thread_static_field_has_initializer_highlighting=warning +resharper_throw_must_be_followed_by_expression_highlighting=error +resharper_too_wide_local_variable_scope_highlighting=suggestion +resharper_tree_node_enumerable_can_be_used_tag_highlighting=none +resharper_try_cast_always_succeeds_highlighting=suggestion +resharper_try_statements_can_be_merged_highlighting=hint +resharper_ts_not_resolved_highlighting=error +resharper_ts_resolved_from_inaccessible_module_highlighting=error +resharper_type_guard_doesnt_affect_anything_highlighting=warning +resharper_type_guard_produces_never_type_highlighting=warning +resharper_type_parameter_can_be_variant_highlighting=suggestion +resharper_type_parameter_hides_type_param_from_outer_scope_highlighting=warning +resharper_ul_tag_contains_non_li_elements_highlighting=hint +resharper_unassigned_field_compiler_highlighting=warning +resharper_unassigned_field_global_highlighting=suggestion +resharper_unassigned_field_local_highlighting=warning +resharper_unassigned_get_only_auto_property_highlighting=warning +resharper_unassigned_readonly_field_compiler_highlighting=warning +resharper_unassigned_readonly_field_highlighting=warning +resharper_unclosed_script_highlighting=error +resharper_undeclared_global_variable_using_highlighting=warning +resharper_unexpected_attribute_highlighting=warning +resharper_unexpected_directive_highlighting=warning +resharper_unexpected_value_highlighting=error +resharper_unity_duplicate_event_function_highlighting=warning +resharper_unity_duplicate_shortcut_highlighting=warning +resharper_unity_expected_component_highlighting=warning +resharper_unity_expected_scriptable_object_highlighting=warning +resharper_unity_explicit_tag_comparison_highlighting=warning +resharper_unity_incorrect_method_signature_highlighting=warning +resharper_unity_incorrect_method_signature_in_string_literal_highlighting=warning +resharper_unity_incorrect_mono_behaviour_instantiation_highlighting=warning +resharper_unity_incorrect_scriptable_object_instantiation_highlighting=warning +resharper_unity_inefficient_multidimensional_array_usage_highlighting=warning +resharper_unity_inefficient_multiplication_order_highlighting=warning +resharper_unity_inefficient_property_access_highlighting=warning +resharper_unity_instantiate_without_parent_highlighting=warning +resharper_unity_load_scene_ambiguous_scene_name_highlighting=warning +resharper_unity_load_scene_disabled_scene_name_highlighting=warning +resharper_unity_load_scene_unexisting_scene_highlighting=warning +resharper_unity_load_scene_unknown_scene_name_highlighting=warning +resharper_unity_load_scene_wrong_index_highlighting=warning +resharper_unity_no_null_coalescing_highlighting=warning +resharper_unity_no_null_propagation_highlighting=warning +resharper_unity_parameter_not_derived_from_component_highlighting=warning +resharper_unity_performance_critical_code_camera_main_highlighting=hint +resharper_unity_performance_critical_code_invocation_highlighting=hint +resharper_unity_performance_critical_code_null_comparison_highlighting=hint +resharper_unity_possible_misapplication_of_attribute_to_multiple_fields_highlighting=warning +resharper_unity_prefer_address_by_id_to_graphics_params_highlighting=warning +resharper_unity_prefer_generic_method_overload_highlighting=warning +resharper_unity_prefer_non_alloc_api_highlighting=warning +resharper_unity_property_drawer_on_gui_base_highlighting=warning +resharper_unity_redundant_attribute_on_target_highlighting=warning +resharper_unity_redundant_event_function_highlighting=warning +resharper_unity_redundant_formerly_serialized_as_attribute_highlighting=warning +resharper_unity_redundant_hide_in_inspector_attribute_highlighting=warning +resharper_unity_redundant_initialize_on_load_attribute_highlighting=warning +resharper_unity_redundant_serialize_field_attribute_highlighting=warning +resharper_unity_unknown_input_axes_highlighting=warning +resharper_unity_unknown_layer_highlighting=warning +resharper_unity_unknown_tag_highlighting=warning +resharper_unity_unresolved_component_or_scriptable_object_highlighting=warning +resharper_unknown_css_class_highlighting=warning +resharper_unknown_css_variable_highlighting=warning +resharper_unknown_css_vendor_extension_highlighting=hint +resharper_unknown_item_group_highlighting=warning +resharper_unknown_metadata_highlighting=warning +resharper_unknown_output_parameter_highlighting=warning +resharper_unknown_property_highlighting=warning +resharper_unknown_target_highlighting=warning +resharper_unknown_task_attribute_highlighting=warning +resharper_unknown_task_highlighting=warning +resharper_unnecessary_whitespace_highlighting=none +resharper_unreachable_code_highlighting=warning +resharper_unreachable_switch_arm_due_to_integer_analysis_highlighting=warning +resharper_unreachable_switch_case_due_to_integer_analysis_highlighting=warning +resharper_unresolved_assembly_highlighting=warning +resharper_unresolved_include_highlighting=warning +resharper_unsafe_comma_in_object_properties_list_highlighting=warning +resharper_unsupported_required_base_type_highlighting=warning +resharper_unused_anonymous_method_signature_highlighting=warning +resharper_unused_auto_property_accessor_global_highlighting=warning +resharper_unused_auto_property_accessor_local_highlighting=warning +resharper_unused_field_compiler_highlighting=warning +resharper_unused_import_clause_highlighting=warning +resharper_unused_inherited_parameter_highlighting=hint +resharper_unused_label_highlighting=warning +resharper_unused_locals_highlighting=warning +resharper_unused_local_function_compiler_highlighting=warning +resharper_unused_local_function_highlighting=warning +resharper_unused_local_function_parameter_highlighting=warning +resharper_unused_local_function_return_value_highlighting=warning +resharper_unused_local_import_highlighting=warning +resharper_unused_member_global_highlighting=suggestion +resharper_unused_member_hierarchy_global_highlighting=suggestion +resharper_unused_member_hierarchy_local_highlighting=warning +resharper_unused_member_in_super_global_highlighting=suggestion +resharper_unused_member_in_super_local_highlighting=warning +resharper_unused_member_local_highlighting=warning +resharper_unused_method_return_value_global_highlighting=suggestion +resharper_unused_method_return_value_local_highlighting=warning +resharper_unused_parameter_global_highlighting=suggestion +resharper_unused_parameter_highlighting=warning +resharper_unused_parameter_in_partial_method_highlighting=warning +resharper_unused_parameter_local_highlighting=warning +resharper_unused_property_highlighting=warning +resharper_unused_tuple_component_in_return_value_highlighting=warning +resharper_unused_type_global_highlighting=suggestion +resharper_unused_type_local_highlighting=warning +resharper_unused_type_parameter_highlighting=warning +resharper_unused_variable_compiler_highlighting=warning +resharper_unused_variable_highlighting=warning +resharper_usage_of_definitely_unassigned_value_highlighting=warning +resharper_usage_of_possibly_unassigned_value_highlighting=warning +resharper_useless_binary_operation_highlighting=warning +resharper_use_array_creation_expression_1_highlighting=suggestion +resharper_use_array_creation_expression_2_highlighting=suggestion +resharper_use_as_instead_of_type_cast_highlighting=hint +resharper_use_await_using_highlighting=suggestion +resharper_use_cancellation_token_for_i_async_enumerable_highlighting=suggestion +resharper_use_collection_count_property_highlighting=suggestion +resharper_use_deconstruction_highlighting=hint +resharper_use_deconstruction_on_parameter_highlighting=hint +resharper_use_format_specifier_in_format_string_highlighting=suggestion +resharper_use_format_specifier_in_interpolation_highlighting=suggestion +resharper_use_implicitly_typed_variable_evident_highlighting=hint +resharper_use_implicitly_typed_variable_highlighting=none +resharper_use_implicit_by_val_modifier_highlighting=hint +resharper_use_indexed_property_highlighting=suggestion +resharper_use_index_from_end_expression_highlighting=suggestion +resharper_use_is_operator_1_highlighting=suggestion +resharper_use_is_operator_2_highlighting=suggestion +resharper_use_method_any_0_highlighting=suggestion +resharper_use_method_any_1_highlighting=suggestion +resharper_use_method_any_2_highlighting=suggestion +resharper_use_method_any_3_highlighting=suggestion +resharper_use_method_any_4_highlighting=suggestion +resharper_use_method_is_instance_of_type_highlighting=suggestion +resharper_use_nameof_expression_highlighting=suggestion +resharper_use_name_of_instead_of_type_of_highlighting=suggestion +resharper_use_negated_pattern_matching_highlighting=hint +resharper_use_null_propagation_highlighting=suggestion +resharper_use_null_propagation_when_possible_highlighting=none +resharper_use_object_or_collection_initializer_highlighting=suggestion +resharper_use_of_implicit_global_in_function_scope_highlighting=warning +resharper_use_of_possibly_unassigned_property_highlighting=warning +resharper_use_pattern_matching_highlighting=suggestion +resharper_use_string_interpolation_highlighting=suggestion +resharper_use_switch_case_pattern_variable_highlighting=suggestion +resharper_use_verbatim_string_highlighting=hint +resharper_using_of_reserved_word_error_highlighting=error +resharper_using_of_reserved_word_highlighting=warning +resharper_value_parameter_not_used_highlighting=warning +resharper_value_should_have_units_highlighting=error +resharper_variable_can_be_made_const_highlighting=hint +resharper_variable_can_be_made_let_highlighting=hint +resharper_variable_can_be_moved_to_inner_block_highlighting=hint +resharper_variable_hides_outer_variable_highlighting=warning +resharper_variable_used_before_declared_highlighting=warning +resharper_variable_used_in_inner_scope_before_declared_highlighting=warning +resharper_variable_used_out_of_scope_highlighting=warning +resharper_vb_check_for_reference_equality_instead_1_highlighting=suggestion +resharper_vb_check_for_reference_equality_instead_2_highlighting=suggestion +resharper_vb_possible_mistaken_argument_highlighting=warning +resharper_vb_possible_mistaken_call_to_get_type_1_highlighting=warning +resharper_vb_possible_mistaken_call_to_get_type_2_highlighting=warning +resharper_vb_remove_to_list_1_highlighting=suggestion +resharper_vb_remove_to_list_2_highlighting=suggestion +resharper_vb_replace_with_first_or_default_highlighting=suggestion +resharper_vb_replace_with_last_or_default_highlighting=suggestion +resharper_vb_replace_with_of_type_1_highlighting=suggestion +resharper_vb_replace_with_of_type_2_highlighting=suggestion +resharper_vb_replace_with_of_type_any_1_highlighting=suggestion +resharper_vb_replace_with_of_type_any_2_highlighting=suggestion +resharper_vb_replace_with_of_type_count_1_highlighting=suggestion +resharper_vb_replace_with_of_type_count_2_highlighting=suggestion +resharper_vb_replace_with_of_type_first_1_highlighting=suggestion +resharper_vb_replace_with_of_type_first_2_highlighting=suggestion +resharper_vb_replace_with_of_type_first_or_default_1_highlighting=suggestion +resharper_vb_replace_with_of_type_first_or_default_2_highlighting=suggestion +resharper_vb_replace_with_of_type_last_1_highlighting=suggestion +resharper_vb_replace_with_of_type_last_2_highlighting=suggestion +resharper_vb_replace_with_of_type_last_or_default_1_highlighting=suggestion +resharper_vb_replace_with_of_type_last_or_default_2_highlighting=suggestion +resharper_vb_replace_with_of_type_single_1_highlighting=suggestion +resharper_vb_replace_with_of_type_single_2_highlighting=suggestion +resharper_vb_replace_with_of_type_single_or_default_1_highlighting=suggestion +resharper_vb_replace_with_of_type_single_or_default_2_highlighting=suggestion +resharper_vb_replace_with_of_type_where_highlighting=suggestion +resharper_vb_replace_with_single_assignment_1_highlighting=suggestion +resharper_vb_replace_with_single_assignment_2_highlighting=suggestion +resharper_vb_replace_with_single_call_to_any_highlighting=suggestion +resharper_vb_replace_with_single_call_to_count_highlighting=suggestion +resharper_vb_replace_with_single_call_to_first_highlighting=suggestion +resharper_vb_replace_with_single_call_to_first_or_default_highlighting=suggestion +resharper_vb_replace_with_single_call_to_last_highlighting=suggestion +resharper_vb_replace_with_single_call_to_last_or_default_highlighting=suggestion +resharper_vb_replace_with_single_call_to_single_highlighting=suggestion +resharper_vb_replace_with_single_call_to_single_or_default_highlighting=suggestion +resharper_vb_replace_with_single_or_default_highlighting=suggestion +resharper_vb_simplify_linq_expression_10_highlighting=hint +resharper_vb_simplify_linq_expression_1_highlighting=suggestion +resharper_vb_simplify_linq_expression_2_highlighting=suggestion +resharper_vb_simplify_linq_expression_3_highlighting=suggestion +resharper_vb_simplify_linq_expression_4_highlighting=suggestion +resharper_vb_simplify_linq_expression_5_highlighting=suggestion +resharper_vb_simplify_linq_expression_6_highlighting=suggestion +resharper_vb_simplify_linq_expression_7_highlighting=hint +resharper_vb_simplify_linq_expression_8_highlighting=hint +resharper_vb_simplify_linq_expression_9_highlighting=hint +resharper_vb_string_compare_is_culture_specific_1_highlighting=warning +resharper_vb_string_compare_is_culture_specific_2_highlighting=warning +resharper_vb_string_compare_is_culture_specific_3_highlighting=warning +resharper_vb_string_compare_is_culture_specific_4_highlighting=warning +resharper_vb_string_compare_is_culture_specific_5_highlighting=warning +resharper_vb_string_compare_is_culture_specific_6_highlighting=warning +resharper_vb_string_compare_to_is_culture_specific_highlighting=warning +resharper_vb_string_ends_with_is_culture_specific_highlighting=none +resharper_vb_string_index_of_is_culture_specific_1_highlighting=warning +resharper_vb_string_index_of_is_culture_specific_2_highlighting=warning +resharper_vb_string_index_of_is_culture_specific_3_highlighting=warning +resharper_vb_string_last_index_of_is_culture_specific_1_highlighting=warning +resharper_vb_string_last_index_of_is_culture_specific_2_highlighting=warning +resharper_vb_string_last_index_of_is_culture_specific_3_highlighting=warning +resharper_vb_string_starts_with_is_culture_specific_highlighting=none +resharper_vb_unreachable_code_highlighting=warning +resharper_vb_use_array_creation_expression_1_highlighting=suggestion +resharper_vb_use_array_creation_expression_2_highlighting=suggestion +resharper_vb_use_first_instead_highlighting=warning +resharper_vb_use_method_any_1_highlighting=suggestion +resharper_vb_use_method_any_2_highlighting=suggestion +resharper_vb_use_method_any_3_highlighting=suggestion +resharper_vb_use_method_any_4_highlighting=suggestion +resharper_vb_use_method_any_5_highlighting=suggestion +resharper_vb_use_method_is_instance_of_type_highlighting=suggestion +resharper_vb_use_type_of_is_operator_1_highlighting=suggestion +resharper_vb_use_type_of_is_operator_2_highlighting=suggestion +resharper_vb_warnings_bc400005_highlighting=warning +resharper_vb_warnings_bc40000_highlighting=warning +resharper_vb_warnings_bc40008_highlighting=warning +resharper_vb_warnings_bc40056_highlighting=warning +resharper_vb_warnings_bc42016_highlighting=warning +resharper_vb_warnings_bc42025_highlighting=warning +resharper_vb_warnings_bc42104_highlighting=warning +resharper_vb_warnings_bc42105_bc42106_bc42107_highlighting=warning +resharper_vb_warnings_bc42304_highlighting=warning +resharper_vb_warnings_bc42309_highlighting=warning +resharper_vb_warnings_bc42322_highlighting=warning +resharper_vb_warnings_bc42349_highlighting=warning +resharper_vb_warnings_bc42353_bc42354_bc42355_highlighting=warning +resharper_vb_warnings_bc42356_highlighting=warning +resharper_vb_warnings_bc42358_highlighting=warning +resharper_vb_warnings_wme006_highlighting=warning +resharper_virtual_member_call_in_constructor_highlighting=warning +resharper_virtual_member_never_overridden_global_highlighting=suggestion +resharper_virtual_member_never_overridden_local_highlighting=suggestion +resharper_void_method_with_must_use_return_value_attribute_highlighting=warning +resharper_web_config_module_not_resolved_highlighting=warning +resharper_web_config_module_qualification_resolve_highlighting=warning +resharper_web_config_redundant_add_namespace_tag_highlighting=warning +resharper_web_config_redundant_location_tag_highlighting=warning +resharper_web_config_tag_prefix_redundand_highlighting=warning +resharper_web_config_type_not_resolved_highlighting=warning +resharper_web_config_unused_add_tag_highlighting=warning +resharper_web_config_unused_element_due_to_config_source_attribute_highlighting=warning +resharper_web_config_unused_remove_or_clear_tag_highlighting=warning +resharper_web_config_web_config_path_warning_highlighting=warning +resharper_web_config_wrong_module_highlighting=warning +resharper_web_ignored_path_highlighting=none +resharper_web_mapped_path_highlighting=hint +resharper_with_statement_using_error_highlighting=error +resharper_wrong_expression_statement_highlighting=warning +resharper_wrong_indent_size_highlighting=none +resharper_wrong_metadata_use_highlighting=none +resharper_wrong_public_modifier_specification_highlighting=hint +resharper_wrong_require_relative_path_highlighting=hint +resharper_xaml_binding_without_context_not_resolved_highlighting=hint +resharper_xaml_binding_with_context_not_resolved_highlighting=warning +resharper_xaml_constructor_warning_highlighting=warning +resharper_xaml_dependency_property_resolve_error_highlighting=warning +resharper_xaml_duplicate_style_setter_highlighting=warning +resharper_xaml_dynamic_resource_error_highlighting=error +resharper_xaml_element_name_reference_not_resolved_highlighting=error +resharper_xaml_ignored_path_highlighting_highlighting=none +resharper_xaml_index_out_of_grid_definition_highlighting=warning +resharper_xaml_invalid_member_type_highlighting=error +resharper_xaml_invalid_resource_target_type_highlighting=error +resharper_xaml_invalid_resource_type_highlighting=error +resharper_xaml_invalid_type_highlighting=error +resharper_xaml_language_level_highlighting=error +resharper_xaml_mapped_path_highlighting_highlighting=hint +resharper_xaml_missing_grid_index_highlighting=warning +resharper_xaml_path_error_highlighting=warning +resharper_xaml_redundant_attached_property_highlighting=warning +resharper_xaml_redundant_collection_property_highlighting=warning +resharper_xaml_redundant_freeze_attribute_highlighting=warning +resharper_xaml_redundant_grid_definitions_highlighting=warning +resharper_xaml_redundant_grid_span_highlighting=warning +resharper_xaml_redundant_modifiers_attribute_highlighting=warning +resharper_xaml_redundant_namespace_alias_highlighting=warning +resharper_xaml_redundant_name_attribute_highlighting=warning +resharper_xaml_redundant_property_type_qualifier_highlighting=warning +resharper_xaml_redundant_resource_highlighting=warning +resharper_xaml_redundant_styled_value_highlighting=warning +resharper_xaml_redundant_xamarin_forms_class_declaration_highlighting=warning +resharper_xaml_routed_event_resolve_error_highlighting=warning +resharper_xaml_static_resource_not_resolved_highlighting=warning +resharper_xaml_style_invalid_target_type_highlighting=error +resharper_xaml_unexpected_text_token_highlighting=error +resharper_xaml_xaml_duplicate_device_family_type_view_highlighting_highlighting=error +resharper_xaml_xaml_mismatched_device_family_view_clr_name_highlighting_highlighting=warning +resharper_xaml_xaml_relative_source_default_mode_warning_highlighting_highlighting=warning +resharper_xaml_xaml_unknown_device_family_type_highlighting_highlighting=warning +resharper_xaml_xaml_xamarin_forms_data_type_and_binding_context_type_mismatched_highlighting_highlighting=warning +resharper_xaml_x_key_attribute_disallowed_highlighting=error +resharper_xml_doc_comment_syntax_problem_highlighting=warning +resharper_xunit_xunit_test_with_console_output_highlighting=warning +resharper_x_unit1000_highlighting=error +resharper_x_unit1001_highlighting=error +resharper_x_unit1002_highlighting=error +resharper_x_unit1003_highlighting=error +resharper_x_unit1004_highlighting=hint +resharper_x_unit1005_highlighting=warning +resharper_x_unit1006_highlighting=warning +resharper_x_unit1007_highlighting=error +resharper_x_unit1008_highlighting=warning +resharper_x_unit1009_highlighting=error +resharper_x_unit1010_highlighting=error +resharper_x_unit1011_highlighting=error +resharper_x_unit1012_highlighting=warning +resharper_x_unit1013_highlighting=warning +resharper_x_unit1014_highlighting=warning +resharper_x_unit1015_highlighting=error +resharper_x_unit1016_highlighting=error +resharper_x_unit1017_highlighting=error +resharper_x_unit1018_highlighting=error +resharper_x_unit1019_highlighting=error +resharper_x_unit1020_highlighting=error +resharper_x_unit1021_highlighting=warning +resharper_x_unit1022_highlighting=error +resharper_x_unit1023_highlighting=error +resharper_x_unit1024_highlighting=error +resharper_x_unit1025_highlighting=warning +resharper_x_unit1026_highlighting=warning +resharper_x_unit2000_highlighting=warning +resharper_x_unit2001_highlighting=none +resharper_x_unit2002_highlighting=warning +resharper_x_unit2003_highlighting=warning +resharper_x_unit2004_highlighting=warning +resharper_x_unit2005_highlighting=warning +resharper_x_unit2006_highlighting=warning +resharper_x_unit2007_highlighting=warning +resharper_x_unit2008_highlighting=warning +resharper_x_unit2009_highlighting=warning +resharper_x_unit2010_highlighting=warning +resharper_x_unit2011_highlighting=warning +resharper_x_unit2012_highlighting=warning +resharper_x_unit2013_highlighting=warning +resharper_x_unit2014_highlighting=error +resharper_x_unit2015_highlighting=warning +resharper_x_unit2016_highlighting=error +resharper_x_unit2017_highlighting=warning +resharper_x_unit2018_highlighting=warning +resharper_x_unit2019_highlighting=none +resharper_x_unit3000_highlighting=error +resharper_x_unit3001_highlighting=error + +######################### +# File Extension Settings +######################### + +# Visual Studio Solution Files +[*.sln] +indent_style=tab + +# Visual Studio XML Project Files +[*.{csproj,vbproj,vcxproj,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}] +indent_size=2 + +# YAML Files +[*.{yml,yaml}] +indent_size=2 + +# Markdown Files +[*.md] +trim_trailing_whitespace=false + +# Web Files +[*.{htm,html,js,ts,tsx,css,sass,scss,less,svg,vue}] +indent_size=2 +insert_final_newline=true + +# Batch Files +[*.{cmd,bat}] + +# Bash Files +[*.sh] +end_of_line=lf + +########################### +# .NET Language Conventions +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language-conventions +########################### + +# .NET Code Style Settings +[*.{cs,csx,cake,vb}] +# "this." and "Me." qualifiers +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#this_and_me +dotnet_style_qualification_for_field=false:warning +dotnet_style_qualification_for_property=false:warning +dotnet_style_qualification_for_method=false:warning +dotnet_style_qualification_for_event=false:warning +# Language keywords instead of framework type names for type references +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language_keywords +dotnet_style_predefined_type_for_locals_parameters_members=true:warning +dotnet_style_predefined_type_for_member_access=true:warning +# Modifier preferences +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#normalize_modifiers +dotnet_style_require_accessibility_modifiers=always:warning +csharp_preferred_modifier_order=public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async +visual_basic_preferred_modifier_order=Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async +dotnet_style_readonly_field=true:warning +# Parentheses preferences +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#parentheses +dotnet_style_parentheses_in_arithmetic_binary_operators=always_for_clarity:warning +dotnet_style_parentheses_in_relational_binary_operators=always_for_clarity:warning +dotnet_style_parentheses_in_other_binary_operators=always_for_clarity:warning +dotnet_style_parentheses_in_other_operators=never_if_unnecessary:suggestion +# Expression-level preferences +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_level +dotnet_style_object_initializer=true:warning +dotnet_style_collection_initializer=true:warning +dotnet_style_explicit_tuple_names=true:warning +dotnet_style_prefer_inferred_tuple_names=true:warning +dotnet_style_prefer_inferred_anonymous_type_member_names=true:warning +dotnet_style_prefer_auto_properties=true:warning +dotnet_style_prefer_is_null_check_over_reference_equality_method=true:warning +dotnet_style_prefer_conditional_expression_over_assignment=false:suggestion +dotnet_style_prefer_conditional_expression_over_return=false:suggestion +# Null-checking preferences +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#null_checking +dotnet_style_coalesce_expression=true:warning +dotnet_style_null_propagation=true:warning + +# C# Code Style Settings +[*.{cs,csx,cake}] +# Implicit and explicit types +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#implicit-and-explicit-types +csharp_style_var_for_built_in_types=true:warning +csharp_style_var_when_type_is_apparent=true:warning +csharp_style_var_elsewhere=true:warning +# Expression-bodied members +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_bodied_members +csharp_style_expression_bodied_methods=false:warning +csharp_style_expression_bodied_constructors=false:warning +csharp_style_expression_bodied_operators=false:warning +csharp_style_expression_bodied_properties=false:warning +csharp_style_expression_bodied_indexers=false:warning +csharp_style_expression_bodied_accessors=false:warning +# Pattern matching +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#pattern_matching +csharp_style_pattern_matching_over_is_with_cast_check=true:warning +csharp_style_pattern_matching_over_as_with_null_check=true:warning +# Inlined variable declarations +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#inlined_variable_declarations +csharp_style_inlined_variable_declaration=true:warning +# Expression-level preferences +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_level_csharp +csharp_prefer_simple_default_expression=true:warning +csharp_style_deconstructed_variable_declaration=true:warning +csharp_style_pattern_local_over_anonymous_function=true:warning +# "Null" checking preferences +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#null_checking_csharp +csharp_style_throw_expression=true:warning +csharp_style_conditional_delegate_call=true:warning +# Code block preferences +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#code_block +csharp_prefer_braces=true:warning + +############################# +# .NET Formatting Conventions +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions +############################# + +# Organize usings +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#usings +dotnet_sort_system_directives_first=true +# C# formatting settings +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#c-formatting-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 options +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#indent +csharp_indent_case_contents=true +csharp_indent_switch_labels=true +csharp_indent_labels=no_change +# Spacing options +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#spacing +csharp_space_after_cast=false +csharp_space_after_keywords_in_control_flow_statements=true +csharp_space_between_method_declaration_parameter_list_parentheses=false +csharp_space_between_method_call_parameter_list_parentheses=false +csharp_space_between_parentheses=expressions +csharp_space_before_colon_in_inheritance_clause=false +csharp_space_after_colon_in_inheritance_clause=true +csharp_space_around_binary_operators=before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses=false +csharp_space_between_method_call_name_and_opening_parenthesis=false +csharp_space_between_method_call_empty_parameter_list_parentheses=false +# Wrapping options +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#wrapping +csharp_preserve_single_line_statements=false +csharp_preserve_single_line_blocks=true +# More Indentation options (Undocumented) +csharp_indent_block_contents=true +csharp_indent_braces=false +# Spacing Options (Undocumented) +csharp_space_after_comma=true +csharp_space_after_dot=false +csharp_space_after_semicolon_in_for_statement=true +csharp_space_around_declaration_statements=do_not_ignore +csharp_space_before_comma=false +csharp_space_before_dot=false +csharp_space_before_semicolon_in_for_statement=false +csharp_space_before_open_square_brackets=false +csharp_space_between_empty_square_brackets=false +csharp_space_between_method_declaration_name_and_open_parenthesis=false +csharp_space_between_square_brackets=false + +######################### +# .NET Naming conventions +# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions +######################### + +[*.{cs,csx,cake,vb}] +# Naming Symbols +# constant_fields - Define constant fields +dotnet_naming_symbols.constant_fields.applicable_kinds=field +dotnet_naming_symbols.constant_fields.required_modifiers=const +# non_private_readonly_fields - Define public, internal and protected readonly fields +dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities=public, internal, protected +dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds=field +dotnet_naming_symbols.non_private_readonly_fields.required_modifiers=readonly +# static_readonly_fields - Define static and readonly fields +dotnet_naming_symbols.static_readonly_fields.applicable_kinds=field +dotnet_naming_symbols.static_readonly_fields.required_modifiers=static, readonly +# private_readonly_fields - Define private readonly fields +dotnet_naming_symbols.private_readonly_fields.applicable_accessibilities=private +dotnet_naming_symbols.private_readonly_fields.applicable_kinds=field +dotnet_naming_symbols.private_readonly_fields.required_modifiers=readonly +# public_internal_fields - Define public and internal fields +dotnet_naming_symbols.public_internal_fields.applicable_accessibilities=public, internal +dotnet_naming_symbols.public_internal_fields.applicable_kinds=field +# private_protected_fields - Define private and protected fields +dotnet_naming_symbols.private_protected_fields.applicable_accessibilities=private, protected +dotnet_naming_symbols.private_protected_fields.applicable_kinds=field +# public_symbols - Define any public symbol +dotnet_naming_symbols.public_symbols.applicable_accessibilities=public, internal, protected, protected_internal +dotnet_naming_symbols.public_symbols.applicable_kinds=method, property, event, delegate +# parameters - Defines any parameter +dotnet_naming_symbols.parameters.applicable_kinds=parameter +# non_interface_types - Defines class, struct, enum and delegate types +dotnet_naming_symbols.non_interface_types.applicable_kinds=class, struct, enum, delegate +# interface_types - Defines interfaces +dotnet_naming_symbols.interface_types.applicable_kinds=interface + +# Naming Styles +# camel_case - Define the camelCase style +dotnet_naming_style.camel_case.capitalization=camel_case +# pascal_case - Define the Pascal_case style +dotnet_naming_style.pascal_case.capitalization=pascal_case +# first_upper - The first character must start with an upper-case character +dotnet_naming_style.first_upper.capitalization=first_word_upper +# prefix_interface_interface_with_i - Interfaces must be PascalCase and the first character of an interface must be an 'I' +dotnet_naming_style.prefix_interface_interface_with_i.capitalization=pascal_case +dotnet_naming_style.prefix_interface_interface_with_i.required_prefix=I + +# Naming Rules +# Constant fields must be PascalCase +dotnet_naming_rule.constant_fields_must_be_pascal_case.severity=warning +dotnet_naming_rule.constant_fields_must_be_pascal_case.symbols=constant_fields +dotnet_naming_rule.constant_fields_must_be_pascal_case.style=pascal_case +# Public, internal and protected readonly fields must be PascalCase +dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.severity=warning +dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.symbols=non_private_readonly_fields +dotnet_naming_rule.non_private_readonly_fields_must_be_pascal_case.style=pascal_case +# Static readonly fields must be PascalCase +dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.severity=warning +dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.symbols=static_readonly_fields +dotnet_naming_rule.static_readonly_fields_must_be_pascal_case.style=pascal_case +# Private readonly fields must be camelCase +dotnet_naming_rule.private_readonly_fields_must_be_camel_case.severity=warning +dotnet_naming_rule.private_readonly_fields_must_be_camel_case.symbols=private_readonly_fields +dotnet_naming_rule.private_readonly_fields_must_be_camel_case.style=camel_case +# Public and internal fields must be PascalCase +dotnet_naming_rule.public_internal_fields_must_be_pascal_case.severity=warning +dotnet_naming_rule.public_internal_fields_must_be_pascal_case.symbols=public_internal_fields +dotnet_naming_rule.public_internal_fields_must_be_pascal_case.style=pascal_case +# Private and protected fields must be camelCase +dotnet_naming_rule.private_protected_fields_must_be_camel_case.severity=warning +dotnet_naming_rule.private_protected_fields_must_be_camel_case.symbols=private_protected_fields +dotnet_naming_rule.private_protected_fields_must_be_camel_case.style=camel_case +# Public members must be capitalized +dotnet_naming_rule.public_members_must_be_capitalized.severity=warning +dotnet_naming_rule.public_members_must_be_capitalized.symbols=public_symbols +dotnet_naming_rule.public_members_must_be_capitalized.style=first_upper +# Parameters must be camelCase +dotnet_naming_rule.parameters_must_be_camel_case.severity=warning +dotnet_naming_rule.parameters_must_be_camel_case.symbols=parameters +dotnet_naming_rule.parameters_must_be_camel_case.style=camel_case +# Class, struct, enum and delegates must be PascalCase +dotnet_naming_rule.non_interface_types_must_be_pascal_case.severity=warning +dotnet_naming_rule.non_interface_types_must_be_pascal_case.symbols=non_interface_types +dotnet_naming_rule.non_interface_types_must_be_pascal_case.style=pascal_case +# Interfaces must be PascalCase and start with an 'I' +dotnet_naming_rule.interface_types_must_be_prefixed_with_i.severity=warning +dotnet_naming_rule.interface_types_must_be_prefixed_with_i.symbols=interface_types +dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style=prefix_interface_interface_with_i + +[*.{appxmanifest,asax,ascx,aspx,build,cs,cshtml,dtd,master,nuspec,razor,resw,resx,skin,vb,xaml,xamlx,xoml,xsd}] +indent_style=space +indent_size=4 +tab_width=4 From 2f245db3ce2ac9ffd0647d6c420adeb48a9d112b Mon Sep 17 00:00:00 2001 From: mif Date: Tue, 19 May 2020 10:11:14 +0500 Subject: [PATCH 3/6] rename --- src/LazyCoder/CSharp/CsField.cs | 2 +- src/LazyCoder/CSharp/{CsTypeMember.cs => CsMember.cs} | 2 +- src/LazyCoder/CSharp/CsMethod.cs | 2 +- src/LazyCoder/CSharp/CsProperty.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/LazyCoder/CSharp/{CsTypeMember.cs => CsMember.cs} (89%) diff --git a/src/LazyCoder/CSharp/CsField.cs b/src/LazyCoder/CSharp/CsField.cs index edb157b..5232d0a 100644 --- a/src/LazyCoder/CSharp/CsField.cs +++ b/src/LazyCoder/CSharp/CsField.cs @@ -1,6 +1,6 @@ namespace LazyCoder.CSharp { - public class CsField: CsTypeMember + public class CsField: CsMember { public CsType Type { get; set; } public CsLiteral? Value { get; set; } diff --git a/src/LazyCoder/CSharp/CsTypeMember.cs b/src/LazyCoder/CSharp/CsMember.cs similarity index 89% rename from src/LazyCoder/CSharp/CsTypeMember.cs rename to src/LazyCoder/CSharp/CsMember.cs index ed17d38..404120a 100644 --- a/src/LazyCoder/CSharp/CsTypeMember.cs +++ b/src/LazyCoder/CSharp/CsMember.cs @@ -2,7 +2,7 @@ namespace LazyCoder.CSharp { - public abstract class CsTypeMember + public abstract class CsMember { public string Name { get; set; } public bool IsStatic { get; set; } diff --git a/src/LazyCoder/CSharp/CsMethod.cs b/src/LazyCoder/CSharp/CsMethod.cs index 7f86556..b3a751a 100644 --- a/src/LazyCoder/CSharp/CsMethod.cs +++ b/src/LazyCoder/CSharp/CsMethod.cs @@ -3,7 +3,7 @@ namespace LazyCoder.CSharp { - public class CsMethod: CsTypeMember + public class CsMethod: CsMember { public CsType ReturnType { get; set; } public CsMethodParameter[] Parameters { get; set; } = Array.Empty(); diff --git a/src/LazyCoder/CSharp/CsProperty.cs b/src/LazyCoder/CSharp/CsProperty.cs index 6363329..b8eb270 100644 --- a/src/LazyCoder/CSharp/CsProperty.cs +++ b/src/LazyCoder/CSharp/CsProperty.cs @@ -1,6 +1,6 @@ namespace LazyCoder.CSharp { - public class CsProperty: CsTypeMember + public class CsProperty: CsMember { public CsType Type { get; set; } } From 9e46253931b57616b645c891851ceeda527dacef Mon Sep 17 00:00:00 2001 From: mif Date: Tue, 19 May 2020 10:22:35 +0500 Subject: [PATCH 4/6] make hierarchy closer to roslyn --- src/LazyCoder/CSharp/CsBaseTypeDeclaration.cs | 16 ++++++++++ src/LazyCoder/CSharp/CsClass.cs | 26 +++++++--------- src/LazyCoder/CSharp/CsDeclaration.cs | 15 +++++++++ src/LazyCoder/CSharp/CsEnum.cs | 31 +++++++++++-------- src/LazyCoder/CSharp/CsInterface.cs | 8 ++--- src/LazyCoder/CSharp/CsStruct.cs | 7 ++--- src/LazyCoder/CSharp/CsTypeDeclaration.cs | 15 +++++++++ 7 files changed, 79 insertions(+), 39 deletions(-) create mode 100644 src/LazyCoder/CSharp/CsBaseTypeDeclaration.cs create mode 100644 src/LazyCoder/CSharp/CsTypeDeclaration.cs diff --git a/src/LazyCoder/CSharp/CsBaseTypeDeclaration.cs b/src/LazyCoder/CSharp/CsBaseTypeDeclaration.cs new file mode 100644 index 0000000..9d982c7 --- /dev/null +++ b/src/LazyCoder/CSharp/CsBaseTypeDeclaration.cs @@ -0,0 +1,16 @@ +using System; +using Microsoft.CodeAnalysis; + +namespace LazyCoder.CSharp +{ + public abstract class CsBaseTypeDeclaration: CsDeclaration + { + protected CsBaseTypeDeclaration(Type type): base(type) + { + } + + protected CsBaseTypeDeclaration(ITypeSymbol type): base(type) + { + } + } +} \ No newline at end of file diff --git a/src/LazyCoder/CSharp/CsClass.cs b/src/LazyCoder/CSharp/CsClass.cs index e6e0af1..c151118 100644 --- a/src/LazyCoder/CSharp/CsClass.cs +++ b/src/LazyCoder/CSharp/CsClass.cs @@ -1,15 +1,11 @@ -using System; -using System.Collections.Generic; - -namespace LazyCoder.CSharp -{ - public class CsClass: CsDeclaration - { - public CsClass(Type type): base(type) - { - } - - public CsTypeMember[] Members { get; set; } = Array.Empty(); - public string[] TypeParameters { get; set; } = Array.Empty(); - } -} +using System; + +namespace LazyCoder.CSharp +{ + public class CsClass: CsTypeDeclaration + { + public CsClass(Type type): base(type) + { + } + } +} diff --git a/src/LazyCoder/CSharp/CsDeclaration.cs b/src/LazyCoder/CSharp/CsDeclaration.cs index 5e7666f..d0a6764 100644 --- a/src/LazyCoder/CSharp/CsDeclaration.cs +++ b/src/LazyCoder/CSharp/CsDeclaration.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using Microsoft.CodeAnalysis; namespace LazyCoder.CSharp { @@ -19,6 +20,20 @@ protected CsDeclaration(Type type) .ToArray(); } + protected CsDeclaration(ITypeSymbol type) + { + Name = type.Name; + Namespace = type.ContainingNamespace.Name; + CsType = new CsType(type); + // Attributes = type.CustomAttributes + // .Select(x => new CsAttribute + // { + // Name = x.AttributeType.Name, + // OriginalType = x.AttributeType + // }) + // .ToArray(); + } + public string Name { get; } public string Namespace { get; } public CsAttribute[] Attributes { get; } = Array.Empty(); diff --git a/src/LazyCoder/CSharp/CsEnum.cs b/src/LazyCoder/CSharp/CsEnum.cs index ea371c9..34712e9 100644 --- a/src/LazyCoder/CSharp/CsEnum.cs +++ b/src/LazyCoder/CSharp/CsEnum.cs @@ -1,13 +1,18 @@ -using System; - -namespace LazyCoder.CSharp -{ - public class CsEnum: CsDeclaration - { - public CsEnum(Type type): base(type) - { - } - - public CsEnumValue[] Values { get; set; } = Array.Empty(); - } -} +using System; +using Microsoft.CodeAnalysis; + +namespace LazyCoder.CSharp +{ + public class CsEnum: CsBaseTypeDeclaration + { + public CsEnum(Type type): base(type) + { + } + + public CsEnum(ITypeSymbol typeSymbol): base(typeSymbol) + { + } + + public CsEnumValue[] Values { get; set; } = Array.Empty(); + } +} \ No newline at end of file diff --git a/src/LazyCoder/CSharp/CsInterface.cs b/src/LazyCoder/CSharp/CsInterface.cs index 7c0582c..39b8b4f 100644 --- a/src/LazyCoder/CSharp/CsInterface.cs +++ b/src/LazyCoder/CSharp/CsInterface.cs @@ -1,15 +1,11 @@ using System; -using System.Collections.Generic; namespace LazyCoder.CSharp { - public class CsInterface: CsDeclaration + public class CsInterface: CsTypeDeclaration { public CsInterface(Type type): base(type) { } - - public CsTypeMember[] Members { get; set; } = Array.Empty(); - public string[] TypeParameters { get; set; } = Array.Empty(); } -} +} \ No newline at end of file diff --git a/src/LazyCoder/CSharp/CsStruct.cs b/src/LazyCoder/CSharp/CsStruct.cs index dd3fc61..7a78757 100644 --- a/src/LazyCoder/CSharp/CsStruct.cs +++ b/src/LazyCoder/CSharp/CsStruct.cs @@ -2,13 +2,10 @@ namespace LazyCoder.CSharp { - public class CsStruct: CsDeclaration + public class CsStruct: CsTypeDeclaration { public CsStruct(Type type): base(type) { } - - public CsTypeMember[] Members { get; set; } = Array.Empty(); - public string[] TypeParameters { get; set; } = Array.Empty(); } -} +} \ No newline at end of file diff --git a/src/LazyCoder/CSharp/CsTypeDeclaration.cs b/src/LazyCoder/CSharp/CsTypeDeclaration.cs new file mode 100644 index 0000000..7dcda90 --- /dev/null +++ b/src/LazyCoder/CSharp/CsTypeDeclaration.cs @@ -0,0 +1,15 @@ +using System; + +namespace LazyCoder.CSharp +{ + public abstract class CsTypeDeclaration: CsBaseTypeDeclaration + { + protected CsTypeDeclaration(Type type) + : base(type) + { + } + + public string[] TypeParameters { get; set; } = Array.Empty(); + public CsMember[] Members { get; set; } = Array.Empty(); + } +} \ No newline at end of file From 3495a69f94db878a96db36dc5204ed8c83ccfb8e Mon Sep 17 00:00:00 2001 From: mif Date: Tue, 19 May 2020 10:24:58 +0500 Subject: [PATCH 5/6] build fix --- src/LazyCoder/BaseCoder.cs | 2 +- src/LazyCoder/CSharp/CsDeclaration.cs | 2 +- src/LazyCoder/CsDeclarationFactory.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/LazyCoder/BaseCoder.cs b/src/LazyCoder/BaseCoder.cs index e124643..8e2fb42 100644 --- a/src/LazyCoder/BaseCoder.cs +++ b/src/LazyCoder/BaseCoder.cs @@ -127,7 +127,7 @@ protected virtual TsInterface Rewrite(CsStruct csStruct) }; } - protected virtual TsTypeMember? Rewrite(CsTypeMember csTypeMember) + protected virtual TsTypeMember? Rewrite(CsMember csTypeMember) { switch (csTypeMember) { diff --git a/src/LazyCoder/CSharp/CsDeclaration.cs b/src/LazyCoder/CSharp/CsDeclaration.cs index d0a6764..947b3ba 100644 --- a/src/LazyCoder/CSharp/CsDeclaration.cs +++ b/src/LazyCoder/CSharp/CsDeclaration.cs @@ -24,7 +24,7 @@ protected CsDeclaration(ITypeSymbol type) { Name = type.Name; Namespace = type.ContainingNamespace.Name; - CsType = new CsType(type); + // CsType = new CsType(type); // Attributes = type.CustomAttributes // .Select(x => new CsAttribute // { diff --git a/src/LazyCoder/CsDeclarationFactory.cs b/src/LazyCoder/CsDeclarationFactory.cs index 0b8098c..0aea141 100644 --- a/src/LazyCoder/CsDeclarationFactory.cs +++ b/src/LazyCoder/CsDeclarationFactory.cs @@ -107,7 +107,7 @@ public static CsDeclaration Create(Type type) return null; } - private static CsTypeMember Create(MemberInfo memberInfo) + private static CsMember Create(MemberInfo memberInfo) { switch (memberInfo) { @@ -126,7 +126,7 @@ private static CsTypeMember Create(MemberInfo memberInfo) } } - private static CsTypeMember Create(FieldInfo fieldInfo) + private static CsMember Create(FieldInfo fieldInfo) { CsLiteral? GetLiteral(Type fieldType) { From c1faa74a6cb5aa73097510617aef30295510bbe1 Mon Sep 17 00:00:00 2001 From: mif Date: Sat, 6 Jun 2020 15:04:20 +0500 Subject: [PATCH 6/6] wip --- src/LazyCoder/CSharp/CsAccessModifier.cs | 22 +- src/LazyCoder/CSharp/CsAttribute.cs | 2 + src/LazyCoder/CSharp/CsClass.cs | 8 +- src/LazyCoder/CSharp/CsDeclaration.cs | 18 +- src/LazyCoder/CSharp/CsType.cs | 165 +++++++------ src/LazyCoder/CSharp/CsTypeDeclaration.cs | 6 + src/LazyCoder/Converter2.cs | 231 ++++++++++++++++++ src/LazyCoder/CsDeclarationFactory.cs | 1 + src/LazyCoder/CsDeclarationFactory2.cs | 32 +++ src/LazyCoder/Helpers.cs | 10 +- src/LazyCoder/LazyCoder.csproj | 7 + src/LazyCoder/Walkers/BaseWalker.cs | 22 ++ src/LazyCoder/Walkers/ClassWalker.cs | 66 +++++ src/LazyCoder/Walkers/EnumWalker.cs | 39 +++ src/LazyCoder/Walkers/TheWalker.cs | 30 +++ .../Simple.cs => CustomCoder/CustomCoder.cs} | 16 +- .../{Simple => CustomCoder}/FirstClass.ts | 0 .../{Simple => CustomCoder}/SecondClass.ts | 0 tests/LazyCoder.Tests/Samples/Simple.cs | 58 +++++ .../WalkerTests/ClassWalkerTest.cs | 68 ++++++ .../WalkerTests/EnumWalkerTest.cs | 86 +++++++ 21 files changed, 788 insertions(+), 99 deletions(-) create mode 100644 src/LazyCoder/Converter2.cs create mode 100644 src/LazyCoder/CsDeclarationFactory2.cs create mode 100644 src/LazyCoder/Walkers/BaseWalker.cs create mode 100644 src/LazyCoder/Walkers/ClassWalker.cs create mode 100644 src/LazyCoder/Walkers/EnumWalker.cs create mode 100644 src/LazyCoder/Walkers/TheWalker.cs rename tests/LazyCoder.Tests/Samples/{Simple/Simple.cs => CustomCoder/CustomCoder.cs} (88%) rename tests/LazyCoder.Tests/Samples/{Simple => CustomCoder}/FirstClass.ts (100%) rename tests/LazyCoder.Tests/Samples/{Simple => CustomCoder}/SecondClass.ts (100%) create mode 100644 tests/LazyCoder.Tests/Samples/Simple.cs create mode 100644 tests/LazyCoder.Tests/WalkerTests/ClassWalkerTest.cs create mode 100644 tests/LazyCoder.Tests/WalkerTests/EnumWalkerTest.cs diff --git a/src/LazyCoder/CSharp/CsAccessModifier.cs b/src/LazyCoder/CSharp/CsAccessModifier.cs index f65496b..9bd630a 100644 --- a/src/LazyCoder/CSharp/CsAccessModifier.cs +++ b/src/LazyCoder/CSharp/CsAccessModifier.cs @@ -1,10 +1,12 @@ -namespace LazyCoder.CSharp -{ - public enum CsAccessModifier - { - Public, - Private, - Protected, - Internal - } -} +namespace LazyCoder.CSharp +{ + public enum CsAccessModifier + { + Public, + Private, + Protected, + Internal, + ProtectedAndInternal, + ProtectedOrInternal + } +} diff --git a/src/LazyCoder/CSharp/CsAttribute.cs b/src/LazyCoder/CSharp/CsAttribute.cs index c7a40bc..fc4b0c0 100644 --- a/src/LazyCoder/CSharp/CsAttribute.cs +++ b/src/LazyCoder/CSharp/CsAttribute.cs @@ -1,4 +1,5 @@ using System; +using Microsoft.CodeAnalysis; namespace LazyCoder.CSharp { @@ -6,5 +7,6 @@ public class CsAttribute { public string Name { get; set; } public Type OriginalType { get; set; } + public ITypeSymbol TypeSymbol { get; set; } } } \ No newline at end of file diff --git a/src/LazyCoder/CSharp/CsClass.cs b/src/LazyCoder/CSharp/CsClass.cs index c151118..7f132a2 100644 --- a/src/LazyCoder/CSharp/CsClass.cs +++ b/src/LazyCoder/CSharp/CsClass.cs @@ -1,4 +1,5 @@ using System; +using Microsoft.CodeAnalysis; namespace LazyCoder.CSharp { @@ -7,5 +8,10 @@ public class CsClass: CsTypeDeclaration public CsClass(Type type): base(type) { } + + public CsClass(ITypeSymbol typeSymbol) + : base(typeSymbol) + { + } } -} +} \ No newline at end of file diff --git a/src/LazyCoder/CSharp/CsDeclaration.cs b/src/LazyCoder/CSharp/CsDeclaration.cs index 947b3ba..f09eb67 100644 --- a/src/LazyCoder/CSharp/CsDeclaration.cs +++ b/src/LazyCoder/CSharp/CsDeclaration.cs @@ -24,14 +24,14 @@ protected CsDeclaration(ITypeSymbol type) { Name = type.Name; Namespace = type.ContainingNamespace.Name; - // CsType = new CsType(type); - // Attributes = type.CustomAttributes - // .Select(x => new CsAttribute - // { - // Name = x.AttributeType.Name, - // OriginalType = x.AttributeType - // }) - // .ToArray(); + CsType = new CsType(type); + Attributes = type.GetAttributes() + .Select(x => new CsAttribute + { + Name = x.AttributeClass.Name, + TypeSymbol = x.AttributeClass + }) + .ToArray(); } public string Name { get; } @@ -39,4 +39,4 @@ protected CsDeclaration(ITypeSymbol type) public CsAttribute[] Attributes { get; } = Array.Empty(); public CsType CsType { get; } } -} +} \ No newline at end of file diff --git a/src/LazyCoder/CSharp/CsType.cs b/src/LazyCoder/CSharp/CsType.cs index 8745769..5eb1540 100644 --- a/src/LazyCoder/CSharp/CsType.cs +++ b/src/LazyCoder/CSharp/CsType.cs @@ -1,73 +1,92 @@ -using System; - -namespace LazyCoder.CSharp -{ - public class CsType: IEquatable - { - public CsType(Type originalType) - { - Name = originalType.Name; - Namespace = originalType.Namespace; - OriginalType = originalType; - } - - public string Name { get; } - public string Namespace { get; } - public Type OriginalType { get; } - - public override string ToString() - { - return Name; - } - - public bool Equals(CsType other) - { - if (ReferenceEquals(null, other)) - { - return false; - } - - if (ReferenceEquals(this, other)) - { - return true; - } - - return OriginalType == other.OriginalType; - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) - { - return false; - } - - if (ReferenceEquals(this, obj)) - { - return true; - } - - if (obj.GetType() != typeof(CsType)) - { - return false; - } - - return Equals((CsType)obj); - } - - public override int GetHashCode() - { - return OriginalType.GetHashCode(); - } - - public static bool operator ==(CsType left, CsType right) - { - return Equals(left, right); - } - - public static bool operator !=(CsType left, CsType right) - { - return !Equals(left, right); - } - } -} +using System; +using Microsoft.CodeAnalysis; + +namespace LazyCoder.CSharp +{ + public class CsType: IEquatable + { + public CsType(Type originalType) + { + Name = originalType.Name; + Namespace = originalType.Namespace; + OriginalType = originalType; + } + + public CsType(ITypeSymbol typeSymbol) + { + Name = typeSymbol.Name; + Namespace = typeSymbol.ContainingNamespace.Name; + TypeSymbol = typeSymbol; + } + + public string Name { get; } + public string Namespace { get; } + public Type OriginalType { get; } + public ITypeSymbol TypeSymbol { get; } + + public override string ToString() + { + return Name; + } + + public bool Equals(CsType other) + { + if (ReferenceEquals(null, other)) + { + return false; + } + + if (ReferenceEquals(this, other)) + { + return true; + } + + if (TypeSymbol != null) + { + return TypeSymbol.Equals(other.TypeSymbol); + } + + return OriginalType == other.OriginalType; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) + { + return false; + } + + if (ReferenceEquals(this, obj)) + { + return true; + } + + if (obj.GetType() != typeof(CsType)) + { + return false; + } + + return Equals((CsType)obj); + } + + public override int GetHashCode() + { + if (TypeSymbol != null) + { + return TypeSymbol.GetHashCode(); + } + + return OriginalType.GetHashCode(); + } + + public static bool operator ==(CsType left, CsType right) + { + return Equals(left, right); + } + + public static bool operator !=(CsType left, CsType right) + { + return !Equals(left, right); + } + } +} \ No newline at end of file diff --git a/src/LazyCoder/CSharp/CsTypeDeclaration.cs b/src/LazyCoder/CSharp/CsTypeDeclaration.cs index 7dcda90..ce0d6be 100644 --- a/src/LazyCoder/CSharp/CsTypeDeclaration.cs +++ b/src/LazyCoder/CSharp/CsTypeDeclaration.cs @@ -1,4 +1,5 @@ using System; +using Microsoft.CodeAnalysis; namespace LazyCoder.CSharp { @@ -9,6 +10,11 @@ protected CsTypeDeclaration(Type type) { } + protected CsTypeDeclaration(ITypeSymbol typeSymbol) + : base(typeSymbol) + { + } + public string[] TypeParameters { get; set; } = Array.Empty(); public CsMember[] Members { get; set; } = Array.Empty(); } diff --git a/src/LazyCoder/Converter2.cs b/src/LazyCoder/Converter2.cs new file mode 100644 index 0000000..cb69711 --- /dev/null +++ b/src/LazyCoder/Converter2.cs @@ -0,0 +1,231 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using LazyCoder.CSharp; +using LazyCoder.Typescript; +using LazyCoder.Writers; +using Microsoft.CodeAnalysis; + +namespace LazyCoder +{ + public static class Converter2 + { + public static TsFile[] Convert(Compilation compilation, + IEnumerable coders, + ICoder defaultCoder = null, + IEnumerable customTypeConverters = + null) + { + if (customTypeConverters != null) + { + TsType.RegisterCustomTypeConverters(customTypeConverters); + } + + var csDeclarations = CsDeclarationFactory2.Create(compilation).ToArray(); + + var writtenTsFiles = coders.SelectMany(coder => coder.Rewrite(csDeclarations)) + .Where(x => x.Declarations.Any()) + .ToArray(); + + return FixBuild(writtenTsFiles, + defaultCoder ?? new DefaultCoder(), + csDeclarations, + compilation); + } + + // todo same folder different case + public static string WriteFile(string outputDirectory, + TsFile tsFile) + { + var directory = string.IsNullOrEmpty(tsFile.Directory) || tsFile.Directory == "." + ? Path.GetFullPath(outputDirectory) + : Path.Combine(Path.GetFullPath(outputDirectory), tsFile.Directory); + Directory.CreateDirectory(directory); + var content = WriteFileToString(tsFile); + var filePath = Path.Combine(directory, tsFile.Name + ".ts"); + File.WriteAllText(filePath, content); + return filePath; + } + + public static string WriteFileToString(TsFile tsFile) + { + var writerContext = new WriterContext(); + writerContext.Write(tsFile); + return writerContext.GetResult(); + } + + private static TsFile[] FixBuild(TsFile[] tsFiles, + ICoder defaultCoder, + CsDeclaration[] csDeclarations, + Compilation compilation) + { + var exportRegistry = new ExportRegistry(); + + foreach (var tsFile in tsFiles) + { + exportRegistry.Register(tsFile); + } + + var generatedFiles = new List(); + var filesToFix = new Stack(tsFiles); + while (filesToFix.Count > 0) + { + var fileToFix = filesToFix.Pop(); + + // 1. Generating and auto importing external types + var externals = FindExternals(fileToFix); + foreach (var csType in externals) + { + if (!exportRegistry.TryGetExport(csType, out var export)) + { + Generate(csType); + + if (!exportRegistry.TryGetExport(csType, out export)) + { + throw new Exception($"Can not find Export for {csType}"); + } + } + + if (export.TsFile != fileToFix) + { + AutoImport(fileToFix, export); + } + } + + // 2. Generating derived types + var derivedTypes = FindDerivedTypes(externals, csDeclarations); + foreach (var csType in derivedTypes) + { + if (!exportRegistry.TryGetExport(csType, out _)) + { + Generate(csType); + } + } + } + + void Generate(CsType csType) + { + var csDeclaration = CsDeclarationFactory2.Create(compilation, csType.TypeSymbol); + var autoGeneratedTsFiles = defaultCoder.Rewrite(new[] + { + csDeclaration + }); + foreach (var autoGeneratedTsFile in autoGeneratedTsFiles) + { + exportRegistry.Register(autoGeneratedTsFile); + filesToFix.Push(autoGeneratedTsFile); + generatedFiles.Add(autoGeneratedTsFile); + } + } + + return tsFiles.Concat(generatedFiles).ToArray(); + } + + private static void AutoImport(TsFile tsFile, Export export) + { + var tsImport = new TsImport + { + Named = new[] + { + export.Name + }, + Path = Helpers.GetPathFromAToB(DirectoryToPath(tsFile.Directory), + DirectoryToPath(export + .TsFile.Directory)) + + "/" + export.Name + }; + tsFile.Import(tsImport); + } + + private static CsType[] FindExternals(TsFile tsFile) + { + return tsFile.Declarations + .SelectMany(DependencyFinder.Find) + .ToArray(); + } + + private static CsType[] FindDerivedTypes(CsType[] csTypes, CsDeclaration[] csDeclarations) + { + return csTypes.SelectMany(x => csDeclarations + .Select(y => y.CsType) + .Where(y => x != y && + x.OriginalType + .IsAssignableFrom(y.OriginalType))) + .ToArray(); + } + + private static string[] DirectoryToPath(string directory) + { + return string.IsNullOrEmpty(directory) || directory == "." + ? Array.Empty() + : directory.Split(Path.DirectorySeparatorChar); + } + + private class ExportRegistry + { + private readonly Dictionary exports = + new Dictionary(); + + public void Register(TsFile tsFile) + { + foreach (var tsDeclaration in tsFile.Declarations) + { + Register(tsFile, tsDeclaration); + } + } + + public bool TryGetExport(CsType csType, out Export export) + { + return exports.TryGetValue(csType, out export); + } + + private void Register(TsFile tsFile, TsDeclaration tsDeclaration) + { + switch (tsDeclaration) + { + case TsClass _: + case TsInterface _: + case TsEnum _: + Add(new Export(tsDeclaration, tsFile)); + break; + case TsFunction _: + break; + case TsNamespace tsNamespace: + foreach (var declaration in tsNamespace.Declarations) + { + Register(tsFile, declaration); + } + + break; + default: + throw new ArgumentOutOfRangeException(nameof(tsDeclaration), + tsDeclaration.GetType().Name, + null); + } + } + + private void Add(Export export) + { + if (export.CsType != null && !exports.ContainsKey(export.CsType)) + { + exports.Add(export.CsType, export); + } + } + } + + private class Export + { + public Export(TsDeclaration tsDeclaration, TsFile tsFile) + { + CsType = tsDeclaration.CsType; + Name = tsDeclaration.Name; + TsFile = tsFile; + } + + public CsType CsType { get; } + public string Name { get; } + public TsFile TsFile { get; } + } + } +} \ No newline at end of file diff --git a/src/LazyCoder/CsDeclarationFactory.cs b/src/LazyCoder/CsDeclarationFactory.cs index 0aea141..86e506f 100644 --- a/src/LazyCoder/CsDeclarationFactory.cs +++ b/src/LazyCoder/CsDeclarationFactory.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Reflection; using LazyCoder.CSharp; +using TypeInfo = System.Reflection.TypeInfo; namespace LazyCoder { diff --git a/src/LazyCoder/CsDeclarationFactory2.cs b/src/LazyCoder/CsDeclarationFactory2.cs new file mode 100644 index 0000000..032e1a4 --- /dev/null +++ b/src/LazyCoder/CsDeclarationFactory2.cs @@ -0,0 +1,32 @@ +using System.Linq; +using LazyCoder.CSharp; +using LazyCoder.Walkers; +using Microsoft.CodeAnalysis; + +namespace LazyCoder +{ + internal static class CsDeclarationFactory2 + { + public static CsDeclaration[] Create(Compilation compilation) + { + return compilation.SyntaxTrees + .SelectMany(tree => + { + var model = compilation.GetSemanticModel(tree); + var customWalker = new TheWalker(model); + return customWalker.Visit(tree.GetRoot()); + }) + .ToArray(); + } + + public static CsDeclaration Create(Compilation compilation, ISymbol symbol) + { + var reference = symbol.DeclaringSyntaxReferences.Single(); + var tree = reference.SyntaxTree; + var model = compilation.GetSemanticModel(tree); + var customWalker = new TheWalker(model); + var node = reference.GetSyntax(); + return customWalker.Visit(node).Single(); + } + } +} \ No newline at end of file diff --git a/src/LazyCoder/Helpers.cs b/src/LazyCoder/Helpers.cs index f02d432..3687594 100644 --- a/src/LazyCoder/Helpers.cs +++ b/src/LazyCoder/Helpers.cs @@ -74,6 +74,14 @@ public static IEnumerable DistinctBy( public static string GetDirectory(CsDeclaration csDeclaration) { + if (csDeclaration.CsType.TypeSymbol != null) + { + var strings = csDeclaration.CsType.TypeSymbol.ToDisplayString() + .Replace("+", ".") + .Split('.'); + return Path.Combine(strings.Take(strings.Length - 1).ToArray()); + } + var type = csDeclaration.CsType.OriginalType; var parts = GetFullName(type).Replace("+", ".").Split('.'); return Path.Combine(parts.Take(parts.Length - 1).ToArray()); @@ -133,4 +141,4 @@ public int GetHashCode(T obj) } } } -} +} \ No newline at end of file diff --git a/src/LazyCoder/LazyCoder.csproj b/src/LazyCoder/LazyCoder.csproj index 6c124c2..158ce63 100644 --- a/src/LazyCoder/LazyCoder.csproj +++ b/src/LazyCoder/LazyCoder.csproj @@ -6,4 +6,11 @@ enable + + + + + + + diff --git a/src/LazyCoder/Walkers/BaseWalker.cs b/src/LazyCoder/Walkers/BaseWalker.cs new file mode 100644 index 0000000..d0209c9 --- /dev/null +++ b/src/LazyCoder/Walkers/BaseWalker.cs @@ -0,0 +1,22 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; + +namespace LazyCoder.Walkers +{ + internal abstract class BaseWalker: CSharpSyntaxWalker where T : class + { + protected readonly SemanticModel semanticModel; + protected T? result; + + protected BaseWalker(SemanticModel semanticModel) + { + this.semanticModel = semanticModel; + } + + public new T? Visit(SyntaxNode node) + { + base.Visit(node); + return result; + } + } +} \ No newline at end of file diff --git a/src/LazyCoder/Walkers/ClassWalker.cs b/src/LazyCoder/Walkers/ClassWalker.cs new file mode 100644 index 0000000..1524b8e --- /dev/null +++ b/src/LazyCoder/Walkers/ClassWalker.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using LazyCoder.CSharp; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace LazyCoder.Walkers +{ + internal class ClassWalker: BaseWalker + { + private readonly List members = new List(); + + public ClassWalker(SemanticModel semanticModel): base(semanticModel) + { + } + + public override void VisitClassDeclaration(ClassDeclarationSyntax node) + { + base.VisitClassDeclaration(node); + var symbol = semanticModel.GetDeclaredSymbol(node)!; + result = new CsClass(symbol) + { + Members = members.ToArray() + }; + } + + public override void VisitPropertyDeclaration(PropertyDeclarationSyntax node) + { + var symbol = semanticModel.GetDeclaredSymbol(node)!; + members.Add(new CsProperty + { + Name = symbol.Name, + Type = new CsType(symbol.Type), + IsStatic = symbol.IsStatic, + AccessModifier = + AccessibilityToCsAccessModifier(symbol.DeclaredAccessibility), + Attributes = symbol.GetAttributes() + .Select(x => new CsAttribute + { + Name = x.AttributeClass.Name, + TypeSymbol = x.AttributeClass + }) + .ToArray() + }); + base.VisitPropertyDeclaration(node); + } + + private static CsAccessModifier AccessibilityToCsAccessModifier(Accessibility accessibility) + { + return accessibility switch + { + Accessibility.NotApplicable => throw new Exception(), + Accessibility.Private => CsAccessModifier.Private, + Accessibility.ProtectedAndInternal => CsAccessModifier.ProtectedAndInternal, + Accessibility.Protected => CsAccessModifier.Protected, + Accessibility.Internal => CsAccessModifier.Internal, + Accessibility.ProtectedOrInternal => CsAccessModifier.ProtectedOrInternal, + Accessibility.Public => CsAccessModifier.Public, + _ => throw new ArgumentOutOfRangeException(nameof(accessibility), accessibility, + null) + }; + } + } +} \ No newline at end of file diff --git a/src/LazyCoder/Walkers/EnumWalker.cs b/src/LazyCoder/Walkers/EnumWalker.cs new file mode 100644 index 0000000..805afd5 --- /dev/null +++ b/src/LazyCoder/Walkers/EnumWalker.cs @@ -0,0 +1,39 @@ +using System.Collections.Generic; +using LazyCoder.CSharp; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace LazyCoder.Walkers +{ + internal class EnumWalker: BaseWalker + { + private readonly List values = new List(); + + public EnumWalker(SemanticModel semanticModel) + : base(semanticModel) + { + } + + public override void VisitEnumDeclaration(EnumDeclarationSyntax node) + { + base.VisitEnumDeclaration(node); + var symbol = semanticModel.GetDeclaredSymbol(node)!; + result = new CsEnum(symbol) + { + Values = values.ToArray() + }; + } + + public override void VisitEnumMemberDeclaration(EnumMemberDeclarationSyntax node) + { + var symbol = semanticModel.GetDeclaredSymbol(node)!; + values.Add(new CsEnumValue + { + Name = node.Identifier.Text, + Value = (int)symbol.ConstantValue! + }); + base.VisitEnumMemberDeclaration(node); + } + } +} \ No newline at end of file diff --git a/src/LazyCoder/Walkers/TheWalker.cs b/src/LazyCoder/Walkers/TheWalker.cs new file mode 100644 index 0000000..10500da --- /dev/null +++ b/src/LazyCoder/Walkers/TheWalker.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using LazyCoder.CSharp; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace LazyCoder.Walkers +{ + internal class TheWalker: BaseWalker> + { + public TheWalker(SemanticModel semanticModel) + : base(semanticModel) + { + result = new List(); + } + + public override void VisitEnumDeclaration(EnumDeclarationSyntax node) + { + var enumWalker = new EnumWalker(semanticModel); + result!.Add(enumWalker.Visit(node)!); + base.VisitEnumDeclaration(node); + } + + public override void VisitClassDeclaration(ClassDeclarationSyntax node) + { + var classWalker = new ClassWalker(semanticModel); + result!.Add(classWalker.Visit(node)!); + base.VisitClassDeclaration(node); + } + } +} \ No newline at end of file diff --git a/tests/LazyCoder.Tests/Samples/Simple/Simple.cs b/tests/LazyCoder.Tests/Samples/CustomCoder/CustomCoder.cs similarity index 88% rename from tests/LazyCoder.Tests/Samples/Simple/Simple.cs rename to tests/LazyCoder.Tests/Samples/CustomCoder/CustomCoder.cs index 51f93e2..47fb63d 100644 --- a/tests/LazyCoder.Tests/Samples/Simple/Simple.cs +++ b/tests/LazyCoder.Tests/Samples/CustomCoder/CustomCoder.cs @@ -7,15 +7,21 @@ using Shouldly; using Xunit; -namespace LazyCoder.Tests.Samples.Simple +namespace LazyCoder.Tests.Samples.CustomCoder { - public class Simple + public class CustomCoder { [Fact] public void Test() { - var tsFiles = Converter.Convert(new[] { typeof(FirstClass) }, - new[] { new Coder() }); + var tsFiles = Converter.Convert(new[] + { + typeof(FirstClass) + }, + new[] + { + new Coder() + }); tsFiles.Length.ShouldBe(2); var firstClassFile = tsFiles.Single(x => x.Name == "FirstClass"); @@ -87,4 +93,4 @@ private class SecondClass public int NumberProperty { get; set; } } } -} +} \ No newline at end of file diff --git a/tests/LazyCoder.Tests/Samples/Simple/FirstClass.ts b/tests/LazyCoder.Tests/Samples/CustomCoder/FirstClass.ts similarity index 100% rename from tests/LazyCoder.Tests/Samples/Simple/FirstClass.ts rename to tests/LazyCoder.Tests/Samples/CustomCoder/FirstClass.ts diff --git a/tests/LazyCoder.Tests/Samples/Simple/SecondClass.ts b/tests/LazyCoder.Tests/Samples/CustomCoder/SecondClass.ts similarity index 100% rename from tests/LazyCoder.Tests/Samples/Simple/SecondClass.ts rename to tests/LazyCoder.Tests/Samples/CustomCoder/SecondClass.ts diff --git a/tests/LazyCoder.Tests/Samples/Simple.cs b/tests/LazyCoder.Tests/Samples/Simple.cs new file mode 100644 index 0000000..db9f77e --- /dev/null +++ b/tests/LazyCoder.Tests/Samples/Simple.cs @@ -0,0 +1,58 @@ +using System; +using System.IO; +using System.Linq; +using LazyCoder.Typescript; +using LazyCoder.Walkers; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Shouldly; +using Xunit; + +namespace LazyCoder.Tests.Samples +{ + public class Simple + { + [Fact] + public void Test() + { + var tsFiles = Convert(@" +namespace SomeNamespace +{ + public enum SomeEnum + { + FirstValue, + SecondValue, + ThirdValue + } +}"); + var tsFile = tsFiles.Single(); + var result = Converter.WriteFileToString(tsFile); + result.ShouldBe(@"export enum SomeEnum { + FirstValue = 0, + SecondValue = 1, + ThirdValue = 2, +} +"); + } + + private static TsFile[] Convert(string text) + { + var tree = CSharpSyntaxTree.ParseText(text); + var compilation = CSharpCompilation.Create("Test", + new[] + { + tree + }, + new[] + { + MetadataReference.CreateFromFile( + typeof(string).Assembly.Location) + }); + return Converter2.Convert(compilation, + new[] + { + new DefaultCoder() + }); + } + } +} \ No newline at end of file diff --git a/tests/LazyCoder.Tests/WalkerTests/ClassWalkerTest.cs b/tests/LazyCoder.Tests/WalkerTests/ClassWalkerTest.cs new file mode 100644 index 0000000..3ac59c5 --- /dev/null +++ b/tests/LazyCoder.Tests/WalkerTests/ClassWalkerTest.cs @@ -0,0 +1,68 @@ +using System.Linq; +using LazyCoder.CSharp; +using LazyCoder.Walkers; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Shouldly; +using Xunit; + +namespace LazyCoder.Tests.WalkerTests +{ + public class ClassWalkerTest + { + [Fact] + public void Properties() + { + var csEnum = GetCsClass(@" +namespace SomeNamespace +{ + public class SomeClass + { + public string FirstProperty { get; set; } + public static string StaticProperty { get; set; } + } +}"); + + csEnum.Name.ShouldBe("SomeClass"); + csEnum.Namespace.ShouldBe("SomeNamespace"); + var firstProperty = csEnum.Members + .Single(x => x.Name == "FirstProperty") + .ShouldBeOfType(); + firstProperty.AccessModifier.ShouldBe(CsAccessModifier.Public); + firstProperty.IsStatic.ShouldBeFalse(); + + var staticProperty = csEnum.Members + .Single(x => x.Name == "StaticProperty") + .ShouldBeOfType(); + staticProperty.IsStatic.ShouldBeTrue(); + } + + private static CsClass GetCsClass(string text) + { + var tree = CSharpSyntaxTree.ParseText(text); + var compilation = CSharpCompilation.Create("Test", + new[] + { + tree + }, + new[] + { + MetadataReference.CreateFromFile( + typeof(string).Assembly.Location) + }); + var semanticModel = compilation.GetSemanticModel(tree); + var classWalker = new ClassWalker(semanticModel); + var classDeclarationSyntax = GetClassDeclarationSyntax(tree); + return classWalker.Visit(classDeclarationSyntax); + } + + private static ClassDeclarationSyntax GetClassDeclarationSyntax(SyntaxTree syntaxTree) + { + return syntaxTree.GetRoot() + .DescendantNodes() + .OfType() + .Single(); + } + } +} \ No newline at end of file diff --git a/tests/LazyCoder.Tests/WalkerTests/EnumWalkerTest.cs b/tests/LazyCoder.Tests/WalkerTests/EnumWalkerTest.cs new file mode 100644 index 0000000..4fa7468 --- /dev/null +++ b/tests/LazyCoder.Tests/WalkerTests/EnumWalkerTest.cs @@ -0,0 +1,86 @@ +using System.Linq; +using LazyCoder.CSharp; +using LazyCoder.Walkers; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Shouldly; +using Xunit; + +namespace LazyCoder.Tests.WalkerTests +{ + public class EnumWalkerTest + { + [Fact] + public void Simple() + { + var csEnum = GetCsEnum(@" +namespace SomeNamespace +{ + public enum SomeEnum + { + FirstValue, + SecondValue, + ThirdValue + } +}"); + + csEnum.Name.ShouldBe("SomeEnum"); + csEnum.Namespace.ShouldBe("SomeNamespace"); + csEnum.Values[0].Name.ShouldBe("FirstValue"); + csEnum.Values[0].Value.ShouldBe(0); + csEnum.Values[1].Name.ShouldBe("SecondValue"); + csEnum.Values[1].Value.ShouldBe(1); + csEnum.Values[2].Name.ShouldBe("ThirdValue"); + csEnum.Values[2].Value.ShouldBe(2); + } + + [Fact] + public void EnumWithOverridenValues() + { + var csEnum = GetCsEnum(@" +namespace SomeNamespace +{ + public enum SomeEnum + { + FirstValue = 1, + SecondValue, + ThirdValue = 5, + FourthValue = 1 << 5 + } +}"); + + csEnum.Values[0].Value.ShouldBe(1); + csEnum.Values[1].Value.ShouldBe(2); + csEnum.Values[2].Value.ShouldBe(5); + csEnum.Values[3].Value.ShouldBe(32); + } + + private static CsEnum GetCsEnum(string text) + { + var tree = CSharpSyntaxTree.ParseText(text); + var compilation = CSharpCompilation.Create("Test", + new[] + { + tree + }, + new[] + { + MetadataReference.CreateFromFile( + typeof(string).Assembly.Location) + }); + var semanticModel = compilation.GetSemanticModel(tree); + var enumWalker = new EnumWalker(semanticModel); + var enumDeclarationSyntax = GetEnumDeclarationSyntax(tree); + return enumWalker.Visit(enumDeclarationSyntax); + } + + private static EnumDeclarationSyntax GetEnumDeclarationSyntax(SyntaxTree syntaxTree) + { + return syntaxTree.GetRoot() + .DescendantNodes() + .OfType() + .Single(); + } + } +} \ No newline at end of file