diff --git a/logo.png b/logo.png
new file mode 100644
index 0000000..33fe61d
Binary files /dev/null and b/logo.png differ
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.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.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/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.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/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/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/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);
}
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);