From 542bd1084709797918d36d1836b3d1235d42be14 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Thu, 1 Jul 2021 17:52:48 +1000 Subject: [PATCH 1/4] Initial version --- .editorconfig | 457 +++++++++++++++++ .github/workflows/ci-build.yml | 129 +++++ .../.idea/.gitignore | 13 + .../.idea/.name | 1 + .../.idea/encodings.xml | 4 + .../.idea/indexLayout.xml | 8 + .../.idea/misc.xml | 6 + .../.idea/vcs.xml | 6 + src/Splat.DI.SourceGenerator.sln | 51 ++ .../ModuleInitializer.cs | 23 + ...ests.ConstructionInjection.00.received.txt | 69 +++ ...ests.ConstructionInjection.00.verified.txt | 69 +++ ...ests.ConstructionInjection.01.received.txt | 14 + ...ests.ConstructionInjection.01.verified.txt | 1 + ...etonTests.EmptyConstructor.00.received.txt | 69 +++ ...etonTests.EmptyConstructor.00.verified.txt | 1 + ...etonTests.EmptyConstructor.01.received.txt | 10 + ...etonTests.EmptyConstructor.01.verified.txt | 1 + .../RegisterLazySingletonTests.cs | 22 + ...dInternalPropertyInjection.00.verified.txt | 69 +++ ...dInternalPropertyInjection.01.verified.txt | 11 + ...nalSetterPropertyInjection.00.verified.txt | 69 +++ ...nalSetterPropertyInjection.01.verified.txt | 11 + ...dMultiplePropertyInjection.00.verified.txt | 69 +++ ...dMultiplePropertyInjection.01.verified.txt | 11 + ...ublicPropertyInjectionFail.00.verified.txt | 13 + ...ublicPropertyInjectionFail.01.verified.txt | 69 +++ ...ublicPropertyInjectionFail.02.verified.txt | 11 + ...ropertySetterInjectionFail.00.verified.txt | 13 + ...ropertySetterInjectionFail.01.verified.txt | 69 +++ ...ropertySetterInjectionFail.02.verified.txt | 11 + ...uctionAndPropertyInjection.00.verified.txt | 69 +++ ...uctionAndPropertyInjection.01.verified.txt | 11 + ...ests.ConstructionInjection.00.verified.txt | 69 +++ ...ests.ConstructionInjection.01.verified.txt | 11 + ...sterTests.EmptyConstructor.00.verified.txt | 69 +++ ...sterTests.EmptyConstructor.01.verified.txt | 11 + ...leConstructorWithAttribute.00.verified.txt | 69 +++ ...leConstructorWithAttribute.01.verified.txt | 11 + ...WithMultipleAttributesFail.00.verified.txt | 13 + ...WithMultipleAttributesFail.01.verified.txt | 69 +++ ...WithMultipleAttributesFail.02.verified.txt | 10 + ...ructorWithoutAttributeFail.00.verified.txt | 13 + ...ructorWithoutAttributeFail.01.verified.txt | 69 +++ ...ructorWithoutAttributeFail.02.verified.txt | 10 + .../RegisterTests.cs | 19 + ...encyInjection.SourceGenerator.Tests.csproj | 32 ++ .../TestBase.cs | 482 ++++++++++++++++++ .../Constants.cs | 82 +++ .../DiagnosticWarnings.cs | 44 ++ .../Generator.cs | 44 ++ .../SourceGeneratorHelpers.cs | 229 +++++++++ ...DependencyInjection.SourceGenerator.csproj | 26 + .../SyntaxReceiver.cs | 56 ++ version.json | 16 + 55 files changed, 2914 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/workflows/ci-build.yml create mode 100644 src/.idea/.idea.Splat.DI.SourceGenerator/.idea/.gitignore create mode 100644 src/.idea/.idea.Splat.DI.SourceGenerator/.idea/.name create mode 100644 src/.idea/.idea.Splat.DI.SourceGenerator/.idea/encodings.xml create mode 100644 src/.idea/.idea.Splat.DI.SourceGenerator/.idea/indexLayout.xml create mode 100644 src/.idea/.idea.Splat.DI.SourceGenerator/.idea/misc.xml create mode 100644 src/.idea/.idea.Splat.DI.SourceGenerator/.idea/vcs.xml create mode 100644 src/Splat.DI.SourceGenerator.sln create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.received.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.received.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.received.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.received.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.02.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.02.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.02.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.02.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/Constants.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/Generator.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/SourceGeneratorHelpers.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/Splat.DependencyInjection.SourceGenerator.csproj create mode 100644 src/Splat.DependencyInjection.SourceGenerator/SyntaxReceiver.cs create mode 100644 version.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ff8681f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,457 @@ +# editorconfig.org + +# top-most EditorConfig file +root = true + +# Default settings: +# A newline ending every file +# Use 4 spaces as indentation +[*] +insert_final_newline = true +indent_style = space +indent_size = 4 + +[project.json] +indent_size = 2 + +# C# files +[*.cs] +# New line preferences +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = true +csharp_indent_switch_labels = true +csharp_indent_labels = one_less_than_current + +# Modifier preferences +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion + +# avoid this. unless absolutely necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +# only use var when it's obvious what the variable type is +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = true:suggestion + +# prefer C# premade types. +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# name all constant fields using PascalCase +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +# static fields should have _ prefix +dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion +dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields +dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style +dotnet_naming_symbols.static_fields.applicable_kinds = field +dotnet_naming_symbols.static_fields.required_modifiers = static +dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected +dotnet_naming_style.static_prefix_style.required_prefix = _ +dotnet_naming_style.static_prefix_style.capitalization = camel_case + +# internal and private fields should be _camelCase +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +# Code style defaults +csharp_using_directive_placement = outside_namespace:suggestion +dotnet_sort_system_directives_first = true +csharp_prefer_braces = true:silent +csharp_preserve_single_line_blocks = true:none +csharp_preserve_single_line_statements = false:none +csharp_prefer_static_local_function = true:suggestion +csharp_prefer_simple_using_statement = false:none +csharp_style_prefer_switch_expression = true:suggestion + +# Code quality +dotnet_style_readonly_field = true:suggestion +dotnet_code_quality_unused_parameters = non_public:suggestion + +# Expression-level preferences +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_auto_properties = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +csharp_prefer_simple_default_expression = true:suggestion + +# Expression-bodied members +csharp_style_expression_bodied_methods = true:suggestion +csharp_style_expression_bodied_constructors = true:suggestion +csharp_style_expression_bodied_operators = true:suggestion +csharp_style_expression_bodied_properties = true:suggestion +csharp_style_expression_bodied_indexers = true:suggestion +csharp_style_expression_bodied_accessors = true:suggestion +csharp_style_expression_bodied_lambdas = true:suggestion +csharp_style_expression_bodied_local_functions = true:suggestion + +# Pattern matching +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion + +# Null checking preferences +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# Other features +csharp_style_prefer_index_operator = false:none +csharp_style_prefer_range_operator = false:none +csharp_style_pattern_local_over_anonymous_function = false:none + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = do_not_ignore +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 + +# analyzers +dotnet_diagnostic.AvoidAsyncVoid.severity = suggestion + +dotnet_diagnostic.CA1000.severity = none +dotnet_diagnostic.CA1001.severity = error +dotnet_diagnostic.CA1009.severity = error +dotnet_diagnostic.CA1016.severity = error +dotnet_diagnostic.CA1030.severity = none +dotnet_diagnostic.CA1031.severity = none +dotnet_diagnostic.CA1033.severity = none +dotnet_diagnostic.CA1036.severity = none +dotnet_diagnostic.CA1049.severity = error +dotnet_diagnostic.CA1056.severity = suggestion +dotnet_diagnostic.CA1060.severity = error +dotnet_diagnostic.CA1061.severity = error +dotnet_diagnostic.CA1063.severity = error +dotnet_diagnostic.CA1065.severity = error +dotnet_diagnostic.CA1301.severity = error +dotnet_diagnostic.CA1303.severity = none +dotnet_diagnostic.CA1308.severity = none +dotnet_diagnostic.CA1400.severity = error +dotnet_diagnostic.CA1401.severity = error +dotnet_diagnostic.CA1403.severity = error +dotnet_diagnostic.CA1404.severity = error +dotnet_diagnostic.CA1405.severity = error +dotnet_diagnostic.CA1410.severity = error +dotnet_diagnostic.CA1415.severity = error +dotnet_diagnostic.CA1507.severity = error +dotnet_diagnostic.CA1710.severity = suggestion +dotnet_diagnostic.CA1724.severity = none +dotnet_diagnostic.CA1810.severity = none +dotnet_diagnostic.CA1821.severity = error +dotnet_diagnostic.CA1900.severity = error +dotnet_diagnostic.CA1901.severity = error +dotnet_diagnostic.CA2000.severity = none +dotnet_diagnostic.CA2002.severity = error +dotnet_diagnostic.CA2007.severity = none +dotnet_diagnostic.CA2100.severity = error +dotnet_diagnostic.CA2101.severity = error +dotnet_diagnostic.CA2108.severity = error +dotnet_diagnostic.CA2111.severity = error +dotnet_diagnostic.CA2112.severity = error +dotnet_diagnostic.CA2114.severity = error +dotnet_diagnostic.CA2116.severity = error +dotnet_diagnostic.CA2117.severity = error +dotnet_diagnostic.CA2122.severity = error +dotnet_diagnostic.CA2123.severity = error +dotnet_diagnostic.CA2124.severity = error +dotnet_diagnostic.CA2126.severity = error +dotnet_diagnostic.CA2131.severity = error +dotnet_diagnostic.CA2132.severity = error +dotnet_diagnostic.CA2133.severity = error +dotnet_diagnostic.CA2134.severity = error +dotnet_diagnostic.CA2137.severity = error +dotnet_diagnostic.CA2138.severity = error +dotnet_diagnostic.CA2140.severity = error +dotnet_diagnostic.CA2141.severity = error +dotnet_diagnostic.CA2146.severity = error +dotnet_diagnostic.CA2147.severity = error +dotnet_diagnostic.CA2149.severity = error +dotnet_diagnostic.CA2200.severity = error +dotnet_diagnostic.CA2202.severity = error +dotnet_diagnostic.CA2207.severity = error +dotnet_diagnostic.CA2212.severity = error +dotnet_diagnostic.CA2213.severity = error +dotnet_diagnostic.CA2214.severity = error +dotnet_diagnostic.CA2216.severity = error +dotnet_diagnostic.CA2220.severity = error +dotnet_diagnostic.CA2229.severity = error +dotnet_diagnostic.CA2231.severity = error +dotnet_diagnostic.CA2232.severity = error +dotnet_diagnostic.CA2235.severity = error +dotnet_diagnostic.CA2236.severity = error +dotnet_diagnostic.CA2237.severity = error +dotnet_diagnostic.CA2238.severity = error +dotnet_diagnostic.CA2240.severity = error +dotnet_diagnostic.CA2241.severity = error +dotnet_diagnostic.CA2242.severity = error + +dotnet_diagnostic.RCS1001.severity = error +dotnet_diagnostic.RCS1018.severity = error +dotnet_diagnostic.RCS1037.severity = error +dotnet_diagnostic.RCS1055.severity = error +dotnet_diagnostic.RCS1062.severity = error +dotnet_diagnostic.RCS1066.severity = error +dotnet_diagnostic.RCS1069.severity = error +dotnet_diagnostic.RCS1071.severity = error +dotnet_diagnostic.RCS1074.severity = error +dotnet_diagnostic.RCS1090.severity = error +dotnet_diagnostic.RCS1138.severity = error +dotnet_diagnostic.RCS1139.severity = error +dotnet_diagnostic.RCS1163.severity = suggestion +dotnet_diagnostic.RCS1168.severity = suggestion +dotnet_diagnostic.RCS1188.severity = error +dotnet_diagnostic.RCS1201.severity = error +dotnet_diagnostic.RCS1207.severity = error +dotnet_diagnostic.RCS1211.severity = error +dotnet_diagnostic.RCS1507.severity = error + +dotnet_diagnostic.SA1000.severity = error +dotnet_diagnostic.SA1001.severity = error +dotnet_diagnostic.SA1002.severity = error +dotnet_diagnostic.SA1003.severity = error +dotnet_diagnostic.SA1004.severity = error +dotnet_diagnostic.SA1005.severity = error +dotnet_diagnostic.SA1006.severity = error +dotnet_diagnostic.SA1007.severity = error +dotnet_diagnostic.SA1008.severity = error +dotnet_diagnostic.SA1009.severity = error +dotnet_diagnostic.SA1010.severity = error +dotnet_diagnostic.SA1011.severity = error +dotnet_diagnostic.SA1012.severity = error +dotnet_diagnostic.SA1013.severity = error +dotnet_diagnostic.SA1014.severity = error +dotnet_diagnostic.SA1015.severity = error +dotnet_diagnostic.SA1016.severity = error +dotnet_diagnostic.SA1017.severity = error +dotnet_diagnostic.SA1018.severity = error +dotnet_diagnostic.SA1019.severity = error +dotnet_diagnostic.SA1020.severity = error +dotnet_diagnostic.SA1021.severity = error +dotnet_diagnostic.SA1022.severity = error +dotnet_diagnostic.SA1023.severity = error +dotnet_diagnostic.SA1024.severity = error +dotnet_diagnostic.SA1025.severity = error +dotnet_diagnostic.SA1026.severity = error +dotnet_diagnostic.SA1027.severity = error +dotnet_diagnostic.SA1028.severity = error +dotnet_diagnostic.SA1100.severity = error +dotnet_diagnostic.SA1101.severity = none +dotnet_diagnostic.SA1102.severity = error +dotnet_diagnostic.SA1103.severity = error +dotnet_diagnostic.SA1104.severity = error +dotnet_diagnostic.SA1105.severity = error +dotnet_diagnostic.SA1106.severity = error +dotnet_diagnostic.SA1107.severity = error +dotnet_diagnostic.SA1108.severity = error +dotnet_diagnostic.SA1110.severity = error +dotnet_diagnostic.SA1111.severity = error +dotnet_diagnostic.SA1112.severity = error +dotnet_diagnostic.SA1113.severity = error +dotnet_diagnostic.SA1114.severity = error +dotnet_diagnostic.SA1115.severity = error +dotnet_diagnostic.SA1116.severity = error +dotnet_diagnostic.SA1117.severity = error +dotnet_diagnostic.SA1118.severity = error +dotnet_diagnostic.SA1119.severity = error +dotnet_diagnostic.SA1120.severity = error +dotnet_diagnostic.SA1121.severity = error +dotnet_diagnostic.SA1122.severity = error +dotnet_diagnostic.SA1123.severity = error +dotnet_diagnostic.SA1124.severity = error +dotnet_diagnostic.SA1125.severity = error +dotnet_diagnostic.SA1127.severity = error +dotnet_diagnostic.SA1128.severity = error +dotnet_diagnostic.SA1129.severity = error +dotnet_diagnostic.SA1130.severity = error +dotnet_diagnostic.SA1131.severity = error +dotnet_diagnostic.SA1132.severity = error +dotnet_diagnostic.SA1133.severity = error +dotnet_diagnostic.SA1134.severity = error +dotnet_diagnostic.SA1135.severity = error +dotnet_diagnostic.SA1136.severity = error +dotnet_diagnostic.SA1137.severity = error +dotnet_diagnostic.SA1139.severity = error +dotnet_diagnostic.SA1200.severity = none +dotnet_diagnostic.SA1201.severity = error +dotnet_diagnostic.SA1202.severity = error +dotnet_diagnostic.SA1203.severity = error +dotnet_diagnostic.SA1204.severity = error +dotnet_diagnostic.SA1205.severity = error +dotnet_diagnostic.SA1206.severity = error +dotnet_diagnostic.SA1207.severity = error +dotnet_diagnostic.SA1208.severity = error +dotnet_diagnostic.SA1209.severity = error +dotnet_diagnostic.SA1210.severity = error +dotnet_diagnostic.SA1211.severity = error +dotnet_diagnostic.SA1212.severity = error +dotnet_diagnostic.SA1213.severity = error +dotnet_diagnostic.SA1214.severity = error +dotnet_diagnostic.SA1216.severity = error +dotnet_diagnostic.SA1217.severity = error +dotnet_diagnostic.SA1300.severity = error +dotnet_diagnostic.SA1302.severity = error +dotnet_diagnostic.SA1303.severity = error +dotnet_diagnostic.SA1304.severity = error +dotnet_diagnostic.SA1306.severity = none +dotnet_diagnostic.SA1307.severity = error +dotnet_diagnostic.SA1308.severity = error +dotnet_diagnostic.SA1309.severity = none +dotnet_diagnostic.SA1310.severity = error +dotnet_diagnostic.SA1311.severity = none +dotnet_diagnostic.SA1312.severity = error +dotnet_diagnostic.SA1313.severity = error +dotnet_diagnostic.SA1314.severity = error +dotnet_diagnostic.SA1316.severity = none +dotnet_diagnostic.SA1400.severity = error +dotnet_diagnostic.SA1401.severity = error +dotnet_diagnostic.SA1402.severity = error +dotnet_diagnostic.SA1403.severity = error +dotnet_diagnostic.SA1404.severity = error +dotnet_diagnostic.SA1405.severity = error +dotnet_diagnostic.SA1406.severity = error +dotnet_diagnostic.SA1407.severity = error +dotnet_diagnostic.SA1408.severity = error +dotnet_diagnostic.SA1410.severity = error +dotnet_diagnostic.SA1411.severity = error +dotnet_diagnostic.SA1413.severity = none +dotnet_diagnostic.SA1500.severity = error +dotnet_diagnostic.SA1501.severity = error +dotnet_diagnostic.SA1502.severity = error +dotnet_diagnostic.SA1503.severity = error +dotnet_diagnostic.SA1504.severity = error +dotnet_diagnostic.SA1505.severity = error +dotnet_diagnostic.SA1506.severity = error +dotnet_diagnostic.SA1507.severity = error +dotnet_diagnostic.SA1508.severity = error +dotnet_diagnostic.SA1509.severity = error +dotnet_diagnostic.SA1510.severity = error +dotnet_diagnostic.SA1511.severity = error +dotnet_diagnostic.SA1512.severity = error +dotnet_diagnostic.SA1513.severity = error +dotnet_diagnostic.SA1514.severity = error +dotnet_diagnostic.SA1515.severity = error +dotnet_diagnostic.SA1516.severity = error +dotnet_diagnostic.SA1517.severity = error +dotnet_diagnostic.SA1518.severity = error +dotnet_diagnostic.SA1519.severity = error +dotnet_diagnostic.SA1520.severity = error +dotnet_diagnostic.SA1600.severity = error +dotnet_diagnostic.SA1601.severity = error +dotnet_diagnostic.SA1602.severity = error +dotnet_diagnostic.SA1604.severity = error +dotnet_diagnostic.SA1605.severity = error +dotnet_diagnostic.SA1606.severity = error +dotnet_diagnostic.SA1607.severity = error +dotnet_diagnostic.SA1608.severity = error +dotnet_diagnostic.SA1610.severity = error +dotnet_diagnostic.SA1611.severity = error +dotnet_diagnostic.SA1612.severity = error +dotnet_diagnostic.SA1613.severity = error +dotnet_diagnostic.SA1614.severity = error +dotnet_diagnostic.SA1615.severity = error +dotnet_diagnostic.SA1616.severity = error +dotnet_diagnostic.SA1617.severity = error +dotnet_diagnostic.SA1618.severity = error +dotnet_diagnostic.SA1619.severity = error +dotnet_diagnostic.SA1620.severity = error +dotnet_diagnostic.SA1621.severity = error +dotnet_diagnostic.SA1622.severity = error +dotnet_diagnostic.SA1623.severity = error +dotnet_diagnostic.SA1624.severity = error +dotnet_diagnostic.SA1625.severity = error +dotnet_diagnostic.SA1626.severity = error +dotnet_diagnostic.SA1627.severity = error +dotnet_diagnostic.SA1629.severity = error +dotnet_diagnostic.SA1633.severity = error +dotnet_diagnostic.SA1634.severity = error +dotnet_diagnostic.SA1635.severity = error +dotnet_diagnostic.SA1636.severity = error +dotnet_diagnostic.SA1637.severity = none +dotnet_diagnostic.SA1638.severity = none +dotnet_diagnostic.SA1640.severity = error +dotnet_diagnostic.SA1641.severity = error +dotnet_diagnostic.SA1642.severity = error +dotnet_diagnostic.SA1643.severity = error +dotnet_diagnostic.SA1649.severity = error +dotnet_diagnostic.SA1651.severity = error + +dotnet_diagnostic.SX1101.severity = error +dotnet_diagnostic.SX1309.severity = error +dotnet_diagnostic.SX1623.severity = none + +dotnet_diagnostic.AD0001.severity = none + +# C++ Files +[*.{cpp,h,in}] +curly_bracket_next_line = true +indent_brace_style = Allman + +# Xml project files +[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] +indent_size = 2 + +# Xml build files +[*.builds] +indent_size = 2 + +# Xml files +[*.{xml,stylecop,resx,ruleset}] +indent_size = 2 + +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 + +# Shell scripts +[*.sh] +end_of_line = lf +[*.{cmd, bat}] +end_of_line = crlf diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000..3e57529 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,129 @@ +name: Build and Release + +on: + push: + branches: [ main ] + pull_request: + types: [opened, synchronize, reopened, closed] + branches: [ main ] + +env: + configuration: Release + productNamespacePrefix: "Splat" + +jobs: + build: + runs-on: windows-latest + outputs: + nbgv: ${{ steps.nbgv.outputs.SemVer2 }} + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + + - name: Install .NET Core + uses: actions/setup-dotnet@v1.8.0 + with: + dotnet-version: 3.1.x + + - name: Install .NET 5 + uses: actions/setup-dotnet@v1.8.0 + with: + dotnet-version: 5.0.x + + # - name: Update VS2019 + # shell: powershell + # run: Start-Process -Wait -PassThru -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList "update --passive --norestart --installpath ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise""" + + - name: NBGV + id: nbgv + uses: dotnet/nbgv@master + with: + setAllVars: true + + - name: NuGet Restore + run: dotnet restore + working-directory: src + + - name: Build + run: dotnet build --configuration=${{ env.configuration }} --verbosity=minimal --no-restore + working-directory: src + + - name: Run Unit Tests and Generate Coverage + uses: glennawatson/coverlet-msbuild@v1 + with: + project-files: '**/*Tests*.csproj' + no-build: true + exclude-filter: '[${{env.productNamespacePrefix}}.*.Tests.*]*' + include-filter: '[${{env.productNamespacePrefix}}*]*' + output-format: cobertura + output: '../../artifacts/' + configuration: ${{ env.configuration }} + + - name: Pack + run: dotnet pack --configuration=${{ env.configuration }} --verbosity=minimal --no-restore + working-directory: src + + - name: Upload Code Coverage + shell: bash + run: | + echo $PWD + bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -t ${{ env.CODECOV_TOKEN }} -s '$PWD/artifacts' -f '*.xml' + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: Create NuGet Artifacts + uses: actions/upload-artifact@master + with: + name: nuget + path: '**/*.nupkg' + + release: + runs-on: windows-latest + needs: build + if: contains(github.event.pull_request.labels.*.name, 'release') && github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + + - name: Download NuGet Packages + uses: actions/download-artifact@v2.0.9 + with: + name: nuget + + - uses: nuget/setup-nuget@v1 + name: Setup NuGet + + # Decode the base 64 encoded pfx and save the Signing_Certificate + - name: Sign NuGet packages + shell: pwsh + run: | + $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.SIGNING_CERTIFICATE }}") + [IO.File]::WriteAllBytes("GitHubActionsWorkflow.pfx", $pfx_cert_byte) + $secure_password = ConvertTo-SecureString ${{ secrets.SIGN_CERTIFICATE_PASSWORD }} –asplaintext –force + Import-PfxCertificate -FilePath GitHubActionsWorkflow.pfx -Password $secure_password -CertStoreLocation Cert:\CurrentUser\My + nuget sign -Timestamper http://timestamp.digicert.com -CertificateFingerprint ${{ secrets.SIGN_CERTIFICATE_HASH }} **/*.nupkg + + - name: Changelog + uses: glennawatson/ChangeLog@v1 + id: changelog + + - name: Create Release + uses: actions/create-release@v1.1.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ needs.build.outputs.nbgv }} + release_name: ${{ needs.build.outputs.nbgv }} + body: | + ${{ steps.changelog.outputs.commitLog }} + + - name: NuGet Push + env: + NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }} + SOURCE_URL: https://api.nuget.org/v3/index.json + run: | + dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg diff --git a/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/.gitignore b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/.gitignore new file mode 100644 index 0000000..3485d7d --- /dev/null +++ b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/modules.xml +/contentModel.xml +/.idea.Splat.DI.SourceGenerator.iml +/projectSettingsUpdater.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/.name b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/.name new file mode 100644 index 0000000..cb1b0d6 --- /dev/null +++ b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/.name @@ -0,0 +1 @@ +Splat.DI.SourceGenerator \ No newline at end of file diff --git a/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/encodings.xml b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/indexLayout.xml b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/misc.xml b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/misc.xml new file mode 100644 index 0000000..1d8c84d --- /dev/null +++ b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/vcs.xml b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/src/.idea/.idea.Splat.DI.SourceGenerator/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/Splat.DI.SourceGenerator.sln b/src/Splat.DI.SourceGenerator.sln new file mode 100644 index 0000000..b42d03a --- /dev/null +++ b/src/Splat.DI.SourceGenerator.sln @@ -0,0 +1,51 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Splat.DependencyInjection.SourceGenerator", "Splat.DependencyInjection.SourceGenerator\Splat.DependencyInjection.SourceGenerator.csproj", "{3BD91F34-54B0-4E7C-B933-D16C0A054FE9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Splat.DependencyInjection.SourceGenerator.Tests", "Splat.DependencyInjection.SourceGenerator.Tests\Splat.DependencyInjection.SourceGenerator.Tests.csproj", "{09554D3F-6277-479E-BBA6-3E4806C7ED85}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Debug|x64.ActiveCfg = Debug|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Debug|x64.Build.0 = Debug|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Debug|x86.ActiveCfg = Debug|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Debug|x86.Build.0 = Debug|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Release|Any CPU.Build.0 = Release|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Release|x64.ActiveCfg = Release|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Release|x64.Build.0 = Release|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Release|x86.ActiveCfg = Release|Any CPU + {3BD91F34-54B0-4E7C-B933-D16C0A054FE9}.Release|x86.Build.0 = Release|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Debug|Any CPU.Build.0 = Debug|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Debug|x64.ActiveCfg = Debug|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Debug|x64.Build.0 = Debug|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Debug|x86.ActiveCfg = Debug|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Debug|x86.Build.0 = Debug|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Release|Any CPU.ActiveCfg = Release|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Release|Any CPU.Build.0 = Release|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Release|x64.ActiveCfg = Release|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Release|x64.Build.0 = Release|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Release|x86.ActiveCfg = Release|Any CPU + {09554D3F-6277-479E-BBA6-3E4806C7ED85}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C06417F6-753F-4456-9D91-64D547407315} + EndGlobalSection +EndGlobal diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs new file mode 100644 index 0000000..f824e25 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +using VerifyTests; + +/// +/// Initialize for the module. +/// +public static class ModuleInitializer +{ + /// + /// Initializes the source generators. + /// + [ModuleInitializer] + public static void Init() + { + VerifySourceGenerators.Enable(); + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.received.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.received.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.received.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.received.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.received.txt new file mode 100644 index 0000000..5d4efc6 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.received.txt @@ -0,0 +1,14 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + System.Lazy lazy = new System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.verified.txt new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.verified.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.received.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.received.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.received.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.verified.txt new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.verified.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.received.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.received.txt new file mode 100644 index 0000000..5d80dbc --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.received.txt @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.RegisterLazySingleton(() => new System.Lazy(() => new global::Test.TestConcrete()), typeof(global::Test.ITest)); + } + }} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.verified.txt new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.verified.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.cs new file mode 100644 index 0000000..63c664d --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using ReactiveMarbles.SourceGenerator.TestNuGetHelper.Compilation; +using VerifyXunit; +using Xunit; +using Xunit.Abstractions; + +namespace Splat.DependencyInjection.SourceGenerator.Tests +{ + [UsesVerify] + public class RegisterLazySingletonTests : TestBase + { + public RegisterLazySingletonTests(ITestOutputHelper testOutputHelper) + : base(testOutputHelper, "RegisterLazySingleton") + { + } + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.00.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.00.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.01.verified.txt new file mode 100644 index 0000000..b552524 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.01.verified.txt @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest)); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.00.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.00.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.01.verified.txt new file mode 100644 index 0000000..b552524 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.01.verified.txt @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest)); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.00.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.00.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.01.verified.txt new file mode 100644 index 0000000..840dd2c --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.01.verified.txt @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , typeof(global::Test.ITest)); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.00.verified.txt new file mode 100644 index 0000000..37d1b66 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,58)-(22,61), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.01.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.01.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.02.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.02.verified.txt new file mode 100644 index 0000000..b552524 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.02.verified.txt @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest)); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.00.verified.txt new file mode 100644 index 0000000..d52cc54 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,63)-(22,66), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.01.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.01.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.02.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.02.verified.txt new file mode 100644 index 0000000..b552524 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.02.verified.txt @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest)); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.00.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.00.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.01.verified.txt new file mode 100644 index 0000000..b552524 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.01.verified.txt @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest)); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.00.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.00.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.01.verified.txt new file mode 100644 index 0000000..f2f03d8 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.01.verified.txt @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest)); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.00.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.00.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.01.verified.txt new file mode 100644 index 0000000..0fb28e5 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.01.verified.txt @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete(), typeof(global::Test.ITest)); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.00.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.00.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.01.verified.txt new file mode 100644 index 0000000..9202fbe --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.01.verified.txt @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1))), typeof(global::Test.ITest)); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.00.verified.txt new file mode 100644 index 0000000..f784ab8 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI003, + Title: Multiple constructors have DependencyInjectionConstructorAttribute, + Severity: Error, + WarningLevel: 0, + Location: : (23,15)-(23,27), + MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.01.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.01.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.02.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.02.verified.txt new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.02.verified.txt @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.00.verified.txt new file mode 100644 index 0000000..bf06402 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI001, + Title: Can't find valid constructor, + Severity: Error, + WarningLevel: 0, + Location: : (10,12)-(10,62), + MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.01.verified.txt new file mode 100644 index 0000000..26b04c7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.01.verified.txt @@ -0,0 +1,69 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.02.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.02.verified.txt new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.02.verified.txt @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.cs new file mode 100644 index 0000000..1430301 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.cs @@ -0,0 +1,19 @@ +using System; +using System.Threading.Tasks; + +using VerifyXunit; + +using Xunit; +using Xunit.Abstractions; + +namespace Splat.DependencyInjection.SourceGenerator.Tests +{ + [UsesVerify] + public sealed class RegisterTests : TestBase + { + public RegisterTests(ITestOutputHelper testOutputHelper) + : base(testOutputHelper, "Register") + { + } + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj b/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj new file mode 100644 index 0000000..bebfdee --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj @@ -0,0 +1,32 @@ + + + + net5.0 + + false + enable + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + + diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs new file mode 100644 index 0000000..af3b8f9 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs @@ -0,0 +1,482 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +using Microsoft.CodeAnalysis; + +using NuGet.LibraryModel; +using NuGet.Versioning; +using ReactiveMarbles.NuGet.Helpers; +using ReactiveMarbles.SourceGenerator.TestNuGetHelper.Compilation; + +using VerifyXunit; + +using Xunit; +using Xunit.Abstractions; + +namespace Splat.DependencyInjection.SourceGenerator.Tests +{ + public abstract class TestBase : IAsyncLifetime, IDisposable + { +#pragma warning disable CS0618 // Type or member is obsolete + private static readonly LibraryRange _splatLibrary = new("Splat", VersionRange.AllStableFloating, LibraryDependencyTarget.Package); +#pragma warning restore CS0618 // Type or member is obsolete + + private readonly string _testMethod; + + protected TestBase(ITestOutputHelper testOutputHelper, string testMethod) + { + TestOutputHelper = testOutputHelper; + _testMethod = testMethod; + } + + protected ITestOutputHelper TestOutputHelper { get; } + + protected EventBuilderCompiler? EventCompiler { get; private set; } + + public async Task InitializeAsync() + { + var targetFrameworks = "netstandard2.0".ToFrameworks(); + + var inputGroup = await NuGetPackageHelper.DownloadPackageFilesAndFolder(_splatLibrary, targetFrameworks, packageOutputDirectory: null).ConfigureAwait(false); + + var framework = targetFrameworks[0]; + EventCompiler = new EventBuilderCompiler(inputGroup, inputGroup, framework); + } + + public Task DisposeAsync() + { + EventCompiler?.Dispose(); + return Task.CompletedTask; + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + [Fact] + public Task ConstructionInjection() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} +}}"; + + return TestPass(source); + } + + [Fact] + public Task ConstructionAndPropertyInjection() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + + [DependencyInjectionProperty] + public IServiceProperty ServiceProperty {{ get; set; }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} + public interface IServiceProperty {{ }} +}}"; + + return TestPass(source); + } + + [Fact] + public Task ConstructionAndNonPublicPropertyInjectionFail() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + + [DependencyInjectionProperty] + protected IServiceProperty ServiceProperty {{ get; set; }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} + public interface IServiceProperty {{ }} +}}"; + + return TestFail(source); + } + + [Fact] + public Task ConstructionAndNonPublicPropertySetterInjectionFail() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + + [DependencyInjectionProperty] + public IServiceProperty ServiceProperty {{ get; private set; }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} + public interface IServiceProperty {{ }} +}}"; + + return TestFail(source); + } + + [Fact] + public Task ConstructionAndInternalPropertyInjection() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + + [DependencyInjectionProperty] + internal IServiceProperty ServiceProperty {{ get; set; }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} + public interface IServiceProperty {{ }} +}}"; + + return TestPass(source); + } + + + [Fact] + public Task ConstructionAndInternalSetterPropertyInjection() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + + [DependencyInjectionProperty] + public IServiceProperty ServiceProperty {{ get; internal set; }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} + public interface IServiceProperty {{ }} +}}"; + + return TestPass(source); + } + + [Fact] + public Task ConstructionAndMultiplePropertyInjection() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + + [DependencyInjectionProperty] + public IServiceProperty1 ServiceProperty1 {{ get; set; }} + + [DependencyInjectionProperty] + public IServiceProperty2 ServiceProperty2 {{ get; set; }} + + [DependencyInjectionProperty] + internal IServiceProperty3 ServiceProperty3 {{ get; set; }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} + public interface IServiceProperty1 {{ }} + public interface IServiceProperty2 {{ }} + public interface IServiceProperty3 {{ }} +}}"; + + return TestPass(source); + } + + [Fact] + public Task MultipleConstructorWithoutAttributeFail() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + + public TestConcrete(IService1 service1) + {{ + }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} +}}"; + + return TestFail(source); + } + + [Fact] + public Task MultipleConstructorWithAttribute() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + + [DependencyInjectionConstructor] + public TestConcrete(IService1 service1) + {{ + }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} +}}"; + + return TestPass(source); + } + + [Fact] + public Task MultipleConstructorWithMultipleAttributesFail() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + [DependencyInjectionConstructor] + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + + [DependencyInjectionConstructor] + public TestConcrete(IService1 service1) + {{ + }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} +}}"; + + return TestFail(source); + } + + [Fact] + public Task EmptyConstructor() + { + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest {{ }} +}}"; + + return TestPass(source); + } + + protected Task TestFail(string source, [CallerFilePath] string file = "") + { + var utility = new SourceGeneratorUtility(x => TestOutputHelper.WriteLine(x)); + + GeneratorDriver? driver = null; + + Assert.Throws(() => utility.RunGenerator(EventCompiler, out var _, out var _, out driver, source)); + + return Verifier.Verify(driver, sourceFile: file); + } + + protected Task TestPass(string source, [CallerFilePath] string file = "") + { + var utility = new SourceGeneratorUtility(x => TestOutputHelper.WriteLine(x)); + + utility.RunGenerator(EventCompiler, out var _, out var _, out var driver, source); + + return Verifier.Verify(driver, sourceFile: file); + } + + protected virtual void Dispose(bool isDisposing) + { + if (isDisposing) + { + EventCompiler?.Dispose(); + } + } + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/Constants.cs b/src/Splat.DependencyInjection.SourceGenerator/Constants.cs new file mode 100644 index 0000000..3fe060b --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/Constants.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Splat.DependencyInjection.SourceGenerator +{ + internal static class Constants + { + public const string ClassName = "SplatRegistrations"; + public const string NamespaceName = "Splat"; + public const string Locator = "Splat.Locator"; + + public static readonly string ExtensionMethodText = @$" +// +namespace {NamespaceName} +{{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class {ClassName} + {{ + /// + /// Registers a class with its concrete class. + /// + public static void Register() + {{ + }} + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + {{ + }} + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + {{ + }} + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + {{ + }} + }} + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + {{ + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + {{ + }} + }} + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + {{ + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + {{ + }} + }} +}}"; + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs b/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs new file mode 100644 index 0000000..4935842 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs @@ -0,0 +1,44 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using Microsoft.CodeAnalysis; + +namespace Splat.DependencyInjection.SourceGenerator +{ + internal static class DiagnosticWarnings + { + internal static readonly DiagnosticDescriptor ExpressionMustBeInline = new( + id: "SPLATDI001", + title: "Can't find valid constructor", + messageFormat: "There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute", + category: "Compiler", + defaultSeverity: DiagnosticSeverity.Error, + isEnabledByDefault: true); + + internal static readonly DiagnosticDescriptor PropertyMustPublicBeSettable = new( + id: "SPLATDI002", + title: "Property must be public/internal settable", + messageFormat: "DependencyInjectionPropertyAttribute property must have a public or internal setter", + category: "Compiler", + defaultSeverity: DiagnosticSeverity.Error, + isEnabledByDefault: true); + + internal static readonly DiagnosticDescriptor MultipleConstructorsMarked = new( + id: "SPLATDI003", + title: "Multiple constructors have DependencyInjectionConstructorAttribute", + messageFormat: "One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute", + category: "Compiler", + defaultSeverity: DiagnosticSeverity.Error, + isEnabledByDefault: true); + + internal static readonly DiagnosticDescriptor ConstructorsMustBePublic = new( + id: "SPLATDI004", + title: "Constructors not public or internal", + messageFormat: "Constructor declared with DependencyInjectionConstructorAttribute attribute must be public or internal", + category: "Compiler", + defaultSeverity: DiagnosticSeverity.Error, + isEnabledByDefault: true); + + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/Generator.cs b/src/Splat.DependencyInjection.SourceGenerator/Generator.cs new file mode 100644 index 0000000..a55ac22 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/Generator.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Text; + +using ReactiveMarbles.RoslynHelpers; + +namespace Splat.DependencyInjection.SourceGenerator +{ + /// + /// The main generator instance. + /// + [Generator] + public class Generator : ISourceGenerator + { + public void Execute(GeneratorExecutionContext context) + { + // add the attribute text. + context.AddSource("Splat.DI.Extensions.SourceGenerated.cs", SourceText.From(Constants.ExtensionMethodText, Encoding.UTF8)); + + if (context.SyntaxReceiver is not SyntaxReceiver syntaxReceiver) + { + return; + } + + var compilation = context.Compilation; + + var options = (compilation as CSharpCompilation)?.SyntaxTrees.FirstOrDefault()?.Options as CSharpParseOptions; + compilation = context.Compilation.AddSyntaxTrees(CSharpSyntaxTree.ParseText(SourceText.From(Constants.ExtensionMethodText, Encoding.UTF8), options ?? new CSharpParseOptions())); + + var outputText = SourceGeneratorHelpers.Generate(context, compilation, syntaxReceiver); + + context.AddSource("Splat.DI.Extensions.Registrations.SourceGenerated.cs", SourceText.From(outputText, Encoding.UTF8)); + } + + public void Initialize(GeneratorInitializationContext context) => context.RegisterForSyntaxNotifications(() => new SyntaxReceiver()); + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/SourceGeneratorHelpers.cs b/src/Splat.DependencyInjection.SourceGenerator/SourceGeneratorHelpers.cs new file mode 100644 index 0000000..946a396 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/SourceGeneratorHelpers.cs @@ -0,0 +1,229 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis; +using ReactiveMarbles.RoslynHelpers; +using System.Linq; + +using static ReactiveMarbles.RoslynHelpers.SyntaxFactoryHelpers; +using System.Linq.Expressions; + +namespace Splat.DependencyInjection.SourceGenerator +{ + internal static class SourceGeneratorHelpers + { + private const string RegisterMethodName = "Register"; + private const string LocatorName = "Splat.Locator.CurrentMutable"; + private const string ConstructorAttribute = "global::Splat.DependencyInjectionConstructorAttribute"; + private const string PropertyAttribute = "global::Splat.DependencyInjectionPropertyAttribute"; + + public static string Generate(GeneratorExecutionContext context, Compilation compilation, SyntaxReceiver syntaxReceiver) + { + var invocations = new List(); + + invocations.AddRange(syntaxReceiver.Register.SelectMany(x => Generate(context, compilation, x, false))); + invocations.AddRange(syntaxReceiver.RegisterLazySingleton.SelectMany(x => Generate(context, compilation, x, true))); + + var staticConstructor = ConstructorDeclaration(default, new[] { SyntaxKind.StaticKeyword }, Array.Empty(), Constants.ClassName, Block(invocations, 2), 1); + + var registrationClass = ClassDeclaration(Constants.ClassName, new[] { SyntaxKind.InternalKeyword, SyntaxKind.StaticKeyword, SyntaxKind.PartialKeyword }, new[] { staticConstructor }, 1); + + var namespaceDeclaration = NamespaceDeclaration(Constants.NamespaceName, new[] { registrationClass }, false); + + var compilationUnit = CompilationUnit(default, new[] { namespaceDeclaration }, Array.Empty()); + + return compilationUnit.ToFullString(); + } + + public static IEnumerable Generate(GeneratorExecutionContext context, Compilation compilation, InvocationExpressionSyntax invocationExpression, bool isLazy) + { + var semanticModel = compilation.GetSemanticModel(invocationExpression.SyntaxTree); + + if (semanticModel.GetSymbolInfo(invocationExpression).Symbol is not IMethodSymbol methodSymbol) + { + // Produce a diagnostic error. + yield break; + } + + if (methodSymbol.TypeParameters.Length != 2) + { + yield break; + } + + if (methodSymbol.IsExtensionMethod) + { + yield break; + } + + if (methodSymbol.Parameters.Length > 2) + { + yield break; + } + + var interfaceTarget = methodSymbol.TypeArguments[0]; + var concreteTarget = methodSymbol.TypeArguments[1]; + + if (interfaceTarget is null || concreteTarget is null) + { + yield break; + } + + var concreteTargetTypeName = concreteTarget.ToDisplayString(RoslynCommonHelpers.TypeFormat); + var interfaceTargetTypeName = interfaceTarget.ToDisplayString(RoslynCommonHelpers.TypeFormat); + + var constructor = GetConstructor(concreteTarget, context, invocationExpression); + + if (constructor is null) + { + yield break; + } + + var typeConstructorArguments = new List(); + + foreach (var parameter in constructor.Parameters) + { + var parameterType = parameter.Type; + var parameterTypeName = parameterType.ToDisplayString(RoslynCommonHelpers.TypeFormat); + + typeConstructorArguments.Add(Argument(GetSplatService(parameterTypeName))); + } + + InitializerExpressionSyntax? initializer = GetPropertyInitializer(concreteTarget, context); + + ExpressionSyntax call = initializer is null ? + ObjectCreationExpression(concreteTargetTypeName, typeConstructorArguments) : + ObjectCreationExpression(concreteTargetTypeName, typeConstructorArguments, initializer); + + if (isLazy) + { + var lazyType = $"System.Lazy<{concreteTargetTypeName}>"; + const string lazyVariableName = "lazy"; + + var block = Block(new StatementSyntax[] + { + LocalDeclarationStatement( + VariableDeclaration( + lazyType, + new[] + { + VariableDeclarator( + lazyVariableName, + EqualsValueClause( + ObjectCreationExpression( + lazyType, + new[] + { + Argument(ParenthesizedLambdaExpression(call)) + }))) + })), + ExpressionStatement(InvocationExpression( + MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, LocatorName, RegisterMethodName), + new[] + { + Argument(ParenthesizedLambdaExpression(MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, lazyVariableName, "Value"))), + Argument($"typeof({interfaceTargetTypeName})") + })), + }, + 3); + + yield return block; + } + else + { + yield return ExpressionStatement( + InvocationExpression( + MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, LocatorName, RegisterMethodName), + new[] + { + Argument(ParenthesizedLambdaExpression(call)), + Argument($"typeof({interfaceTargetTypeName})") + })); + } + } + + private static IMethodSymbol? GetConstructor(ITypeSymbol concreteTarget, GeneratorExecutionContext context, InvocationExpressionSyntax invocationExpression) + { + var constructors = concreteTarget + .GetMembers() + .Where(x => x.Kind == SymbolKind.Method) + .Cast() + .Where(x => x.MethodKind == MethodKind.Constructor) + .ToList(); + + IMethodSymbol? returnConstructor = null; + + if (constructors.Count == 1) + { + returnConstructor = constructors[0]; + } + else + { + foreach (var constructor in constructors) + { + if (constructor.GetAttributes().Any(x => x.AttributeClass?.ToDisplayString(RoslynCommonHelpers.TypeFormat) == ConstructorAttribute)) + { + if (returnConstructor != null) + { + context.ReportDiagnostic(Diagnostic.Create(DiagnosticWarnings.MultipleConstructorsMarked, constructor.Locations.FirstOrDefault())); + return null; + } + + returnConstructor = constructor; + } + } + } + + if (returnConstructor is null) + { + context.ReportDiagnostic(Diagnostic.Create(DiagnosticWarnings.ExpressionMustBeInline, location: invocationExpression.GetLocation())); + return null; + } + + + if (returnConstructor.DeclaredAccessibility < Accessibility.Internal) + { + context.ReportDiagnostic(Diagnostic.Create(DiagnosticWarnings.ConstructorsMustBePublic, returnConstructor.Locations.FirstOrDefault())); + return null; + } + + return returnConstructor; + } + + private static InitializerExpressionSyntax? GetPropertyInitializer(ITypeSymbol concreteTarget, GeneratorExecutionContext context) + { + var propertySet = new List(); + foreach (var property in GetInitializeProperties(concreteTarget)) + { + if (property.SetMethod?.DeclaredAccessibility < Accessibility.Internal) + { + context.ReportDiagnostic(Diagnostic.Create(DiagnosticWarnings.PropertyMustPublicBeSettable, property.SetMethod?.Locations.FirstOrDefault())); + } + + propertySet.Add(AssignmentExpression(SyntaxKind.SimpleAssignmentExpression, property.Name, GetSplatService(property.Type.ToDisplayString(RoslynCommonHelpers.TypeFormat)))); + } + + return propertySet.Count > 0 ? InitializerExpression(SyntaxKind.ObjectInitializerExpression, propertySet) : null; + } + + private static IEnumerable GetInitializeProperties(ITypeSymbol concreteTarget) => + concreteTarget + .GetBaseTypesAndThis() + .SelectMany(x => x.GetMembers()) + .Where(x => x.Kind == SymbolKind.Property) + .Cast() + .Where(x => x.GetAttributes().Any(attr => attr.AttributeClass?.ToDisplayString(RoslynCommonHelpers.TypeFormat) == PropertyAttribute)); + + private static CastExpressionSyntax GetSplatService(string parameterTypeName) => + CastExpression( + parameterTypeName, + InvocationExpression( + MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, "Splat.Locator.Current", "GetService"), + new[] + { + Argument($"typeof({parameterTypeName})"), + })); + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/Splat.DependencyInjection.SourceGenerator.csproj b/src/Splat.DependencyInjection.SourceGenerator/Splat.DependencyInjection.SourceGenerator.csproj new file mode 100644 index 0000000..e023cfa --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/Splat.DependencyInjection.SourceGenerator.csproj @@ -0,0 +1,26 @@ + + + netstandard2.0 + enable + latest + true + false + + true + Produces DI registration for both property and constructor injection using the Splat locators. + $(TargetsForTfmSpecificContentInPackage);PackBuildOutputs + $(NoWarn);AD0001 + + + + + + + + + + + + + + diff --git a/src/Splat.DependencyInjection.SourceGenerator/SyntaxReceiver.cs b/src/Splat.DependencyInjection.SourceGenerator/SyntaxReceiver.cs new file mode 100644 index 0000000..9cf058b --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/SyntaxReceiver.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text; + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Splat.DependencyInjection.SourceGenerator +{ + internal class SyntaxReceiver : ISyntaxReceiver + { + public List Register { get; } = new List(); + + public List RegisterLazySingleton { get; } = new List(); + + public void OnVisitSyntaxNode(SyntaxNode syntaxNode) + { + if (syntaxNode is not InvocationExpressionSyntax invocationExpression) + { + return; + } + + if (invocationExpression.Expression is MemberAccessExpressionSyntax memberAccess) + { + HandleSimpleName(memberAccess.Name, invocationExpression); + + } + + if (invocationExpression.Expression is MemberBindingExpressionSyntax bindingAccess) + { + HandleSimpleName(bindingAccess.Name, invocationExpression); + } + } + + private void HandleSimpleName(SimpleNameSyntax simpleName, InvocationExpressionSyntax invocationExpression) + { + if (simpleName is null) + { + return; + } + + var methodName = simpleName.Identifier.Text; + + if (string.Equals(methodName, nameof(Register))) + { + Register.Add(invocationExpression); + } + + if (string.Equals(methodName, nameof(RegisterLazySingleton))) + { + RegisterLazySingleton.Add(invocationExpression); + } + } + } +} diff --git a/version.json b/version.json new file mode 100644 index 0000000..ffd1721 --- /dev/null +++ b/version.json @@ -0,0 +1,16 @@ +{ + "version": "1.0", + "publicReleaseRefSpec": [ + "^refs/heads/master$", + "^refs/heads/main$" + ], + "nugetPackageVersion":{ + "semVer": 2 + }, + "cloudBuild": { + "setVersionVariables": true, + "buildNumber": { + "enabled": false + } + } +} From e05706ade245680583741d8326eac21600789c29 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Tue, 13 Jul 2021 15:03:03 +1000 Subject: [PATCH 2/4] Initial version --- src/Directory.Build.props | 51 +++ src/Directory.build.targets | 30 ++ src/Splat.DI.SourceGenerator.sln | 14 +- .../ModuleInitializer.cs | 9 +- ...ncyFail_contractParameter=.00.verified.txt | 22 ++ ...ncyFail_contractParameter=.01.verified.cs} | 17 + ...ncyFail_contractParameter=.02.verified.cs} | 0 ...il_contractParameter=Test1.00.verified.txt | 22 ++ ...il_contractParameter=Test1.01.verified.cs} | 17 + ...il_contractParameter=Test1.02.verified.cs} | 0 ...il_contractParameter=Test2.00.verified.txt | 22 ++ ...il_contractParameter=Test2.01.verified.cs} | 17 + ...ail_contractParameter=Test2.02.verified.cs | 10 + ...yFailcontractParameterTest1.02.verified.cs | 10 + ...jection_contractParameter=.00.verified.cs} | 17 + ...njection_contractParameter=.01.verified.cs | 15 + ...ion_contractParameter=Test1.00.verified.cs | 86 +++++ ...ion_contractParameter=Test1.01.verified.cs | 15 + ...ion_contractParameter=Test2.00.verified.cs | 86 +++++ ...ion_contractParameter=Test2.01.verified.cs | 15 + ...njection_contractParameter=.00.verified.cs | 86 +++++ ...njection_contractParameter=.01.verified.cs | 15 + ...ion_contractParameter=Test1.00.verified.cs | 86 +++++ ...ion_contractParameter=Test1.01.verified.cs | 15 + ...ion_contractParameter=Test2.00.verified.cs | 86 +++++ ...ion_contractParameter=Test2.01.verified.cs | 15 + ...act=ExecutionAndPublication.00.verified.cs | 86 +++++ ...act=ExecutionAndPublication.01.verified.cs | 15 + ...de_mode=Test1_contract=None.00.verified.cs | 86 +++++ ...de_mode=Test1_contract=None.01.verified.cs | 15 + ...t1_contract=PublicationOnly.00.verified.cs | 86 +++++ ...t1_contract=PublicationOnly.01.verified.cs | 15 + ...act=ExecutionAndPublication.00.verified.cs | 86 +++++ ...act=ExecutionAndPublication.01.verified.cs | 15 + ...de_mode=Test2_contract=None.00.verified.cs | 86 +++++ ...de_mode=Test2_contract=None.01.verified.cs | 15 + ...t2_contract=PublicationOnly.00.verified.cs | 86 +++++ ...t2_contract=PublicationOnly.01.verified.cs | 15 + ...act=ExecutionAndPublication.00.verified.cs | 86 +++++ ...act=ExecutionAndPublication.01.verified.cs | 15 + ...azyMode_mode=_contract=None.00.verified.cs | 86 +++++ ...azyMode_mode=_contract=None.01.verified.cs | 15 + ...e=_contract=PublicationOnly.00.verified.cs | 86 +++++ ...e=_contract=PublicationOnly.01.verified.cs | 15 + ...njection_contractParameter=.00.verified.cs | 86 +++++ ...njection_contractParameter=.01.verified.cs | 15 + ...ion_contractParameter=Test1.00.verified.cs | 86 +++++ ...ion_contractParameter=Test1.01.verified.cs | 15 + ...ion_contractParameter=Test2.00.verified.cs | 86 +++++ ...ion_contractParameter=Test2.01.verified.cs | 15 + ...onFail_contractParameter=.00.verified.txt} | 0 ...tionFail_contractParameter=.01.verified.cs | 86 +++++ ...tionFail_contractParameter=.02.verified.cs | 10 + ...il_contractParameter=Test1.00.verified.txt | 13 + ...ail_contractParameter=Test1.01.verified.cs | 86 +++++ ...ail_contractParameter=Test1.02.verified.cs | 10 + ...il_contractParameter=Test2.00.verified.txt | 13 + ...ail_contractParameter=Test2.01.verified.cs | 86 +++++ ...ail_contractParameter=Test2.02.verified.cs | 10 + ...onFail_contractParameter=.00.verified.txt} | 0 ...tionFail_contractParameter=.01.verified.cs | 86 +++++ ...tionFail_contractParameter=.02.verified.cs | 10 + ...il_contractParameter=Test1.00.verified.txt | 13 + ...ail_contractParameter=Test1.01.verified.cs | 86 +++++ ...ail_contractParameter=Test1.02.verified.cs | 10 + ...il_contractParameter=Test2.00.verified.txt | 13 + ...ail_contractParameter=Test2.01.verified.cs | 86 +++++ ...ail_contractParameter=Test2.02.verified.cs | 10 + ...njection_contractParameter=.00.verified.cs | 86 +++++ ...njection_contractParameter=.01.verified.cs | 15 + ...ion_contractParameter=Test1.00.verified.cs | 86 +++++ ...ion_contractParameter=Test1.01.verified.cs | 15 + ...ion_contractParameter=Test2.00.verified.cs | 86 +++++ ...ion_contractParameter=Test2.01.verified.cs | 15 + ...ests.ConstructionInjection.01.verified.txt | 1 - ...njection_contractParameter=.00.verified.cs | 86 +++++ ...njection_contractParameter=.01.verified.cs | 15 + ...ion_contractParameter=Test1.00.verified.cs | 86 +++++ ...ion_contractParameter=Test1.01.verified.cs | 15 + ...ion_contractParameter=Test2.00.verified.cs | 86 +++++ ...ion_contractParameter=Test2.01.verified.cs | 15 + ...etonTests.EmptyConstructor.00.verified.txt | 1 - ...etonTests.EmptyConstructor.01.received.txt | 10 - ...etonTests.EmptyConstructor.01.verified.txt | 1 - ...ingletonTests.EmptyConstructor.verified.cs | 86 +++++ ...structor_contractParameter=.00.verified.cs | 86 +++++ ...tructor_contractParameter=.01.verified.cs} | 3 +- ...tor_contractParameter=Test1.00.verified.cs | 86 +++++ ...tor_contractParameter=Test1.01.verified.cs | 15 + ...tor_contractParameter=Test2.00.verified.cs | 86 +++++ ...tor_contractParameter=Test2.01.verified.cs | 15 + ...trations_contractParameter=.00.verified.cs | 86 +++++ ...trations_contractParameter=.01.verified.cs | 25 ++ ...ons_contractParameter=Test1.00.verified.cs | 86 +++++ ...ons_contractParameter=Test1.01.verified.cs | 25 ++ ...ons_contractParameter=Test2.00.verified.cs | 86 +++++ ...ons_contractParameter=Test2.01.verified.cs | 25 ++ ...ttribute_contractParameter=.00.verified.cs | 86 +++++ ...ttribute_contractParameter=.01.verified.cs | 15 + ...ute_contractParameter=Test1.00.verified.cs | 86 +++++ ...ute_contractParameter=Test1.01.verified.cs | 15 + ...ute_contractParameter=Test2.00.verified.cs | 86 +++++ ...ute_contractParameter=Test2.01.verified.cs | 15 + ...esFail_contractParameter=.00.verified.txt} | 0 ...utesFail_contractParameter=.01.verified.cs | 86 +++++ ...utesFail_contractParameter=.02.verified.cs | 10 + ...il_contractParameter=Test1.00.verified.txt | 13 + ...ail_contractParameter=Test1.01.verified.cs | 86 +++++ ...ail_contractParameter=Test1.02.verified.cs | 10 + ...il_contractParameter=Test2.00.verified.txt | 13 + ...ail_contractParameter=Test2.01.verified.cs | 86 +++++ ...ail_contractParameter=Test2.02.verified.cs | 10 + ...uteFail_contractParameter=.00.verified.txt | 13 + ...buteFail_contractParameter=.01.verified.cs | 86 +++++ ...buteFail_contractParameter=.02.verified.cs | 10 + ...il_contractParameter=Test1.00.verified.txt | 13 + ...ail_contractParameter=Test1.01.verified.cs | 86 +++++ ...ail_contractParameter=Test1.02.verified.cs | 10 + ...il_contractParameter=Test2.00.verified.txt | 13 + ...ail_contractParameter=Test2.01.verified.cs | 86 +++++ ...ail_contractParameter=Test2.02.verified.cs | 10 + .../RegisterLazySingletonTests.cs | 77 ++++- ...ncyFail_contractParameter=.00.verified.txt | 22 ++ ...encyFail_contractParameter=.01.verified.cs | 86 +++++ ...encyFail_contractParameter=.02.verified.cs | 10 + ...il_contractParameter=Test1.00.verified.txt | 22 ++ ...ail_contractParameter=Test1.01.verified.cs | 86 +++++ ...ail_contractParameter=Test1.02.verified.cs | 10 + ...il_contractParameter=Test2.00.verified.txt | 22 ++ ...ail_contractParameter=Test2.01.verified.cs | 86 +++++ ...ail_contractParameter=Test2.02.verified.cs | 10 + ...njection_contractParameter=.00.verified.cs | 86 +++++ ...jection_contractParameter=.01.verified.cs} | 0 ...ion_contractParameter=Test1.00.verified.cs | 86 +++++ ...on_contractParameter=Test1.01.verified.cs} | 2 +- ...ion_contractParameter=Test2.00.verified.cs | 86 +++++ ...on_contractParameter=Test2.01.verified.cs} | 2 +- ...nalSetterPropertyInjection.00.verified.txt | 69 ----- ...njection_contractParameter=.00.verified.cs | 86 +++++ ...jection_contractParameter=.01.verified.cs} | 0 ...ion_contractParameter=Test1.00.verified.cs | 86 +++++ ...ion_contractParameter=Test1.01.verified.cs | 11 + ...ion_contractParameter=Test2.00.verified.cs | 86 +++++ ...ion_contractParameter=Test2.01.verified.cs | 11 + ...dMultiplePropertyInjection.00.verified.txt | 69 ----- ...njection_contractParameter=.00.verified.cs | 86 +++++ ...jection_contractParameter=.01.verified.cs} | 0 ...ion_contractParameter=Test1.00.verified.cs | 86 +++++ ...ion_contractParameter=Test1.01.verified.cs | 11 + ...ion_contractParameter=Test2.00.verified.cs | 86 +++++ ...ion_contractParameter=Test2.01.verified.cs | 11 + ...ublicPropertyInjectionFail.01.verified.txt | 69 ----- ...ionFail_contractParameter=.00.verified.txt | 13 + ...tionFail_contractParameter=.01.verified.cs | 86 +++++ ...tionFail_contractParameter=.02.verified.cs | 10 + ...il_contractParameter=Test1.00.verified.txt | 13 + ...ail_contractParameter=Test1.01.verified.cs | 86 +++++ ...ail_contractParameter=Test1.02.verified.cs | 10 + ...il_contractParameter=Test2.00.verified.txt | 13 + ...ail_contractParameter=Test2.01.verified.cs | 86 +++++ ...ail_contractParameter=Test2.02.verified.cs | 10 + ...ropertySetterInjectionFail.01.verified.txt | 69 ----- ...ionFail_contractParameter=.00.verified.txt | 13 + ...tionFail_contractParameter=.01.verified.cs | 86 +++++ ...tionFail_contractParameter=.02.verified.cs | 10 + ...il_contractParameter=Test1.00.verified.txt | 13 + ...ail_contractParameter=Test1.01.verified.cs | 86 +++++ ...ail_contractParameter=Test1.02.verified.cs | 10 + ...il_contractParameter=Test2.00.verified.txt | 13 + ...ail_contractParameter=Test2.01.verified.cs | 86 +++++ ...ail_contractParameter=Test2.02.verified.cs | 10 + ...uctionAndPropertyInjection.00.verified.txt | 69 ----- ...njection_contractParameter=.00.verified.cs | 86 +++++ ...jection_contractParameter=.01.verified.cs} | 0 ...ion_contractParameter=Test1.00.verified.cs | 86 +++++ ...ion_contractParameter=Test1.01.verified.cs | 11 + ...ion_contractParameter=Test2.00.verified.cs | 86 +++++ ...ion_contractParameter=Test2.01.verified.cs | 11 + ...ests.ConstructionInjection.00.verified.txt | 69 ----- ...njection_contractParameter=.00.verified.cs | 86 +++++ ...jection_contractParameter=.01.verified.cs} | 0 ...ion_contractParameter=Test1.00.verified.cs | 86 +++++ ...ion_contractParameter=Test1.01.verified.cs | 11 + ...ion_contractParameter=Test2.00.verified.cs | 86 +++++ ...ion_contractParameter=Test2.01.verified.cs | 11 + ...sterTests.EmptyConstructor.00.verified.txt | 69 ----- ...structor_contractParameter=.00.verified.cs | 86 +++++ ...tructor_contractParameter=.01.verified.cs} | 0 ...tor_contractParameter=Test1.00.verified.cs | 86 +++++ ...tor_contractParameter=Test1.01.verified.cs | 11 + ...tor_contractParameter=Test2.00.verified.cs | 86 +++++ ...tor_contractParameter=Test2.01.verified.cs | 11 + ...trations_contractParameter=.00.verified.cs | 86 +++++ ...trations_contractParameter=.01.verified.cs | 13 + ...ons_contractParameter=Test1.00.verified.cs | 86 +++++ ...ons_contractParameter=Test1.01.verified.cs | 13 + ...ons_contractParameter=Test2.00.verified.cs | 86 +++++ ...ons_contractParameter=Test2.01.verified.cs | 13 + ...leConstructorWithAttribute.00.verified.txt | 69 ----- ...ttribute_contractParameter=.00.verified.cs | 86 +++++ ...tribute_contractParameter=.01.verified.cs} | 0 ...ute_contractParameter=Test1.00.verified.cs | 86 +++++ ...ute_contractParameter=Test1.01.verified.cs | 11 + ...ute_contractParameter=Test2.00.verified.cs | 86 +++++ ...ute_contractParameter=Test2.01.verified.cs | 11 + ...WithMultipleAttributesFail.01.verified.txt | 69 ----- ...tesFail_contractParameter=.00.verified.txt | 13 + ...utesFail_contractParameter=.01.verified.cs | 86 +++++ ...utesFail_contractParameter=.02.verified.cs | 10 + ...il_contractParameter=Test1.00.verified.txt | 13 + ...ail_contractParameter=Test1.01.verified.cs | 86 +++++ ...ail_contractParameter=Test1.02.verified.cs | 10 + ...il_contractParameter=Test2.00.verified.txt | 13 + ...ail_contractParameter=Test2.01.verified.cs | 86 +++++ ...ail_contractParameter=Test2.02.verified.cs | 10 + ...ructorWithoutAttributeFail.01.verified.txt | 69 ----- ...teFail_contractParameter=.00.verified.txt} | 0 ...buteFail_contractParameter=.01.verified.cs | 86 +++++ ...buteFail_contractParameter=.02.verified.cs | 10 + ...il_contractParameter=Test1.00.verified.txt | 13 + ...ail_contractParameter=Test1.01.verified.cs | 86 +++++ ...ail_contractParameter=Test1.02.verified.cs | 10 + ...il_contractParameter=Test2.00.verified.txt | 13 + ...ail_contractParameter=Test2.01.verified.cs | 86 +++++ ...ail_contractParameter=Test2.02.verified.cs | 10 + .../RegisterTests.cs | 6 +- ...encyInjection.SourceGenerator.Tests.csproj | 8 +- .../TestBase.cs | 293 ++++++++++++++---- .../Constants.cs | 30 +- .../ContextDiagnosticException.cs | 29 ++ .../DiagnosticWarnings.cs | 7 + .../Generator.cs | 12 +- .../IsExternalInit.cs | 17 + .../Metadata/ConstructorDependencyMetadata.cs | 10 + .../Metadata/DependencyMetadata.cs | 23 ++ .../Metadata/MethodMetadata.cs | 50 +++ .../Metadata/ParameterMetadata.cs | 12 + .../Metadata/PropertyDependencyMetadata.cs | 23 ++ .../Metadata/RegisterLazySingletonMetadata.cs | 14 + .../Metadata/RegisterMetadata.cs | 14 + .../MetadataDependencyChecker.cs | 51 +++ .../MetadataExtractor.cs | 184 +++++++++++ .../SourceGeneratorHelpers.cs | 266 +++++++--------- .../SyntaxReceiver.cs | 10 +- src/stylecop.json | 41 +++ 245 files changed, 9695 insertions(+), 951 deletions(-) create mode 100644 src/Directory.Build.props create mode 100644 src/Directory.build.targets create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.00.verified.txt rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterLazySingletonTests.ConstructionInjection.00.received.txt => RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.01.verified.cs} (75%) rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.MultipleConstructorWithMultipleAttributesFail.02.verified.txt => RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.02.verified.cs} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.00.verified.txt rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterLazySingletonTests.ConstructionInjection.00.verified.txt => RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.01.verified.cs} (75%) rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.MultipleConstructorWithoutAttributeFail.02.verified.txt => RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.02.verified.cs} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.00.verified.txt rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterLazySingletonTests.EmptyConstructor.00.received.txt => RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.01.verified.cs} (75%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFailcontractParameterTest1.02.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.ConstructionAndInternalPropertyInjection.00.verified.txt => RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=.00.verified.cs} (75%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=ExecutionAndPublication.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=ExecutionAndPublication.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=None.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=None.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=PublicationOnly.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=PublicationOnly.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=ExecutionAndPublication.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=ExecutionAndPublication.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=None.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=None.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=PublicationOnly.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=PublicationOnly.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=ExecutionAndPublication.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=ExecutionAndPublication.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=None.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=None.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=PublicationOnly.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=PublicationOnly.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.01.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.00.verified.txt => RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.02.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.00.verified.txt => RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test2.01.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test2.01.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.verified.txt delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.received.txt delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=.00.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterLazySingletonTests.ConstructionInjection.01.received.txt => RegisterLazySingletonTests.EmptyConstructor_contractParameter=.01.verified.cs} (51%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test2.01.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.MultipleConstructorWithMultipleAttributesFail.00.verified.txt => RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=.00.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.ConstructionAndInternalPropertyInjection.01.verified.txt => RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=.01.verified.cs} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.00.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.02.verified.txt => RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.01.verified.cs} (93%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.00.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.ConstructionAndPropertyInjection.01.verified.txt => RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.01.verified.cs} (93%) delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.00.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.ConstructionAndInternalSetterPropertyInjection.01.verified.txt => RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.01.verified.cs} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.01.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=.00.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.ConstructionAndMultiplePropertyInjection.01.verified.txt => RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=.01.verified.cs} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.01.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.02.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.02.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=.00.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.02.verified.txt => RegisterTests.ConstructionAndPropertyInjection_contractParameter=.01.verified.cs} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test2.01.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=.00.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.ConstructionInjection.01.verified.txt => RegisterTests.ConstructionInjection_contractParameter=.01.verified.cs} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test2.01.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=.00.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.EmptyConstructor.01.verified.txt => RegisterTests.EmptyConstructor_contractParameter=.01.verified.cs} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test2.01.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=.00.verified.cs rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.MultipleConstructorWithAttribute.01.verified.txt => RegisterTests.MultipleConstructorWithAttribute_contractParameter=.01.verified.cs} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test1.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test2.00.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test2.01.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.01.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.02.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.01.verified.txt rename src/Splat.DependencyInjection.SourceGenerator.Tests/{RegisterTests.MultipleConstructorWithoutAttributeFail.00.verified.txt => RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt} (100%) create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.01.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.02.verified.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/ContextDiagnosticException.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/IsExternalInit.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/Metadata/ConstructorDependencyMetadata.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/Metadata/DependencyMetadata.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/Metadata/MethodMetadata.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/Metadata/ParameterMetadata.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/Metadata/PropertyDependencyMetadata.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/Metadata/RegisterLazySingletonMetadata.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/Metadata/RegisterMetadata.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/MetadataDependencyChecker.cs create mode 100644 src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs create mode 100644 src/stylecop.json diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 0000000..57b5a91 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,51 @@ + + + true + AnyCPU + $(MSBuildProjectName.Contains('Tests')) + embedded + Glenn Watson + Copyright (c) 2021 ReactiveUI Association Inc + MIT + https://github.com/reactivemarbles/ObservableEvents + Generates source for Splat dependency injection registrations with constructor and property injection. + glennawatson + system.reactive;splat;dependency injection + https://github.com/reactivemarbles/Splat.DI.SourceGenerator/releases + https://github.com/reactivemarbles/Splat.DI.SourceGenerator + https://github.com/reactiveui/styleguide/blob/master/logo_splat/logo.png?raw=true + git + + + true + + true + + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + + + + + + + + $(MSBuildThisFileDirectory) + + + + + + + + + + + + + + + + + + + diff --git a/src/Directory.build.targets b/src/Directory.build.targets new file mode 100644 index 0000000..9e43ace --- /dev/null +++ b/src/Directory.build.targets @@ -0,0 +1,30 @@ + + + $(AssemblyName) ($(TargetFramework)) + + + + $(DefineConstants);NET_45;XAML + + + $(DefineConstants);NETFX_CORE;XAML;WINDOWS_UWP + + + $(DefineConstants);MONO;UIKIT;COCOA + + + $(DefineConstants);MONO;COCOA + + + $(DefineConstants);MONO;UIKIT;COCOA + + + $(DefineConstants);MONO;UIKIT;COCOA + + + $(DefineConstants);MONO;ANDROID + + + $(DefineConstants);TIZEN + + diff --git a/src/Splat.DI.SourceGenerator.sln b/src/Splat.DI.SourceGenerator.sln index b42d03a..daa480c 100644 --- a/src/Splat.DI.SourceGenerator.sln +++ b/src/Splat.DI.SourceGenerator.sln @@ -5,7 +5,19 @@ VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Splat.DependencyInjection.SourceGenerator", "Splat.DependencyInjection.SourceGenerator\Splat.DependencyInjection.SourceGenerator.csproj", "{3BD91F34-54B0-4E7C-B933-D16C0A054FE9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Splat.DependencyInjection.SourceGenerator.Tests", "Splat.DependencyInjection.SourceGenerator.Tests\Splat.DependencyInjection.SourceGenerator.Tests.csproj", "{09554D3F-6277-479E-BBA6-3E4806C7ED85}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Splat.DependencyInjection.SourceGenerator.Tests", "Splat.DependencyInjection.SourceGenerator.Tests\Splat.DependencyInjection.SourceGenerator.Tests.csproj", "{09554D3F-6277-479E-BBA6-3E4806C7ED85}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{43FD3021-45AA-4849-BFD7-46363EE0C6B7}" + ProjectSection(SolutionItems) = preProject + ..\.editorconfig = ..\.editorconfig + ..\.gitignore = ..\.gitignore + Directory.Build.props = Directory.Build.props + Directory.build.targets = Directory.build.targets + ..\LICENSE = ..\LICENSE + ..\README.md = ..\README.md + stylecop.json = stylecop.json + ..\version.json = ..\version.json + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs index f824e25..45f8eb8 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs @@ -1,9 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; using VerifyTests; diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.00.verified.txt new file mode 100644 index 0000000..5ff3c3b --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.00.verified.txt @@ -0,0 +1,22 @@ +{ + Diagnostics: [ + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (26,36)-(26,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + }, + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (18,36)-(18,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.received.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.01.verified.cs similarity index 75% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.received.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.01.verified.cs index 26b04c7..2582669 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.received.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.01.verified.cs @@ -30,6 +30,14 @@ public static void RegisterLazySingleton() { } + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + /// /// Registers a class with its concrete class. /// @@ -37,6 +45,15 @@ public static void RegisterLazySingleton() public static void RegisterLazySingleton(string contract) { } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } } /// diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.02.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.02.verified.cs similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.02.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=.02.verified.cs diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.00.verified.txt new file mode 100644 index 0000000..5ff3c3b --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.00.verified.txt @@ -0,0 +1,22 @@ +{ + Diagnostics: [ + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (26,36)-(26,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + }, + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (18,36)-(18,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.01.verified.cs similarity index 75% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.01.verified.cs index 26b04c7..2582669 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.01.verified.cs @@ -30,6 +30,14 @@ public static void RegisterLazySingleton() { } + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + /// /// Registers a class with its concrete class. /// @@ -37,6 +45,15 @@ public static void RegisterLazySingleton() public static void RegisterLazySingleton(string contract) { } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } } /// diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.02.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.02.verified.cs similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.02.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test1.02.verified.cs diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.00.verified.txt new file mode 100644 index 0000000..5ff3c3b --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.00.verified.txt @@ -0,0 +1,22 @@ +{ + Diagnostics: [ + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (26,36)-(26,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + }, + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (18,36)-(18,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.received.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.01.verified.cs similarity index 75% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.received.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.01.verified.cs index 26b04c7..2582669 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.received.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.01.verified.cs @@ -30,6 +30,14 @@ public static void RegisterLazySingleton() { } + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + /// /// Registers a class with its concrete class. /// @@ -37,6 +45,15 @@ public static void RegisterLazySingleton() public static void RegisterLazySingleton(string contract) { } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } } /// diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_contractParameter=Test2.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFailcontractParameterTest1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFailcontractParameterTest1.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFailcontractParameterTest1.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=.00.verified.cs similarity index 75% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.00.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=.00.verified.cs index 26b04c7..2582669 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=.00.verified.cs @@ -30,6 +30,14 @@ public static void RegisterLazySingleton() { } + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + /// /// Registers a class with its concrete class. /// @@ -37,6 +45,15 @@ public static void RegisterLazySingleton() public static void RegisterLazySingleton(string contract) { } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } } /// diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=.01.verified.cs new file mode 100644 index 0000000..92a165a --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..99d6ed5 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..512c932 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.01.verified.cs new file mode 100644 index 0000000..92a165a --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..99d6ed5 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..512c932 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=ExecutionAndPublication.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=ExecutionAndPublication.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=ExecutionAndPublication.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=ExecutionAndPublication.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=ExecutionAndPublication.01.verified.cs new file mode 100644 index 0000000..168135e --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=ExecutionAndPublication.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , System.Threading.LazyThreadSafetyMode.ExecutionAndPublication); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=None.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=None.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=None.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=None.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=None.01.verified.cs new file mode 100644 index 0000000..f0985d1 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=None.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , System.Threading.LazyThreadSafetyMode.None); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=PublicationOnly.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=PublicationOnly.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=PublicationOnly.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=PublicationOnly.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=PublicationOnly.01.verified.cs new file mode 100644 index 0000000..747be38 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test1_contract=PublicationOnly.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , System.Threading.LazyThreadSafetyMode.PublicationOnly); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=ExecutionAndPublication.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=ExecutionAndPublication.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=ExecutionAndPublication.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=ExecutionAndPublication.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=ExecutionAndPublication.01.verified.cs new file mode 100644 index 0000000..3540434 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=ExecutionAndPublication.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , System.Threading.LazyThreadSafetyMode.ExecutionAndPublication); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=None.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=None.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=None.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=None.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=None.01.verified.cs new file mode 100644 index 0000000..cd9a00a --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=None.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , System.Threading.LazyThreadSafetyMode.None); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=PublicationOnly.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=PublicationOnly.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=PublicationOnly.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=PublicationOnly.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=PublicationOnly.01.verified.cs new file mode 100644 index 0000000..afe2103 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=Test2_contract=PublicationOnly.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , System.Threading.LazyThreadSafetyMode.PublicationOnly); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=ExecutionAndPublication.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=ExecutionAndPublication.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=ExecutionAndPublication.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=ExecutionAndPublication.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=ExecutionAndPublication.01.verified.cs new file mode 100644 index 0000000..36eb9e0 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=ExecutionAndPublication.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , System.Threading.LazyThreadSafetyMode.ExecutionAndPublication); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=None.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=None.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=None.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=None.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=None.01.verified.cs new file mode 100644 index 0000000..73eac31 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=None.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , System.Threading.LazyThreadSafetyMode.None); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=PublicationOnly.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=PublicationOnly.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=PublicationOnly.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=PublicationOnly.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=PublicationOnly.01.verified.cs new file mode 100644 index 0000000..401404e --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_mode=_contract=PublicationOnly.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , System.Threading.LazyThreadSafetyMode.PublicationOnly); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=.01.verified.cs new file mode 100644 index 0000000..04fcef3 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..159562b --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..05b9f2e --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.00.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt new file mode 100644 index 0000000..37d1b66 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,58)-(22,61), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt new file mode 100644 index 0000000..37d1b66 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,58)-(22,61), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.00.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt new file mode 100644 index 0000000..d52cc54 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,63)-(22,66), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt new file mode 100644 index 0000000..d52cc54 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,63)-(22,66), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=.01.verified.cs new file mode 100644 index 0000000..92a165a --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..99d6ed5 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test1.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..512c932 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndPropertyInjection_contractParameter=Test2.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} ); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.verified.txt deleted file mode 100644 index 5f28270..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.verified.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=.01.verified.cs new file mode 100644 index 0000000..ca10bac --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..f2bbcaf --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test1.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..77dab80 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection_contractParameter=Test2.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.verified.txt deleted file mode 100644 index 5f28270..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.00.verified.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.received.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.received.txt deleted file mode 100644 index 5d80dbc..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.received.txt +++ /dev/null @@ -1,10 +0,0 @@ -//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs -namespace Splat -{ - internal static partial class SplatRegistrations - { - static SplatRegistrations() - { - Splat.Locator.CurrentMutable.RegisterLazySingleton(() => new System.Lazy(() => new global::Test.TestConcrete()), typeof(global::Test.ITest)); - } - }} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.verified.txt deleted file mode 100644 index 5f28270..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.01.verified.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.received.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=.01.verified.cs similarity index 51% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.received.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=.01.verified.cs index 5d4efc6..86da015 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionInjection.01.received.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=.01.verified.cs @@ -6,7 +6,8 @@ internal static partial class SplatRegistrations static SplatRegistrations() { { - System.Lazy lazy = new System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete()); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); } } diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..3728558 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test1.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete()); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..f2d64c9 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor_contractParameter=Test2.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete()); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=.01.verified.cs new file mode 100644 index 0000000..9383e37 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=.01.verified.cs @@ -0,0 +1,25 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete1((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest1)); + } + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete2((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest2)); + } + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete3((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest3)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..b05f53b --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test1.01.verified.cs @@ -0,0 +1,25 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete1((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest1), "Test1"); + } + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete2((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest2), "Test1"); + } + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete3((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest3), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..a17b0d7 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultiClassesRegistrations_contractParameter=Test2.01.verified.cs @@ -0,0 +1,25 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete1((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest1), "Test2"); + } + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete2((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest2), "Test2"); + } + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete3((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest3), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=.01.verified.cs new file mode 100644 index 0000000..0fa4747 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy)); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest)); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..3e5b757 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test1.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test1"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..4935e9a --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithAttribute_contractParameter=Test2.01.verified.cs @@ -0,0 +1,15 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + { + global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)))); + Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2"); + Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.ITest), "Test2"); + } + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.00.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt new file mode 100644 index 0000000..f784ab8 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI003, + Title: Multiple constructors have DependencyInjectionConstructorAttribute, + Severity: Error, + WarningLevel: 0, + Location: : (23,15)-(23,27), + MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt new file mode 100644 index 0000000..f784ab8 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI003, + Title: Multiple constructors have DependencyInjectionConstructorAttribute, + Severity: Error, + WarningLevel: 0, + Location: : (23,15)-(23,27), + MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt new file mode 100644 index 0000000..45a9704 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI001, + Title: Can't find valid constructor, + Severity: Error, + WarningLevel: 0, + Location: : (10,12)-(10,75), + MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt new file mode 100644 index 0000000..ec03e3d --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI001, + Title: Can't find valid constructor, + Severity: Error, + WarningLevel: 0, + Location: : (10,12)-(10,82), + MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt new file mode 100644 index 0000000..ec03e3d --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI001, + Title: Can't find valid constructor, + Severity: Error, + WarningLevel: 0, + Location: : (10,12)-(10,82), + MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.cs index 63c664d..587ea86 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.cs +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.cs @@ -1,13 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Threading; using System.Threading.Tasks; -using ReactiveMarbles.SourceGenerator.TestNuGetHelper.Compilation; using VerifyXunit; + using Xunit; using Xunit.Abstractions; +using Xunit.Sdk; namespace Splat.DependencyInjection.SourceGenerator.Tests { @@ -18,5 +21,69 @@ public RegisterLazySingletonTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, "RegisterLazySingleton") { } + + [Theory] + [InlineData(LazyThreadSafetyMode.PublicationOnly, "")] + [InlineData(LazyThreadSafetyMode.PublicationOnly, "Test1")] + [InlineData(LazyThreadSafetyMode.PublicationOnly, "Test2")] + [InlineData(LazyThreadSafetyMode.ExecutionAndPublication, "")] + [InlineData(LazyThreadSafetyMode.ExecutionAndPublication, "Test1")] + [InlineData(LazyThreadSafetyMode.ExecutionAndPublication, "Test2")] + [InlineData(LazyThreadSafetyMode.None, "")] + [InlineData(LazyThreadSafetyMode.None, "Test1")] + [InlineData(LazyThreadSafetyMode.None, "Test2")] + public Task ConstructionAndMultiplePropertyInjectionWithLazyMode(LazyThreadSafetyMode mode, string contract) + { + string arguments = string.Empty; + if (string.IsNullOrWhiteSpace(contract)) + { + arguments = "LazyThreadSafetyMode." + mode.ToString(); + } + else + { + arguments = '"' + contract + '"' + ", LazyThreadSafetyMode." + mode.ToString(); + } + + var source = @$" +using System; +using System.Threading; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.RegisterLazySingleton({arguments}); + }} + }} + + public interface ITest {{ }} + public class TestConcrete : ITest + {{ + public TestConcrete(IService1 service1, IService2 service) + {{ + }} + + [DependencyInjectionProperty] + public IServiceProperty1 ServiceProperty1 {{ get; set; }} + + [DependencyInjectionProperty] + public IServiceProperty2 ServiceProperty2 {{ get; set; }} + + [DependencyInjectionProperty] + internal IServiceProperty3 ServiceProperty3 {{ get; set; }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} + public interface IServiceProperty1 {{ }} + public interface IServiceProperty2 {{ }} + public interface IServiceProperty3 {{ }} +}}"; + + return TestPass(source, contract, mode); + } } } diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.00.verified.txt new file mode 100644 index 0000000..5ff3c3b --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.00.verified.txt @@ -0,0 +1,22 @@ +{ + Diagnostics: [ + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (26,36)-(26,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + }, + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (18,36)-(18,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.00.verified.txt new file mode 100644 index 0000000..5ff3c3b --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.00.verified.txt @@ -0,0 +1,22 @@ +{ + Diagnostics: [ + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (26,36)-(26,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + }, + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (18,36)-(18,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test1.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.00.verified.txt new file mode 100644 index 0000000..5ff3c3b --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.00.verified.txt @@ -0,0 +1,22 @@ +{ + Diagnostics: [ + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (26,36)-(26,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + }, + { + Id: SPLATDI005, + Title: Constructors must not have a circular dependency, + Severity: Error, + WarningLevel: 0, + Location: : (18,36)-(18,44), + MessageFormat: Constructor parameters must not have a circular dependency to another registered resource, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.CircularDependencyFail_contractParameter=Test2.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=.01.verified.cs similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection.01.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=.01.verified.cs diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.02.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.01.verified.cs similarity index 93% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.02.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.01.verified.cs index b552524..2d5c8dc 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.02.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test1.01.verified.cs @@ -5,7 +5,7 @@ internal static partial class SplatRegistrations { static SplatRegistrations() { - Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest)); + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest), "Test1"); } } } \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.01.verified.cs similarity index 93% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.01.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.01.verified.cs index b552524..6e5a87c 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.01.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalPropertyInjection_contractParameter=Test2.01.verified.cs @@ -5,7 +5,7 @@ internal static partial class SplatRegistrations { static SplatRegistrations() { - Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest)); + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest), "Test2"); } } } \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.00.verified.txt deleted file mode 100644 index 26b04c7..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.00.verified.txt +++ /dev/null @@ -1,69 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - /// - /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.01.verified.cs similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection.01.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=.01.verified.cs diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2d5c8dc --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test1.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest), "Test1"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..6e5a87c --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndInternalSetterPropertyInjection_contractParameter=Test2.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest), "Test2"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.00.verified.txt deleted file mode 100644 index 26b04c7..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.00.verified.txt +++ /dev/null @@ -1,69 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - /// - /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=.01.verified.cs similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection.01.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=.01.verified.cs diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..69ad27f --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test1.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , typeof(global::Test.ITest), "Test1"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..9e93f72 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndMultiplePropertyInjection_contractParameter=Test2.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty1=(global::Test.IServiceProperty1)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2=(global::Test.IServiceProperty2)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3=(global::Test.IServiceProperty3)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty3))} , typeof(global::Test.ITest), "Test2"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.01.verified.txt deleted file mode 100644 index 26b04c7..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.01.verified.txt +++ /dev/null @@ -1,69 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - /// - /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt new file mode 100644 index 0000000..37d1b66 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,58)-(22,61), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt new file mode 100644 index 0000000..37d1b66 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,58)-(22,61), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt new file mode 100644 index 0000000..37d1b66 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,58)-(22,61), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.01.verified.txt deleted file mode 100644 index 26b04c7..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail.01.verified.txt +++ /dev/null @@ -1,69 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - /// - /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt new file mode 100644 index 0000000..d52cc54 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,63)-(22,66), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt new file mode 100644 index 0000000..d52cc54 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,63)-(22,66), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt new file mode 100644 index 0000000..d52cc54 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI002, + Title: Property must be public/internal settable, + Severity: Error, + WarningLevel: 0, + Location: : (22,63)-(22,66), + MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.00.verified.txt deleted file mode 100644 index 26b04c7..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection.00.verified.txt +++ /dev/null @@ -1,69 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - /// - /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.02.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=.01.verified.cs similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail.02.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=.01.verified.cs diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2d5c8dc --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test1.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest), "Test1"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..6e5a87c --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndPropertyInjection_contractParameter=Test2.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))){ ServiceProperty=(global::Test.IServiceProperty)Splat.Locator.Current.GetService(typeof(global::Test.IServiceProperty))} , typeof(global::Test.ITest), "Test2"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.00.verified.txt deleted file mode 100644 index 26b04c7..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.00.verified.txt +++ /dev/null @@ -1,69 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - /// - /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=.01.verified.cs similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection.01.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=.01.verified.cs diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..05890fa --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test1.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest), "Test1"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..08a3be3 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionInjection_contractParameter=Test2.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest), "Test2"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.00.verified.txt deleted file mode 100644 index 26b04c7..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.00.verified.txt +++ /dev/null @@ -1,69 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - /// - /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=.01.verified.cs similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor.01.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=.01.verified.cs diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..c061164 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test1.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete(), typeof(global::Test.ITest), "Test1"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..5b01721 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.EmptyConstructor_contractParameter=Test2.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete(), typeof(global::Test.ITest), "Test2"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=.01.verified.cs new file mode 100644 index 0000000..53c42e5 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=.01.verified.cs @@ -0,0 +1,13 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete1((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest1)); + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete2((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest2)); + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete3((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest3)); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..cab8f42 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test1.01.verified.cs @@ -0,0 +1,13 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete1((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest1), "Test1"); + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete2((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest2), "Test1"); + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete3((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest3), "Test1"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..fe754c8 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultiClassesRegistrations_contractParameter=Test2.01.verified.cs @@ -0,0 +1,13 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete1((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest1), "Test2"); + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete2((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest2), "Test2"); + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete3((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1)), (global::Test.IService2)Splat.Locator.Current.GetService(typeof(global::Test.IService2))), typeof(global::Test.ITest3), "Test2"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.00.verified.txt deleted file mode 100644 index 26b04c7..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.00.verified.txt +++ /dev/null @@ -1,69 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - /// - /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=.01.verified.cs similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute.01.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=.01.verified.cs diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test1.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test1.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test1.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..737e048 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test1.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1))), typeof(global::Test.ITest), "Test1"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test2.00.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test2.00.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test2.00.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..f55f418 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithAttribute_contractParameter=Test2.01.verified.cs @@ -0,0 +1,11 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + Splat.Locator.CurrentMutable.Register(() => new global::Test.TestConcrete((global::Test.IService1)Splat.Locator.Current.GetService(typeof(global::Test.IService1))), typeof(global::Test.ITest), "Test2"); + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.01.verified.txt deleted file mode 100644 index 26b04c7..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail.01.verified.txt +++ /dev/null @@ -1,69 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - /// - /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt new file mode 100644 index 0000000..f784ab8 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI003, + Title: Multiple constructors have DependencyInjectionConstructorAttribute, + Severity: Error, + WarningLevel: 0, + Location: : (23,15)-(23,27), + MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt new file mode 100644 index 0000000..f784ab8 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI003, + Title: Multiple constructors have DependencyInjectionConstructorAttribute, + Severity: Error, + WarningLevel: 0, + Location: : (23,15)-(23,27), + MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt new file mode 100644 index 0000000..f784ab8 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI003, + Title: Multiple constructors have DependencyInjectionConstructorAttribute, + Severity: Error, + WarningLevel: 0, + Location: : (23,15)-(23,27), + MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.01.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.01.verified.txt deleted file mode 100644 index 26b04c7..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.01.verified.txt +++ /dev/null @@ -1,69 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - /// - /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt similarity index 100% rename from src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail.00.verified.txt rename to src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt new file mode 100644 index 0000000..281437e --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI001, + Title: Can't find valid constructor, + Severity: Error, + WarningLevel: 0, + Location: : (10,12)-(10,69), + MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt new file mode 100644 index 0000000..281437e --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt @@ -0,0 +1,13 @@ +{ + Diagnostics: [ + { + Id: SPLATDI001, + Title: Can't find valid constructor, + Severity: Error, + WarningLevel: 0, + Location: : (10,12)-(10,69), + MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + Category: Compiler + } + ] +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.01.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.01.verified.cs new file mode 100644 index 0000000..2582669 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.01.verified.cs @@ -0,0 +1,86 @@ +//HintName: Splat.DI.Extensions.SourceGenerated.cs + +// +namespace Splat +{ + /// + /// Extension methods for the Splat DI source generator. + /// + internal static partial class SplatRegistrations + { + /// + /// Registers a class with its concrete class. + /// + public static void Register() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void Register(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + public static void RegisterLazySingleton() + { + } + + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + public static void RegisterLazySingleton(string contract) + { + } + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + { + } + } + + /// + /// Makes the property get added by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Property)] + internal class DependencyInjectionPropertyAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionPropertyAttribute() + { + } + } + + /// + /// Makes this the constructor used by the DI engine. + /// + [System.AttributeUsage(System.AttributeTargets.Constructor)] + internal class DependencyInjectionConstructorAttribute : System.Attribute + { + /// + /// Initializes a new instance of the class. + /// + public DependencyInjectionConstructorAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.02.verified.cs new file mode 100644 index 0000000..eec8961 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.02.verified.cs @@ -0,0 +1,10 @@ +//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs +namespace Splat +{ + internal static partial class SplatRegistrations + { + static SplatRegistrations() + { + } + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.cs index 1430301..99f94d7 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.cs +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.cs @@ -1,9 +1,9 @@ -using System; -using System.Threading.Tasks; +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. using VerifyXunit; -using Xunit; using Xunit.Abstractions; namespace Splat.DependencyInjection.SourceGenerator.Tests diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj b/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj index bebfdee..57fd2b5 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj @@ -5,6 +5,7 @@ false enable + $(NoWarn);SA1600 @@ -18,13 +19,12 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + - - + diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs index af3b8f9..2cb5979 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs @@ -1,17 +1,24 @@ -using System; -using System.Collections.Generic; -using System.Linq; +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; using System.Runtime.CompilerServices; -using System.Text; +using System.Threading; using System.Threading.Tasks; +using ICSharpCode.Decompiler.Metadata; + using Microsoft.CodeAnalysis; using NuGet.LibraryModel; using NuGet.Versioning; + using ReactiveMarbles.NuGet.Helpers; using ReactiveMarbles.SourceGenerator.TestNuGetHelper.Compilation; +using VerifyTests; + using VerifyXunit; using Xunit; @@ -59,9 +66,13 @@ public void Dispose() GC.SuppressFinalize(this); } - [Fact] - public Task ConstructionInjection() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task ConstructionInjection(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; var source = @$" using System; using Splat; @@ -72,7 +83,7 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -88,12 +99,61 @@ public interface IService1 {{ }} public interface IService2 {{ }} }}"; - return TestPass(source); + return TestPass(source, contractParameter); + } + + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task CircularDependencyFail(string contractParameter) + { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; + var source = $@" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}({arguments}); + SplatRegistrations.{_testMethod}(); + }} + }} + + public interface ITest1 {{ }} + public class TestConcrete1 : ITest1 + {{ + public TestConcrete1(ITest2 service1, IService2 service2) + {{ + }} + }} + + public interface ITest2 {{ }} + public class TestConcrete2 : ITest2 + {{ + public TestConcrete2(ITest1 service1, IService2 service2) + {{ + }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} +}}"; + + return TestFail(source, contractParameter); } - [Fact] - public Task ConstructionAndPropertyInjection() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task MultiClassesRegistrations(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; var source = @$" using System; using Splat; @@ -104,7 +164,61 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); + SplatRegistrations.{_testMethod}({arguments}); + SplatRegistrations.{_testMethod}({arguments}); + }} + }} + + public interface ITest1 {{ }} + public class TestConcrete1 : ITest1 + {{ + public TestConcrete1(IService1 service1, IService2 service) + {{ + }} + }} + + public interface ITest2 {{ }} + public class TestConcrete2 : ITest2 + {{ + public TestConcrete2(IService1 service1, IService2 service) + {{ + }} + }} + + public interface ITest3 {{ }} + public class TestConcrete3 : ITest3 + {{ + public TestConcrete3(IService1 service1, IService2 service) + {{ + }} + }} + + public interface IService1 {{ }} + public interface IService2 {{ }} +}}"; + + return TestPass(source, contractParameter); + } + + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task ConstructionAndPropertyInjection(string contractParameter) + { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; + var source = @$" +using System; +using Splat; + +namespace Test +{{ + public static class DIRegister + {{ + static DIRegister() + {{ + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -124,12 +238,16 @@ public interface IService2 {{ }} public interface IServiceProperty {{ }} }}"; - return TestPass(source); + return TestPass(source, contractParameter); } - [Fact] - public Task ConstructionAndNonPublicPropertyInjectionFail() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task ConstructionAndNonPublicPropertyInjectionFail(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; var source = @$" using System; using Splat; @@ -140,7 +258,7 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -160,12 +278,16 @@ public interface IService2 {{ }} public interface IServiceProperty {{ }} }}"; - return TestFail(source); + return TestFail(source, contractParameter); } - [Fact] - public Task ConstructionAndNonPublicPropertySetterInjectionFail() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task ConstructionAndNonPublicPropertySetterInjectionFail(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; var source = @$" using System; using Splat; @@ -176,7 +298,7 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -196,12 +318,16 @@ public interface IService2 {{ }} public interface IServiceProperty {{ }} }}"; - return TestFail(source); + return TestFail(source, contractParameter); } - [Fact] - public Task ConstructionAndInternalPropertyInjection() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task ConstructionAndInternalPropertyInjection(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; var source = @$" using System; using Splat; @@ -212,7 +338,7 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -232,13 +358,16 @@ public interface IService2 {{ }} public interface IServiceProperty {{ }} }}"; - return TestPass(source); + return TestPass(source, contractParameter); } - - [Fact] - public Task ConstructionAndInternalSetterPropertyInjection() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task ConstructionAndInternalSetterPropertyInjection(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; var source = @$" using System; using Splat; @@ -249,7 +378,7 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -269,12 +398,17 @@ public interface IService2 {{ }} public interface IServiceProperty {{ }} }}"; - return TestPass(source); + return TestPass(source, contractParameter); } - [Fact] - public Task ConstructionAndMultiplePropertyInjection() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task ConstructionAndMultiplePropertyInjection(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; + var source = @$" using System; using Splat; @@ -285,7 +419,7 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -313,12 +447,16 @@ public interface IServiceProperty2 {{ }} public interface IServiceProperty3 {{ }} }}"; - return TestPass(source); + return TestPass(source, contractParameter); } - [Fact] - public Task MultipleConstructorWithoutAttributeFail() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task MultipleConstructorWithoutAttributeFail(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; var source = @$" using System; using Splat; @@ -329,7 +467,7 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -349,12 +487,16 @@ public interface IService1 {{ }} public interface IService2 {{ }} }}"; - return TestFail(source); + return TestFail(source, contractParameter); } - [Fact] - public Task MultipleConstructorWithAttribute() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task MultipleConstructorWithAttribute(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; var source = @$" using System; using Splat; @@ -365,7 +507,7 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -386,12 +528,16 @@ public interface IService1 {{ }} public interface IService2 {{ }} }}"; - return TestPass(source); + return TestPass(source, contractParameter); } - [Fact] - public Task MultipleConstructorWithMultipleAttributesFail() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task MultipleConstructorWithMultipleAttributesFail(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; var source = @$" using System; using Splat; @@ -402,7 +548,7 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -424,12 +570,16 @@ public interface IService1 {{ }} public interface IService2 {{ }} }}"; - return TestFail(source); + return TestFail(source, contractParameter); } - [Fact] - public Task EmptyConstructor() + [Theory] + [InlineData("")] + [InlineData("Test1")] + [InlineData("Test2")] + public Task EmptyConstructor(string contractParameter) { + var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"'; var source = @$" using System; using Splat; @@ -440,7 +590,7 @@ public static class DIRegister {{ static DIRegister() {{ - SplatRegistrations.{_testMethod}(); + SplatRegistrations.{_testMethod}({arguments}); }} }} @@ -448,27 +598,46 @@ public interface ITest {{ }} public class TestConcrete : ITest {{ }} }}"; - return TestPass(source); + return TestPass(source, contractParameter); } - protected Task TestFail(string source, [CallerFilePath] string file = "") + protected Task TestFail(string source, string contractParameter, [CallerFilePath] string file = "") { + if (EventCompiler is null) + { + throw new InvalidOperationException("Must have valid compiler instance."); + } + var utility = new SourceGeneratorUtility(x => TestOutputHelper.WriteLine(x)); GeneratorDriver? driver = null; Assert.Throws(() => utility.RunGenerator(EventCompiler, out var _, out var _, out driver, source)); - return Verifier.Verify(driver, sourceFile: file); + VerifySettings settings = new(); + settings.UseParameters(contractParameter); + + return Verifier.Verify(driver, settings, sourceFile: file); } - protected Task TestPass(string source, [CallerFilePath] string file = "") + protected Task TestPass(string source, string contractParameter, [CallerFilePath] string file = "") { - var utility = new SourceGeneratorUtility(x => TestOutputHelper.WriteLine(x)); + var driver = Generate(source); + VerifySettings settings = new(); + settings.UseParameters(contractParameter); + settings.AutoVerify(); - utility.RunGenerator(EventCompiler, out var _, out var _, out var driver, source); + return Verifier.Verify(driver, settings, sourceFile: file); + } + + protected Task TestPass(string source, string contractParameter, LazyThreadSafetyMode mode, [CallerFilePath] string file = "") + { + var driver = Generate(source); - return Verifier.Verify(driver, sourceFile: file); + VerifySettings settings = new(); + settings.UseParameters(contractParameter, mode); + + return Verifier.Verify(driver, settings, sourceFile: file); } protected virtual void Dispose(bool isDisposing) @@ -478,5 +647,19 @@ protected virtual void Dispose(bool isDisposing) EventCompiler?.Dispose(); } } + + private GeneratorDriver Generate(string source) + { + if (EventCompiler is null) + { + throw new InvalidOperationException("Must have valid compiler instance."); + } + + var utility = new SourceGeneratorUtility(x => TestOutputHelper.WriteLine(x)); + + utility.RunGenerator(EventCompiler, out var _, out var _, out var driver, source); + + return driver; + } } } diff --git a/src/Splat.DependencyInjection.SourceGenerator/Constants.cs b/src/Splat.DependencyInjection.SourceGenerator/Constants.cs index 3fe060b..fe3609d 100644 --- a/src/Splat.DependencyInjection.SourceGenerator/Constants.cs +++ b/src/Splat.DependencyInjection.SourceGenerator/Constants.cs @@ -1,6 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Text; +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. namespace Splat.DependencyInjection.SourceGenerator { @@ -9,6 +9,13 @@ internal static class Constants public const string ClassName = "SplatRegistrations"; public const string NamespaceName = "Splat"; public const string Locator = "Splat.Locator"; + public const string LocatorCurrent = "Splat.Locator.Current"; + public const string LocatorGetService = "GetService"; + + public const string LazyModeType = "global::System.Threading.LazyThreadSafetyMode"; + + public const string ConstructorAttribute = "global::Splat.DependencyInjectionConstructorAttribute"; + public const string PropertyAttribute = "global::Splat.DependencyInjectionPropertyAttribute"; public static readonly string ExtensionMethodText = @$" // @@ -41,6 +48,14 @@ public static void RegisterLazySingleton() {{ }} + /// + /// Registers a class with its concrete class. + /// + /// The threading mode. + public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) + {{ + }} + /// /// Registers a class with its concrete class. /// @@ -48,6 +63,15 @@ public static void RegisterLazySingleton() public static void RegisterLazySingleton(string contract) {{ }} + + /// + /// Registers a class with its concrete class. + /// + /// Optional contract. + /// The threading mode. + public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) + {{ + }} }} /// diff --git a/src/Splat.DependencyInjection.SourceGenerator/ContextDiagnosticException.cs b/src/Splat.DependencyInjection.SourceGenerator/ContextDiagnosticException.cs new file mode 100644 index 0000000..933a6cc --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/ContextDiagnosticException.cs @@ -0,0 +1,29 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Diagnostics.CodeAnalysis; + +using Microsoft.CodeAnalysis; + +namespace Splat.DependencyInjection.SourceGenerator +{ + /// + /// When there is an context diagnostic issue. + /// + [SuppressMessage("Roslynator", "RCS1194: Implement exception constructor", Justification = "Deliberate usage.")] + public class ContextDiagnosticException : Exception + { + /// + /// Initializes a new instance of the class. + /// + /// The diagnostic. + public ContextDiagnosticException(Diagnostic diagnostic) => Diagnostic = diagnostic; + + /// + /// Gets the diagnostic information about the generation context issue. + /// + public Diagnostic Diagnostic { get; } + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs b/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs index 4935842..586ffd4 100644 --- a/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs +++ b/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs @@ -40,5 +40,12 @@ internal static class DiagnosticWarnings defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true); + internal static readonly DiagnosticDescriptor ConstructorsMustNotHaveCircularDependency = new( + id: "SPLATDI005", + title: "Constructors must not have a circular dependency", + messageFormat: "Constructor parameters must not have a circular dependency to another registered resource", + category: "Compiler", + defaultSeverity: DiagnosticSeverity.Error, + isEnabledByDefault: true); } } diff --git a/src/Splat.DependencyInjection.SourceGenerator/Generator.cs b/src/Splat.DependencyInjection.SourceGenerator/Generator.cs index a55ac22..301642b 100644 --- a/src/Splat.DependencyInjection.SourceGenerator/Generator.cs +++ b/src/Splat.DependencyInjection.SourceGenerator/Generator.cs @@ -1,16 +1,14 @@ -using System; -using System.Collections.Generic; +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + using System.Linq; -using System.Linq.Expressions; using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; -using ReactiveMarbles.RoslynHelpers; - namespace Splat.DependencyInjection.SourceGenerator { /// @@ -19,6 +17,7 @@ namespace Splat.DependencyInjection.SourceGenerator [Generator] public class Generator : ISourceGenerator { + /// public void Execute(GeneratorExecutionContext context) { // add the attribute text. @@ -39,6 +38,7 @@ public void Execute(GeneratorExecutionContext context) context.AddSource("Splat.DI.Extensions.Registrations.SourceGenerated.cs", SourceText.From(outputText, Encoding.UTF8)); } + /// public void Initialize(GeneratorInitializationContext context) => context.RegisterForSyntaxNotifications(() => new SyntaxReceiver()); } } diff --git a/src/Splat.DependencyInjection.SourceGenerator/IsExternalInit.cs b/src/Splat.DependencyInjection.SourceGenerator/IsExternalInit.cs new file mode 100644 index 0000000..6124ad1 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/IsExternalInit.cs @@ -0,0 +1,17 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.ComponentModel; + +namespace System.Runtime.CompilerServices +{ + /// + /// Reserved to be used by the compiler for tracking metadata. + /// This class should not be used by developers in source code. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + internal static class IsExternalInit + { + } +} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator/Metadata/ConstructorDependencyMetadata.cs b/src/Splat.DependencyInjection.SourceGenerator/Metadata/ConstructorDependencyMetadata.cs new file mode 100644 index 0000000..da2c438 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/Metadata/ConstructorDependencyMetadata.cs @@ -0,0 +1,10 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using Microsoft.CodeAnalysis; + +namespace Splat.DependencyInjection.SourceGenerator.Metadata +{ + internal record ConstructorDependencyMetadata(IParameterSymbol Parameter, ITypeSymbol Type) : DependencyMetadata(Type); +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/Metadata/DependencyMetadata.cs b/src/Splat.DependencyInjection.SourceGenerator/Metadata/DependencyMetadata.cs new file mode 100644 index 0000000..cba3ecd --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/Metadata/DependencyMetadata.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using Microsoft.CodeAnalysis; + +using ReactiveMarbles.RoslynHelpers; + +namespace Splat.DependencyInjection.SourceGenerator.Metadata +{ + internal abstract record DependencyMetadata + { + protected DependencyMetadata(ITypeSymbol type) + { + Type = type; + TypeName = type.ToDisplayString(RoslynCommonHelpers.TypeFormat); + } + + public ITypeSymbol Type { get; init; } + + public string TypeName { get; } + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/Metadata/MethodMetadata.cs b/src/Splat.DependencyInjection.SourceGenerator/Metadata/MethodMetadata.cs new file mode 100644 index 0000000..ba9ccff --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/Metadata/MethodMetadata.cs @@ -0,0 +1,50 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Collections.Generic; + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +using ReactiveMarbles.RoslynHelpers; + +namespace Splat.DependencyInjection.SourceGenerator.Metadata +{ + internal abstract record MethodMetadata + { + public MethodMetadata(IMethodSymbol method, InvocationExpressionSyntax methodInvocation, bool isLazy, IReadOnlyList constructorDependencies, IReadOnlyList properties, IReadOnlyList registerParameterValues) + { + Method = method; + MethodInvocation = methodInvocation; + IsLazy = isLazy; + ConstructorDependencies = constructorDependencies; + Properties = properties; + ConcreteType = Method.TypeArguments[1]; + InterfaceType = Method.TypeArguments[0]; + ConcreteTypeName = ConcreteType.ToDisplayString(RoslynCommonHelpers.TypeFormat); + InterfaceTypeName = InterfaceType.ToDisplayString(RoslynCommonHelpers.TypeFormat); + RegisterParameterValues = registerParameterValues; + } + + public IMethodSymbol Method { get; init; } + + public InvocationExpressionSyntax MethodInvocation { get; init; } + + public bool IsLazy { get; init; } + + public IReadOnlyList ConstructorDependencies { get; init; } + + public IReadOnlyList Properties { get; init; } + + public IReadOnlyList RegisterParameterValues { get; init; } + + public ITypeSymbol ConcreteType { get; } + + public ITypeSymbol InterfaceType { get; } + + public string ConcreteTypeName { get; } + + public string InterfaceTypeName { get; } + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/Metadata/ParameterMetadata.cs b/src/Splat.DependencyInjection.SourceGenerator/Metadata/ParameterMetadata.cs new file mode 100644 index 0000000..83f3bce --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/Metadata/ParameterMetadata.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Splat.DependencyInjection.SourceGenerator.Metadata +{ + public record ParameterMetadata(string ParameterName, string ParameterValue); +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/Metadata/PropertyDependencyMetadata.cs b/src/Splat.DependencyInjection.SourceGenerator/Metadata/PropertyDependencyMetadata.cs new file mode 100644 index 0000000..3d45553 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/Metadata/PropertyDependencyMetadata.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using Microsoft.CodeAnalysis; + +namespace Splat.DependencyInjection.SourceGenerator.Metadata +{ + internal record PropertyDependencyMetadata : DependencyMetadata + { + public PropertyDependencyMetadata(IPropertySymbol property) + : base(property.Type) + { + Property = property; + + Name = Property.Name; + } + + public IPropertySymbol Property { get; init; } + + public string Name { get; } + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/Metadata/RegisterLazySingletonMetadata.cs b/src/Splat.DependencyInjection.SourceGenerator/Metadata/RegisterLazySingletonMetadata.cs new file mode 100644 index 0000000..41aac41 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/Metadata/RegisterLazySingletonMetadata.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Collections.Generic; + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Splat.DependencyInjection.SourceGenerator.Metadata +{ + internal record RegisterLazySingletonMetadata(IMethodSymbol Method, InvocationExpressionSyntax MethodInvocation, IReadOnlyList ConstructorDependencies, IReadOnlyList Properties, IReadOnlyList RegisterParameterValues) + : MethodMetadata(Method, MethodInvocation, true, ConstructorDependencies, Properties, RegisterParameterValues); +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/Metadata/RegisterMetadata.cs b/src/Splat.DependencyInjection.SourceGenerator/Metadata/RegisterMetadata.cs new file mode 100644 index 0000000..2726435 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/Metadata/RegisterMetadata.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Collections.Generic; + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Splat.DependencyInjection.SourceGenerator.Metadata +{ + internal record RegisterMetadata(IMethodSymbol Method, InvocationExpressionSyntax MethodInvocation, IReadOnlyList ConstructorDependencies, IReadOnlyList Properties, IReadOnlyList RegisterParameterValues) + : MethodMetadata(Method, MethodInvocation, false, ConstructorDependencies, Properties, RegisterParameterValues); +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/MetadataDependencyChecker.cs b/src/Splat.DependencyInjection.SourceGenerator/MetadataDependencyChecker.cs new file mode 100644 index 0000000..8c650ed --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/MetadataDependencyChecker.cs @@ -0,0 +1,51 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using System.Linq; + +using Microsoft.CodeAnalysis; + +using Splat.DependencyInjection.SourceGenerator.Metadata; + +namespace Splat.DependencyInjection.SourceGenerator +{ + internal static class MetadataDependencyChecker + { + public static List CheckMetadata(GeneratorExecutionContext context, IList metadataMethods) + { + var metadataDependencies = metadataMethods.ToDictionary(x => x.InterfaceTypeName); + + var methods = new List(); + + foreach (var metadataMethod in metadataMethods) + { + try + { + foreach (var constructorDependency in metadataMethod.ConstructorDependencies) + { + if (metadataDependencies.TryGetValue(constructorDependency.TypeName, out var dependencyMethod)) + { + foreach (var childConstructor in dependencyMethod.ConstructorDependencies) + { + if (childConstructor.TypeName == metadataMethod.InterfaceTypeName) + { + throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.ConstructorsMustNotHaveCircularDependency, childConstructor.Parameter.Locations.FirstOrDefault())); + } + } + } + } + + methods.Add(metadataMethod); + } + catch (ContextDiagnosticException ex) + { + context.ReportDiagnostic(ex.Diagnostic); + } + } + + return methods; + } + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs b/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs new file mode 100644 index 0000000..1f3067c --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs @@ -0,0 +1,184 @@ +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +using ReactiveMarbles.RoslynHelpers; + +using Splat.DependencyInjection.SourceGenerator.Metadata; + +namespace Splat.DependencyInjection.SourceGenerator +{ + internal static class MetadataExtractor + { + public static IEnumerable GetValidMethods(GeneratorExecutionContext context, SyntaxReceiver syntaxReceiver, Compilation compilation) + { + foreach (var invocationExpression in syntaxReceiver.Register) + { + var methodMetadata = GetValidMethod(context, invocationExpression, compilation, (method, invocation, constructors, properties, registerProperties) => + new RegisterMetadata(method, invocation, constructors, properties, registerProperties)); + + if (methodMetadata != null) + { + yield return methodMetadata; + } + } + + foreach (var invocationExpression in syntaxReceiver.RegisterLazySingleton) + { + var methodMetadata = GetValidMethod(context, invocationExpression, compilation, (method, invocation, constructors, properties, registerProperties) => + new RegisterLazySingletonMetadata(method, invocation, constructors, properties, registerProperties)); + + if (methodMetadata != null) + { + yield return methodMetadata; + } + } + } + + private static T? GetValidMethod( + GeneratorExecutionContext context, + InvocationExpressionSyntax invocationExpression, + Compilation compilation, + Func, IReadOnlyList, IReadOnlyList, T> createFunc) + where T : MethodMetadata + { + try + { + var semanticModel = compilation.GetSemanticModel(invocationExpression.SyntaxTree); + if (semanticModel.GetSymbolInfo(invocationExpression).Symbol is not IMethodSymbol methodSymbol) + { + // Produce a diagnostic error. + return null; + } + + if (methodSymbol.TypeParameters.Length != 2) + { + return null; + } + + if (methodSymbol.IsExtensionMethod) + { + return null; + } + + if (methodSymbol.Parameters.Length > 2) + { + return null; + } + + var interfaceTarget = methodSymbol.TypeArguments[0]; + var concreteTarget = methodSymbol.TypeArguments[1]; + + var constructorDependencies = GetConstructorDependencies(concreteTarget, invocationExpression).ToList(); + + var properties = GetPropertyDependencies(concreteTarget).ToList(); + + var registerParameters = GetRegisterParameters(methodSymbol, semanticModel, invocationExpression).ToList(); + + return createFunc(methodSymbol, invocationExpression, constructorDependencies, properties, registerParameters); + } + catch (ContextDiagnosticException ex) + { + context.ReportDiagnostic(ex.Diagnostic); + } + + return null; + } + + private static IEnumerable GetRegisterParameters(IMethodSymbol methodSymbol, SemanticModel semanticModel, InvocationExpressionSyntax invocationExpression) + { + for (int i = 0; i < invocationExpression.ArgumentList.Arguments.Count; ++i) +{ + var argument = invocationExpression.ArgumentList.Arguments[i]; + var argumentName = methodSymbol.Parameters[i].Name; + var expression = argument.Expression; + + if (expression is LiteralExpressionSyntax literal) + { + yield return new ParameterMetadata(argumentName, literal.ToString()); + } + else + { + var mode = semanticModel.GetSymbolInfo(expression); + + if (mode.Symbol is not null) + { + yield return new ParameterMetadata(argumentName, mode.Symbol.ToDisplayString()); + } + } + } + } + + private static IEnumerable GetConstructorDependencies(ITypeSymbol concreteTarget, InvocationExpressionSyntax invocationExpression) + { + var constructors = concreteTarget + .GetMembers() + .Where(x => x.Kind == SymbolKind.Method) + .Cast() + .Where(x => x.MethodKind == MethodKind.Constructor) + .ToList(); + + IMethodSymbol? returnConstructor = null; + + if (constructors.Count == 1) + { + returnConstructor = constructors[0]; + } + else + { + foreach (var constructor in constructors) + { + if (constructor.GetAttributes().Any(x => x.AttributeClass?.ToDisplayString(RoslynCommonHelpers.TypeFormat) == Constants.ConstructorAttribute)) + { + if (returnConstructor != null) + { + throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.MultipleConstructorsMarked, constructor.Locations.FirstOrDefault())); + } + + returnConstructor = constructor; + } + } + } + + if (returnConstructor is null) + { + throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.ExpressionMustBeInline, invocationExpression.GetLocation())); + } + + if (returnConstructor.DeclaredAccessibility < Accessibility.Internal) + { + throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.ConstructorsMustBePublic, returnConstructor.Locations.FirstOrDefault())); + } + + return returnConstructor.Parameters.Select(x => new ConstructorDependencyMetadata(x, x.Type)); + } + + private static IEnumerable GetPropertyDependencies(ITypeSymbol concreteTarget) + { + var propertySymbols = concreteTarget + .GetBaseTypesAndThis() + .SelectMany(x => x.GetMembers()) + .Where(x => x.Kind == SymbolKind.Property) + .Cast() + .Where(x => x.GetAttributes().Any(attr => attr.AttributeClass?.ToDisplayString(RoslynCommonHelpers.TypeFormat) == Constants.PropertyAttribute)); + + foreach (var property in propertySymbols) + { + if (property.SetMethod?.DeclaredAccessibility < Accessibility.Internal) + { + throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.PropertyMustPublicBeSettable, property.SetMethod?.Locations.FirstOrDefault())); + } + + yield return new PropertyDependencyMetadata(property); + } + } + } +} diff --git a/src/Splat.DependencyInjection.SourceGenerator/SourceGeneratorHelpers.cs b/src/Splat.DependencyInjection.SourceGenerator/SourceGeneratorHelpers.cs index 946a396..306082a 100644 --- a/src/Splat.DependencyInjection.SourceGenerator/SourceGeneratorHelpers.cs +++ b/src/Splat.DependencyInjection.SourceGenerator/SourceGeneratorHelpers.cs @@ -1,15 +1,20 @@ -using System; +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; using System.Collections.Generic; -using System.Text; +using System.Linq; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; + using ReactiveMarbles.RoslynHelpers; -using System.Linq; + +using Splat.DependencyInjection.SourceGenerator.Metadata; using static ReactiveMarbles.RoslynHelpers.SyntaxFactoryHelpers; -using System.Linq.Expressions; namespace Splat.DependencyInjection.SourceGenerator { @@ -17,17 +22,16 @@ internal static class SourceGeneratorHelpers { private const string RegisterMethodName = "Register"; private const string LocatorName = "Splat.Locator.CurrentMutable"; - private const string ConstructorAttribute = "global::Splat.DependencyInjectionConstructorAttribute"; - private const string PropertyAttribute = "global::Splat.DependencyInjectionPropertyAttribute"; public static string Generate(GeneratorExecutionContext context, Compilation compilation, SyntaxReceiver syntaxReceiver) { - var invocations = new List(); - - invocations.AddRange(syntaxReceiver.Register.SelectMany(x => Generate(context, compilation, x, false))); - invocations.AddRange(syntaxReceiver.RegisterLazySingleton.SelectMany(x => Generate(context, compilation, x, true))); + var methods = MetadataExtractor.GetValidMethods(context, syntaxReceiver, compilation).ToList(); - var staticConstructor = ConstructorDeclaration(default, new[] { SyntaxKind.StaticKeyword }, Array.Empty(), Constants.ClassName, Block(invocations, 2), 1); + methods = MetadataDependencyChecker.CheckMetadata(context, methods); + + var invocations = Generate(compilation, methods); + + var staticConstructor = ConstructorDeclaration(default, new[] { SyntaxKind.StaticKeyword }, Array.Empty(), Constants.ClassName, Block(invocations.ToList(), 2), 1); var registrationClass = ClassDeclaration(Constants.ClassName, new[] { SyntaxKind.InternalKeyword, SyntaxKind.StaticKeyword, SyntaxKind.PartialKeyword }, new[] { staticConstructor }, 1); @@ -38,71 +42,97 @@ public static string Generate(GeneratorExecutionContext context, Compilation com return compilationUnit.ToFullString(); } - public static IEnumerable Generate(GeneratorExecutionContext context, Compilation compilation, InvocationExpressionSyntax invocationExpression, bool isLazy) + private static IEnumerable Generate(Compilation compilation, IEnumerable methodMetadatas) { - var semanticModel = compilation.GetSemanticModel(invocationExpression.SyntaxTree); - - if (semanticModel.GetSymbolInfo(invocationExpression).Symbol is not IMethodSymbol methodSymbol) + foreach (var methodMetadata in methodMetadatas) { - // Produce a diagnostic error. - yield break; - } + var semanticModel = compilation.GetSemanticModel(methodMetadata.MethodInvocation.SyntaxTree); - if (methodSymbol.TypeParameters.Length != 2) - { - yield break; - } + var typeConstructorArguments = new List(); - if (methodSymbol.IsExtensionMethod) - { - yield break; - } + foreach (var parameter in methodMetadata.ConstructorDependencies) + { + var parameterType = parameter.Type; + var parameterTypeName = parameterType.ToDisplayString(RoslynCommonHelpers.TypeFormat); - if (methodSymbol.Parameters.Length > 2) - { - yield break; - } + typeConstructorArguments.Add(Argument(GetSplatService(parameterTypeName))); + } - var interfaceTarget = methodSymbol.TypeArguments[0]; - var concreteTarget = methodSymbol.TypeArguments[1]; + var contractParameter = methodMetadata.RegisterParameterValues.FirstOrDefault(x => x.ParameterName == "contract"); - if (interfaceTarget is null || concreteTarget is null) - { - yield break; - } + string? contract = null; + if (contractParameter is not null) + { + contract = contractParameter.ParameterValue; + } - var concreteTargetTypeName = concreteTarget.ToDisplayString(RoslynCommonHelpers.TypeFormat); - var interfaceTargetTypeName = interfaceTarget.ToDisplayString(RoslynCommonHelpers.TypeFormat); + var initializer = GetPropertyInitializer(methodMetadata.Properties); - var constructor = GetConstructor(concreteTarget, context, invocationExpression); + ExpressionSyntax call = initializer is null ? + ObjectCreationExpression(methodMetadata.ConcreteTypeName, typeConstructorArguments) : + ObjectCreationExpression(methodMetadata.ConcreteTypeName, typeConstructorArguments, initializer); - if (constructor is null) + if (methodMetadata.IsLazy) + { + yield return GetLazyBlock(methodMetadata, call, contract); + } + else + { + yield return GenerateLocatorSetService(Argument(ParenthesizedLambdaExpression(call)), methodMetadata.InterfaceTypeName, contract); + } + } + } + + private static InitializerExpressionSyntax? GetPropertyInitializer(IEnumerable properties) + { + var propertySet = new List(); + foreach (var property in properties) { - yield break; + propertySet.Add(AssignmentExpression(SyntaxKind.SimpleAssignmentExpression, property.Name, GetSplatService(property.TypeName))); } - var typeConstructorArguments = new List(); + return propertySet.Count > 0 ? InitializerExpression(SyntaxKind.ObjectInitializerExpression, propertySet) : null; + } - foreach (var parameter in constructor.Parameters) - { - var parameterType = parameter.Type; - var parameterTypeName = parameterType.ToDisplayString(RoslynCommonHelpers.TypeFormat); + private static CastExpressionSyntax GetSplatService(string parameterTypeName) => + CastExpression( + parameterTypeName, + InvocationExpression( + MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, Constants.LocatorCurrent, Constants.LocatorGetService), + new[] + { + Argument($"typeof({parameterTypeName})"), + })); - typeConstructorArguments.Add(Argument(GetSplatService(parameterTypeName))); - } + private static BlockSyntax GetLazyBlock(MethodMetadata methodMetadata, ExpressionSyntax call, string? contract) + { + var lazyType = $"global::System.Lazy<{methodMetadata.InterfaceType}>"; + + const string lazyTypeValueProperty = "Value"; + const string lazyVariableName = "lazy"; - InitializerExpressionSyntax? initializer = GetPropertyInitializer(concreteTarget, context); + var lambdaArguments = new ArgumentSyntax[] + { + Argument(ParenthesizedLambdaExpression(MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, lazyVariableName, lazyTypeValueProperty))), + Argument($"typeof({methodMetadata.InterfaceTypeName})") + }; + + var lazyArguments = new List() + { + Argument(ParenthesizedLambdaExpression(call)) + }; - ExpressionSyntax call = initializer is null ? - ObjectCreationExpression(concreteTargetTypeName, typeConstructorArguments) : - ObjectCreationExpression(concreteTargetTypeName, typeConstructorArguments, initializer); + var lazyModeParameter = methodMetadata.RegisterParameterValues.FirstOrDefault(x => x.ParameterName == "mode"); - if (isLazy) + if (lazyModeParameter is not null) { - var lazyType = $"System.Lazy<{concreteTargetTypeName}>"; - const string lazyVariableName = "lazy"; + var modeName = lazyModeParameter.ParameterValue; - var block = Block(new StatementSyntax[] + lazyArguments.Add(Argument(modeName)); + } + + return Block( + new StatementSyntax[] { LocalDeclarationStatement( VariableDeclaration( @@ -114,116 +144,36 @@ public static IEnumerable Generate(GeneratorExecutionContext co EqualsValueClause( ObjectCreationExpression( lazyType, - new[] - { - Argument(ParenthesizedLambdaExpression(call)) - }))) - })), - ExpressionStatement(InvocationExpression( - MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, LocatorName, RegisterMethodName), - new[] - { - Argument(ParenthesizedLambdaExpression(MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, lazyVariableName, "Value"))), - Argument($"typeof({interfaceTargetTypeName})") - })), + lazyArguments))) + })), + GenerateLocatorSetService( + Argument(ParenthesizedLambdaExpression(IdentifierName(lazyVariableName))), + lazyType, + contract), + GenerateLocatorSetService( + Argument(ParenthesizedLambdaExpression(MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, lazyVariableName, lazyTypeValueProperty))), + methodMetadata.InterfaceTypeName, + contract) }, 3); - - yield return block; - } - else - { - yield return ExpressionStatement( - InvocationExpression( - MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, LocatorName, RegisterMethodName), - new[] - { - Argument(ParenthesizedLambdaExpression(call)), - Argument($"typeof({interfaceTargetTypeName})") - })); - } } - private static IMethodSymbol? GetConstructor(ITypeSymbol concreteTarget, GeneratorExecutionContext context, InvocationExpressionSyntax invocationExpression) + private static ExpressionStatementSyntax GenerateLocatorSetService(ArgumentSyntax argument, string interfaceType, string? contract) { - var constructors = concreteTarget - .GetMembers() - .Where(x => x.Kind == SymbolKind.Method) - .Cast() - .Where(x => x.MethodKind == MethodKind.Constructor) - .ToList(); - - IMethodSymbol? returnConstructor = null; - - if (constructors.Count == 1) - { - returnConstructor = constructors[0]; - } - else + var lambdaArguments = new List { - foreach (var constructor in constructors) - { - if (constructor.GetAttributes().Any(x => x.AttributeClass?.ToDisplayString(RoslynCommonHelpers.TypeFormat) == ConstructorAttribute)) - { - if (returnConstructor != null) - { - context.ReportDiagnostic(Diagnostic.Create(DiagnosticWarnings.MultipleConstructorsMarked, constructor.Locations.FirstOrDefault())); - return null; - } - - returnConstructor = constructor; - } - } - } + argument, + Argument($"typeof({interfaceType})") + }; - if (returnConstructor is null) + if (contract is not null) { - context.ReportDiagnostic(Diagnostic.Create(DiagnosticWarnings.ExpressionMustBeInline, location: invocationExpression.GetLocation())); - return null; + lambdaArguments.Add(Argument(contract)); } - - if (returnConstructor.DeclaredAccessibility < Accessibility.Internal) - { - context.ReportDiagnostic(Diagnostic.Create(DiagnosticWarnings.ConstructorsMustBePublic, returnConstructor.Locations.FirstOrDefault())); - return null; - } - - return returnConstructor; - } - - private static InitializerExpressionSyntax? GetPropertyInitializer(ITypeSymbol concreteTarget, GeneratorExecutionContext context) - { - var propertySet = new List(); - foreach (var property in GetInitializeProperties(concreteTarget)) - { - if (property.SetMethod?.DeclaredAccessibility < Accessibility.Internal) - { - context.ReportDiagnostic(Diagnostic.Create(DiagnosticWarnings.PropertyMustPublicBeSettable, property.SetMethod?.Locations.FirstOrDefault())); - } - - propertySet.Add(AssignmentExpression(SyntaxKind.SimpleAssignmentExpression, property.Name, GetSplatService(property.Type.ToDisplayString(RoslynCommonHelpers.TypeFormat)))); - } - - return propertySet.Count > 0 ? InitializerExpression(SyntaxKind.ObjectInitializerExpression, propertySet) : null; + return ExpressionStatement(InvocationExpression( + MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, LocatorName, RegisterMethodName), + lambdaArguments)); } - - private static IEnumerable GetInitializeProperties(ITypeSymbol concreteTarget) => - concreteTarget - .GetBaseTypesAndThis() - .SelectMany(x => x.GetMembers()) - .Where(x => x.Kind == SymbolKind.Property) - .Cast() - .Where(x => x.GetAttributes().Any(attr => attr.AttributeClass?.ToDisplayString(RoslynCommonHelpers.TypeFormat) == PropertyAttribute)); - - private static CastExpressionSyntax GetSplatService(string parameterTypeName) => - CastExpression( - parameterTypeName, - InvocationExpression( - MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, "Splat.Locator.Current", "GetService"), - new[] - { - Argument($"typeof({parameterTypeName})"), - })); } } diff --git a/src/Splat.DependencyInjection.SourceGenerator/SyntaxReceiver.cs b/src/Splat.DependencyInjection.SourceGenerator/SyntaxReceiver.cs index 9cf058b..14fc4df 100644 --- a/src/Splat.DependencyInjection.SourceGenerator/SyntaxReceiver.cs +++ b/src/Splat.DependencyInjection.SourceGenerator/SyntaxReceiver.cs @@ -1,7 +1,8 @@ -using System; +// Copyright (c) 2019-2021 ReactiveUI Association Incorporated. All rights reserved. +// ReactiveUI Association Incorporated licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; @@ -24,9 +25,8 @@ public void OnVisitSyntaxNode(SyntaxNode syntaxNode) if (invocationExpression.Expression is MemberAccessExpressionSyntax memberAccess) { HandleSimpleName(memberAccess.Name, invocationExpression); - } - + if (invocationExpression.Expression is MemberBindingExpressionSyntax bindingAccess) { HandleSimpleName(bindingAccess.Name, invocationExpression); diff --git a/src/stylecop.json b/src/stylecop.json new file mode 100644 index 0000000..e1b328f --- /dev/null +++ b/src/stylecop.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", + "settings": { + "indentation": { + "useTabs": false, + "indentationSize": 4 + }, + "documentationRules": { + "documentExposedElements": true, + "documentInternalElements": false, + "documentPrivateElements": false, + "documentInterfaces": true, + "documentPrivateFields": false, + "documentationCulture": "en-US", + "companyName": "ReactiveUI Association Incorporated", + "copyrightText": "Copyright (c) 2019-2021 {companyName}. All rights reserved.\n{companyName} licenses this file to you under the {licenseName} license.\nSee the {licenseFile} file in the project root for full license information.", + "variables": { + "licenseName": "MIT", + "licenseFile": "LICENSE" + }, + "xmlHeader": false + }, + "layoutRules": { + "newlineAtEndOfFile": "allow", + "allowConsecutiveUsings": true + }, + "maintainabilityRules": { + "topLevelTypes": [ + "class", + "interface", + "struct", + "enum", + "delegate" + ] + }, + "orderingRules": { + "usingDirectivesPlacement": "outsideNamespace", + "systemUsingDirectivesFirst": true + } + } +} From 8551325dcd1c68973447434d4a5955e51be2a817 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Wed, 14 Jul 2021 10:27:03 +1000 Subject: [PATCH 3/4] fix: warnings not showing origin --- logo.png | Bin 0 -> 69325 bytes src/Directory.Build.props | 6 +- ...yFailcontractParameterTest1.02.verified.cs | 10 -- ...ionFail_contractParameter=.00.verified.txt | 2 +- ...il_contractParameter=Test1.00.verified.txt | 2 +- ...il_contractParameter=Test2.00.verified.txt | 2 +- ...ionFail_contractParameter=.00.verified.txt | 2 +- ...il_contractParameter=Test1.00.verified.txt | 2 +- ...il_contractParameter=Test2.00.verified.txt | 2 +- ...ingletonTests.EmptyConstructor.verified.cs | 86 ------------------ ...tesFail_contractParameter=.00.verified.txt | 2 +- ...il_contractParameter=Test1.00.verified.txt | 2 +- ...il_contractParameter=Test2.00.verified.txt | 2 +- ...uteFail_contractParameter=.00.verified.txt | 2 +- ...il_contractParameter=Test1.00.verified.txt | 2 +- ...il_contractParameter=Test2.00.verified.txt | 2 +- ...ionFail_contractParameter=.00.verified.txt | 2 +- ...il_contractParameter=Test1.00.verified.txt | 2 +- ...il_contractParameter=Test2.00.verified.txt | 2 +- ...ionFail_contractParameter=.00.verified.txt | 2 +- ...il_contractParameter=Test1.00.verified.txt | 2 +- ...il_contractParameter=Test2.00.verified.txt | 2 +- ...tesFail_contractParameter=.00.verified.txt | 2 +- ...il_contractParameter=Test1.00.verified.txt | 2 +- ...il_contractParameter=Test2.00.verified.txt | 2 +- ...uteFail_contractParameter=.00.verified.txt | 2 +- ...il_contractParameter=Test1.00.verified.txt | 2 +- ...il_contractParameter=Test2.00.verified.txt | 2 +- .../TestBase.cs | 1 - .../DiagnosticWarnings.cs | 10 +- .../MetadataExtractor.cs | 8 +- 31 files changed, 38 insertions(+), 131 deletions(-) create mode 100644 logo.png delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFailcontractParameterTest1.02.verified.cs delete mode 100644 src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.verified.cs diff --git a/logo.png b/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..33fe61d174040c4ff4383569c2813597aabf7967 GIT binary patch literal 69325 zcma&N1ys~s8$CMo&;ux4L#m_#N`nIk2%?Aq(x7yT(#=pJt%Tx$G)fB6C9MKOiIg-9 z-JSQ$_`cuw|NiT)yRHji&8+o{bIx=2v!DI!6Mj!im6D8^3<7~rs;epAhd>B8ArSmE zC^7iv(cE)J@Q2U^q5c30{&_>6hJnwdPHK8C5D4rm_CFrt(k2{y$@D@+_l1t5#S1sn z=g%N+Zf?TX4z@1lrcTd<9iLmiUz25qKsX`l$~Palr>uPNNMU{U^(EcmtX06zQyDkqH7uqOnnNTb-kVJ`p? z^}pi(me4$$z z2~YJPue#^$cTT0*&68+l`@BSg#*xxQ0K!2SQ>3r<^4z*JiFuvxGvtW;>Nyiqfo_AW z*`v4MkxI!)47-WnW+vGG2tgB^a9&L?a(#+%;WRUq;UyOL#}4#Wx^71@b)jzRl~u7YcWK2? zJXt)b)Q;s1O68|2$aciww!!8%f zer9%~DTZLpJn(0l8{7OZh)@n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8=H>wW>Fy(gW{A=xv13_hY zKqvTrWC?aZM!qVa`(EiEYt=)vNe^*KIu?|G2|=WvM1_tQUz*Rhk`w^{bFKgqLP}2C z8fb6o%U!(o;C5TK382lMQo3RWLRYmsOLjd-!+_Td%5D{cU0sBzyBP-=*%bAS7#ouwm_44fFG^NoB3NU-!4u+b>x4sZwl>osMoVL&T6ouoUJZWG)o%BnELvPlH~m;S b9JETF@&vkzGzlSqfFJeSI?6?Gi?II(gWRt) literal 0 HcmV?d00001 diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 57b5a91..3a479e0 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -13,7 +13,6 @@ system.reactive;splat;dependency injection https://github.com/reactivemarbles/Splat.DI.SourceGenerator/releases https://github.com/reactivemarbles/Splat.DI.SourceGenerator - https://github.com/reactiveui/styleguide/blob/master/logo_splat/logo.png?raw=true git @@ -22,12 +21,17 @@ true $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + logo.png + + + + $(MSBuildThisFileDirectory) diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFailcontractParameterTest1.02.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFailcontractParameterTest1.02.verified.cs deleted file mode 100644 index eec8961..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFailcontractParameterTest1.02.verified.cs +++ /dev/null @@ -1,10 +0,0 @@ -//HintName: Splat.DI.Extensions.Registrations.SourceGenerated.cs -namespace Splat -{ - internal static partial class SplatRegistrations - { - static SplatRegistrations() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt index 37d1b66..d20982b 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,58)-(22,61), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt index 37d1b66..d20982b 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,58)-(22,61), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt index 37d1b66..d20982b 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,58)-(22,61), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt index d52cc54..48559c4 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,63)-(22,66), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt index d52cc54..48559c4 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,63)-(22,66), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt index d52cc54..48559c4 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,63)-(22,66), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.verified.cs deleted file mode 100644 index 2582669..0000000 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.EmptyConstructor.verified.cs +++ /dev/null @@ -1,86 +0,0 @@ -//HintName: Splat.DI.Extensions.SourceGenerated.cs - -// -namespace Splat -{ - ///

- /// Extension methods for the Splat DI source generator. - /// - internal static partial class SplatRegistrations - { - /// - /// Registers a class with its concrete class. - /// - public static void Register() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void Register(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - public static void RegisterLazySingleton() - { - } - - /// - /// Registers a class with its concrete class. - /// - /// The threading mode. - public static void RegisterLazySingleton(System.Threading.LazyThreadSafetyMode mode) - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - public static void RegisterLazySingleton(string contract) - { - } - - /// - /// Registers a class with its concrete class. - /// - /// Optional contract. - /// The threading mode. - public static void RegisterLazySingleton(string contract, System.Threading.LazyThreadSafetyMode mode) - { - } - } - - /// - /// Makes the property get added by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Property)] - internal class DependencyInjectionPropertyAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionPropertyAttribute() - { - } - } - - /// - /// Makes this the constructor used by the DI engine. - /// - [System.AttributeUsage(System.AttributeTargets.Constructor)] - internal class DependencyInjectionConstructorAttribute : System.Attribute - { - /// - /// Initializes a new instance of the class. - /// - public DependencyInjectionConstructorAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt index f784ab8..01fd3fc 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (23,15)-(23,27), - MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + MessageFormat: {0} has multiple constructors marked with the DependencyInjectionConstructorAttribute attribute change so only one is marked, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt index f784ab8..01fd3fc 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (23,15)-(23,27), - MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + MessageFormat: {0} has multiple constructors marked with the DependencyInjectionConstructorAttribute attribute change so only one is marked, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt index f784ab8..01fd3fc 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (23,15)-(23,27), - MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + MessageFormat: {0} has multiple constructors marked with the DependencyInjectionConstructorAttribute attribute change so only one is marked, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt index 45a9704..804053b 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (10,12)-(10,75), - MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + MessageFormat: {0} has more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt index ec03e3d..8ed65fb 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (10,12)-(10,82), - MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + MessageFormat: {0} has more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt index ec03e3d..8ed65fb 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (10,12)-(10,82), - MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + MessageFormat: {0} has more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt index 37d1b66..d20982b 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,58)-(22,61), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt index 37d1b66..d20982b 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test1.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,58)-(22,61), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt index 37d1b66..d20982b 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertyInjectionFail_contractParameter=Test2.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,58)-(22,61), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt index d52cc54..48559c4 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,63)-(22,66), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt index d52cc54..48559c4 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test1.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,63)-(22,66), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt index d52cc54..48559c4 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.ConstructionAndNonPublicPropertySetterInjectionFail_contractParameter=Test2.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (22,63)-(22,66), - MessageFormat: DependencyInjectionPropertyAttribute property must have a public or internal setter, + MessageFormat: {0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt index f784ab8..01fd3fc 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (23,15)-(23,27), - MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + MessageFormat: {0} has multiple constructors marked with the DependencyInjectionConstructorAttribute attribute change so only one is marked, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt index f784ab8..01fd3fc 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test1.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (23,15)-(23,27), - MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + MessageFormat: {0} has multiple constructors marked with the DependencyInjectionConstructorAttribute attribute change so only one is marked, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt index f784ab8..01fd3fc 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithMultipleAttributesFail_contractParameter=Test2.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (23,15)-(23,27), - MessageFormat: One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute, + MessageFormat: {0} has multiple constructors marked with the DependencyInjectionConstructorAttribute attribute change so only one is marked, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt index bf06402..2108894 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (10,12)-(10,62), - MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + MessageFormat: {0} has more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt index 281437e..779aad9 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test1.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (10,12)-(10,69), - MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + MessageFormat: {0} has more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt index 281437e..779aad9 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeFail_contractParameter=Test2.00.verified.txt @@ -6,7 +6,7 @@ Severity: Error, WarningLevel: 0, Location: : (10,12)-(10,69), - MessageFormat: There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, + MessageFormat: {0} has more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute, Category: Compiler } ] diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs index 2cb5979..8d266d6 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs @@ -625,7 +625,6 @@ protected Task TestPass(string source, string contractParameter, [CallerFilePath var driver = Generate(source); VerifySettings settings = new(); settings.UseParameters(contractParameter); - settings.AutoVerify(); return Verifier.Verify(driver, settings, sourceFile: file); } diff --git a/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs b/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs index 586ffd4..16349cc 100644 --- a/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs +++ b/src/Splat.DependencyInjection.SourceGenerator/DiagnosticWarnings.cs @@ -8,10 +8,10 @@ namespace Splat.DependencyInjection.SourceGenerator { internal static class DiagnosticWarnings { - internal static readonly DiagnosticDescriptor ExpressionMustBeInline = new( + internal static readonly DiagnosticDescriptor MultipleConstructorNeedAttribute = new( id: "SPLATDI001", title: "Can't find valid constructor", - messageFormat: "There are more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute", + messageFormat: "{0} has more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute", category: "Compiler", defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true); @@ -19,7 +19,7 @@ internal static class DiagnosticWarnings internal static readonly DiagnosticDescriptor PropertyMustPublicBeSettable = new( id: "SPLATDI002", title: "Property must be public/internal settable", - messageFormat: "DependencyInjectionPropertyAttribute property must have a public or internal setter", + messageFormat: "{0} property marked with DependencyInjectionPropertyAttribute must have a public or internal setter", category: "Compiler", defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true); @@ -27,7 +27,7 @@ internal static class DiagnosticWarnings internal static readonly DiagnosticDescriptor MultipleConstructorsMarked = new( id: "SPLATDI003", title: "Multiple constructors have DependencyInjectionConstructorAttribute", - messageFormat: "One one constructor should be marked with the DependencyInjectionConstructorAttribute attribute", + messageFormat: "{0} has multiple constructors marked with the DependencyInjectionConstructorAttribute attribute change so only one is marked", category: "Compiler", defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true); @@ -35,7 +35,7 @@ internal static class DiagnosticWarnings internal static readonly DiagnosticDescriptor ConstructorsMustBePublic = new( id: "SPLATDI004", title: "Constructors not public or internal", - messageFormat: "Constructor declared with DependencyInjectionConstructorAttribute attribute must be public or internal", + messageFormat: "{0} constructor declared with DependencyInjectionConstructorAttribute attribute must be public or internal", category: "Compiler", defaultSeverity: DiagnosticSeverity.Error, isEnabledByDefault: true); diff --git a/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs b/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs index 1f3067c..0b5382f 100644 --- a/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs +++ b/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs @@ -140,7 +140,7 @@ private static IEnumerable GetConstructorDependen { if (returnConstructor != null) { - throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.MultipleConstructorsMarked, constructor.Locations.FirstOrDefault())); + throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.MultipleConstructorsMarked, constructor.Locations.FirstOrDefault(), concreteTarget.ToDisplayString(RoslynCommonHelpers.TypeFormat))); } returnConstructor = constructor; @@ -150,12 +150,12 @@ private static IEnumerable GetConstructorDependen if (returnConstructor is null) { - throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.ExpressionMustBeInline, invocationExpression.GetLocation())); + throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.MultipleConstructorNeedAttribute, invocationExpression.GetLocation(), concreteTarget.ToDisplayString(RoslynCommonHelpers.TypeFormat))); } if (returnConstructor.DeclaredAccessibility < Accessibility.Internal) { - throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.ConstructorsMustBePublic, returnConstructor.Locations.FirstOrDefault())); + throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.ConstructorsMustBePublic, returnConstructor.Locations.FirstOrDefault(), concreteTarget.ToDisplayString(RoslynCommonHelpers.TypeFormat))); } return returnConstructor.Parameters.Select(x => new ConstructorDependencyMetadata(x, x.Type)); @@ -174,7 +174,7 @@ private static IEnumerable GetPropertyDependencies(I { if (property.SetMethod?.DeclaredAccessibility < Accessibility.Internal) { - throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.PropertyMustPublicBeSettable, property.SetMethod?.Locations.FirstOrDefault())); + throw new ContextDiagnosticException(Diagnostic.Create(DiagnosticWarnings.PropertyMustPublicBeSettable, property.SetMethod?.Locations.FirstOrDefault(), property.ToDisplayString(RoslynCommonHelpers.TypeFormat))); } yield return new PropertyDependencyMetadata(property); From 383638c54df1c2ead158481ffb1674e79e52cbeb Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Wed, 14 Jul 2021 10:35:52 +1000 Subject: [PATCH 4/4] Minor updates --- ...t.DependencyInjection.SourceGenerator.Tests.csproj | 4 ++-- .../AnalyzerReleases.Shipped.md | 11 +++++++++++ .../Metadata/ParameterMetadata.cs | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 src/Splat.DependencyInjection.SourceGenerator/AnalyzerReleases.Shipped.md diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj b/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj index 57fd2b5..2bfebdf 100644 --- a/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj +++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/Splat.DependencyInjection.SourceGenerator.Tests.csproj @@ -5,7 +5,7 @@ false enable - $(NoWarn);SA1600 + $(NoWarn);SA1600;CS1591 @@ -19,7 +19,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/src/Splat.DependencyInjection.SourceGenerator/AnalyzerReleases.Shipped.md b/src/Splat.DependencyInjection.SourceGenerator/AnalyzerReleases.Shipped.md new file mode 100644 index 0000000..7843a33 --- /dev/null +++ b/src/Splat.DependencyInjection.SourceGenerator/AnalyzerReleases.Shipped.md @@ -0,0 +1,11 @@ +## Release 1.0 + +### New Rules + +Rule ID | Category | Severity | Notes +------------|----------|----------|-------------------- +SPLATDI001 | Design | Error | +SPLATDI002 | Design | Error | +SPLATDI003 | Design | Error | +SPLATDI004 | Design | Error | +SPLATDI005 | Design | Error | diff --git a/src/Splat.DependencyInjection.SourceGenerator/Metadata/ParameterMetadata.cs b/src/Splat.DependencyInjection.SourceGenerator/Metadata/ParameterMetadata.cs index 83f3bce..4d6cdf7 100644 --- a/src/Splat.DependencyInjection.SourceGenerator/Metadata/ParameterMetadata.cs +++ b/src/Splat.DependencyInjection.SourceGenerator/Metadata/ParameterMetadata.cs @@ -8,5 +8,5 @@ namespace Splat.DependencyInjection.SourceGenerator.Metadata { - public record ParameterMetadata(string ParameterName, string ParameterValue); + internal record ParameterMetadata(string ParameterName, string ParameterValue); }