diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..ffa25cc
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,12 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.g.verified.cs
@@ -0,0 +1,149 @@
+//HintName: Splat.DI.g.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)
+ {
+ }
+
+ ///
+ /// 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 lazy class with its concrete class.
+ ///
+ public static void RegisterLazySingleton()
+ {
+ }
+
+
+ ///
+ /// Registers a lazy class with its concrete class.
+ ///
+ /// Optional contract.
+ public static void RegisterLazySingleton(string contract)
+ {
+ }
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ public static void RegisterConstant(T instance) => Splat.Locator.CurrentMutable.RegisterConstant(instance);
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ /// Optional contract.
+ public static void RegisterConstant(T instance, string contract) => Splat.Locator.CurrentMutable.RegisterConstant(instance, contract);
+
+ ///
+ /// Registers the registrations.
+ ///
+ public static void SetupIOC()
+ {
+ SetupIOCInternal(Splat.Locator.GetLocator());
+ }
+
+ ///
+ /// Registers the registrations.
+ ///
+ /// The resolver to register with.
+ public static void SetupIOC(Splat.IDependencyResolver resolver)
+ {
+ SetupIOCInternal(resolver);
+ }
+
+
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver);
+ }
+
+ ///
+ /// 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.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..ffa25cc
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,12 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.g.verified.cs
@@ -0,0 +1,149 @@
+//HintName: Splat.DI.g.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)
+ {
+ }
+
+ ///
+ /// 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 lazy class with its concrete class.
+ ///
+ public static void RegisterLazySingleton()
+ {
+ }
+
+
+ ///
+ /// Registers a lazy class with its concrete class.
+ ///
+ /// Optional contract.
+ public static void RegisterLazySingleton(string contract)
+ {
+ }
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ public static void RegisterConstant(T instance) => Splat.Locator.CurrentMutable.RegisterConstant(instance);
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ /// Optional contract.
+ public static void RegisterConstant(T instance, string contract) => Splat.Locator.CurrentMutable.RegisterConstant(instance, contract);
+
+ ///
+ /// Registers the registrations.
+ ///
+ public static void SetupIOC()
+ {
+ SetupIOCInternal(Splat.Locator.GetLocator());
+ }
+
+ ///
+ /// Registers the registrations.
+ ///
+ /// The resolver to register with.
+ public static void SetupIOC(Splat.IDependencyResolver resolver)
+ {
+ SetupIOCInternal(resolver);
+ }
+
+
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver);
+ }
+
+ ///
+ /// 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.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..ffa25cc
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,12 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.g.verified.cs
@@ -0,0 +1,149 @@
+//HintName: Splat.DI.g.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)
+ {
+ }
+
+ ///
+ /// 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 lazy class with its concrete class.
+ ///
+ public static void RegisterLazySingleton()
+ {
+ }
+
+
+ ///
+ /// Registers a lazy class with its concrete class.
+ ///
+ /// Optional contract.
+ public static void RegisterLazySingleton(string contract)
+ {
+ }
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ public static void RegisterConstant(T instance) => Splat.Locator.CurrentMutable.RegisterConstant(instance);
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ /// Optional contract.
+ public static void RegisterConstant(T instance, string contract) => Splat.Locator.CurrentMutable.RegisterConstant(instance, contract);
+
+ ///
+ /// Registers the registrations.
+ ///
+ public static void SetupIOC()
+ {
+ SetupIOCInternal(Splat.Locator.GetLocator());
+ }
+
+ ///
+ /// Registers the registrations.
+ ///
+ /// The resolver to register with.
+ public static void SetupIOC(Splat.IDependencyResolver resolver)
+ {
+ SetupIOCInternal(resolver);
+ }
+
+
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver);
+ }
+
+ ///
+ /// 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.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..ffa25cc
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,12 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass#Splat.DI.g.verified.cs
@@ -0,0 +1,149 @@
+//HintName: Splat.DI.g.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)
+ {
+ }
+
+ ///
+ /// 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 lazy class with its concrete class.
+ ///
+ public static void RegisterLazySingleton()
+ {
+ }
+
+
+ ///
+ /// Registers a lazy class with its concrete class.
+ ///
+ /// Optional contract.
+ public static void RegisterLazySingleton(string contract)
+ {
+ }
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ public static void RegisterConstant(T instance) => Splat.Locator.CurrentMutable.RegisterConstant(instance);
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ /// Optional contract.
+ public static void RegisterConstant(T instance, string contract) => Splat.Locator.CurrentMutable.RegisterConstant(instance, contract);
+
+ ///
+ /// Registers the registrations.
+ ///
+ public static void SetupIOC()
+ {
+ SetupIOCInternal(Splat.Locator.GetLocator());
+ }
+
+ ///
+ /// Registers the registrations.
+ ///
+ /// The resolver to register with.
+ public static void SetupIOC(Splat.IDependencyResolver resolver)
+ {
+ SetupIOCInternal(resolver);
+ }
+
+
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver);
+ }
+
+ ///
+ /// 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.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..ffa25cc
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,12 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass_Test1#Splat.DI.g.verified.cs
@@ -0,0 +1,149 @@
+//HintName: Splat.DI.g.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)
+ {
+ }
+
+ ///
+ /// 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 lazy class with its concrete class.
+ ///
+ public static void RegisterLazySingleton()
+ {
+ }
+
+
+ ///
+ /// Registers a lazy class with its concrete class.
+ ///
+ /// Optional contract.
+ public static void RegisterLazySingleton(string contract)
+ {
+ }
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ public static void RegisterConstant(T instance) => Splat.Locator.CurrentMutable.RegisterConstant(instance);
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ /// Optional contract.
+ public static void RegisterConstant(T instance, string contract) => Splat.Locator.CurrentMutable.RegisterConstant(instance, contract);
+
+ ///
+ /// Registers the registrations.
+ ///
+ public static void SetupIOC()
+ {
+ SetupIOCInternal(Splat.Locator.GetLocator());
+ }
+
+ ///
+ /// Registers the registrations.
+ ///
+ /// The resolver to register with.
+ public static void SetupIOC(Splat.IDependencyResolver resolver)
+ {
+ SetupIOCInternal(resolver);
+ }
+
+
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver);
+ }
+
+ ///
+ /// 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.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..ffa25cc
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,12 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterTests.MultipleConstructorWithoutAttributeNonDIPass_Test2#Splat.DI.g.verified.cs
@@ -0,0 +1,149 @@
+//HintName: Splat.DI.g.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)
+ {
+ }
+
+ ///
+ /// 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 lazy class with its concrete class.
+ ///
+ public static void RegisterLazySingleton()
+ {
+ }
+
+
+ ///
+ /// Registers a lazy class with its concrete class.
+ ///
+ /// Optional contract.
+ public static void RegisterLazySingleton(string contract)
+ {
+ }
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ public static void RegisterConstant(T instance) => Splat.Locator.CurrentMutable.RegisterConstant(instance);
+
+ ///
+ /// Proxy for the Splat SetService.
+ ///
+ /// Optional contract.
+ public static void RegisterConstant(T instance, string contract) => Splat.Locator.CurrentMutable.RegisterConstant(instance, contract);
+
+ ///
+ /// Registers the registrations.
+ ///
+ public static void SetupIOC()
+ {
+ SetupIOCInternal(Splat.Locator.GetLocator());
+ }
+
+ ///
+ /// Registers the registrations.
+ ///
+ /// The resolver to register with.
+ public static void SetupIOC(Splat.IDependencyResolver resolver)
+ {
+ SetupIOCInternal(resolver);
+ }
+
+
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver);
+ }
+
+ ///
+ /// 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/TestBase.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs
index 0a3f3a7..74f1fd2 100644
--- a/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/TestBase.cs
@@ -492,6 +492,42 @@ public interface IService2 {{ }}
return TestHelper.TestFail(source, contractParameter, GetType());
}
+ [Theory]
+ [InlineData("")]
+ [InlineData("Test1")]
+ [InlineData("Test2")]
+ public Task MultipleConstructorWithoutAttributeNonDIPass(string contractParameter)
+ {
+ var arguments = string.IsNullOrWhiteSpace(contractParameter) ? string.Empty : '"' + contractParameter + '"';
+ var source = @$"
+using System;
+
+namespace Test
+{{
+ public interface ITest {{ }}
+ public class TestConcrete : ITest
+ {{
+ public static TestConcrete Instance = new(default!);
+ public TestConcrete(IService1 service1, IService2 service)
+ {{
+ Instance.{testMethod}({arguments});
+ }}
+
+ public TestConcrete(IService1 service1)
+ {{
+ }}
+ public void {testMethod}(params object[] args)
+ {{
+ }}
+ }}
+
+ public interface IService1 {{ }}
+ public interface IService2 {{ }}
+}}";
+
+ return TestHelper.TestPass(source, contractParameter, GetType());
+ }
+
[Theory]
[InlineData("")]
[InlineData("Test1")]
diff --git a/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs b/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs
index 2df34c1..666ceeb 100644
--- a/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs
+++ b/src/Splat.DependencyInjection.SourceGenerator/MetadataExtractor.cs
@@ -102,6 +102,12 @@ public static IEnumerable GetValidMethods(GeneratorExecutionCont
return null;
}
+ var invocationTarget = methodSymbol.ContainingType.OriginalDefinition;
+ if (invocationTarget is not { ContainingNamespace.Name: Constants.NamespaceName, Name: Constants.ClassName })
+ {
+ return null;
+ }
+
var numberTypeParameters = methodSymbol.TypeArguments.Length;
if (numberTypeParameters is 0 or > 2)