diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index b17be43..b70ec23 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -32,7 +32,7 @@
-
+
@@ -47,9 +47,9 @@
-
+
-
\ No newline at end of file
+
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs
index 5303908..0348a91 100644
--- a/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/ModuleInitializer.cs
@@ -15,5 +15,5 @@ public static class ModuleInitializer
/// Initializes the source generators.
///
[ModuleInitializer]
- public static void Init() => VerifySourceGenerators.Enable();
+ public static void Init() => VerifySourceGenerators.Initialize();
}
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..ffa25cc
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail#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.CircularDependencyFail#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail#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.CircularDependencyFail.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail.verified.txt
new file mode 100644
index 0000000..796078d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail.verified.txt
@@ -0,0 +1,28 @@
+{
+ Diagnostics: [
+ {
+ Id: SPLATDI005,
+ Title: Constructors must not have a circular dependency,
+ Severity: Error,
+ WarningLevel: 0,
+ Location: Unknown File: (26,36)-(26,44),
+ Description: ,
+ HelpLink: ,
+ MessageFormat: Constructor parameters must not have a circular dependency to another registered resource,
+ Message: 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: Unknown File: (18,36)-(18,44),
+ Description: ,
+ HelpLink: ,
+ MessageFormat: Constructor parameters must not have a circular dependency to another registered resource,
+ Message: 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.CircularDependencyFail_Test1#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_Test1#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..ffa25cc
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_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.CircularDependencyFail_Test1#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_Test1#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_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.CircularDependencyFail_Test1.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_Test1.verified.txt
new file mode 100644
index 0000000..796078d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_Test1.verified.txt
@@ -0,0 +1,28 @@
+{
+ Diagnostics: [
+ {
+ Id: SPLATDI005,
+ Title: Constructors must not have a circular dependency,
+ Severity: Error,
+ WarningLevel: 0,
+ Location: Unknown File: (26,36)-(26,44),
+ Description: ,
+ HelpLink: ,
+ MessageFormat: Constructor parameters must not have a circular dependency to another registered resource,
+ Message: 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: Unknown File: (18,36)-(18,44),
+ Description: ,
+ HelpLink: ,
+ MessageFormat: Constructor parameters must not have a circular dependency to another registered resource,
+ Message: 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.CircularDependencyFail_Test2#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_Test2#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..ffa25cc
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_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.CircularDependencyFail_Test2#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_Test2#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_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/RegisterLazySingletonTests.CircularDependencyFail_Test2.verified.txt b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_Test2.verified.txt
new file mode 100644
index 0000000..796078d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.CircularDependencyFail_Test2.verified.txt
@@ -0,0 +1,28 @@
+{
+ Diagnostics: [
+ {
+ Id: SPLATDI005,
+ Title: Constructors must not have a circular dependency,
+ Severity: Error,
+ WarningLevel: 0,
+ Location: Unknown File: (26,36)-(26,44),
+ Description: ,
+ HelpLink: ,
+ MessageFormat: Constructor parameters must not have a circular dependency to another registered resource,
+ Message: 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: Unknown File: (18,36)-(18,44),
+ Description: ,
+ HelpLink: ,
+ MessageFormat: Constructor parameters must not have a circular dependency to another registered resource,
+ Message: 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.ConstructionAndInternalPropertyInjection#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..93b8007
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty = (global::Test.IServiceProperty)resolver.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#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection#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.ConstructionAndInternalPropertyInjectionTypeArgument#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..42f56e3
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty = (global::Test.IServiceProperty)resolver.GetService(typeof(global::Test.IServiceProperty))} );
+ Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy));
+ Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.TestConcrete));
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument#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.ConstructionAndInternalPropertyInjectionTypeArgument_Test1#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument_Test1#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..e0928a9
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument_Test1#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty = (global::Test.IServiceProperty)resolver.GetService(typeof(global::Test.IServiceProperty))} );
+ Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test1");
+ Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.TestConcrete), "Test1");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument_Test1#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument_Test1#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument_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.ConstructionAndInternalPropertyInjectionTypeArgument_Test2#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument_Test2#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..66a756f
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument_Test2#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty = (global::Test.IServiceProperty)resolver.GetService(typeof(global::Test.IServiceProperty))} );
+ Splat.Locator.CurrentMutable.Register(() => lazy, typeof(global::System.Lazy), "Test2");
+ Splat.Locator.CurrentMutable.Register(() => lazy.Value, typeof(global::Test.TestConcrete), "Test2");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument_Test2#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument_Test2#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjectionTypeArgument_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/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_Test1#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_Test1#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..6fcc669
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_Test1#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty = (global::Test.IServiceProperty)resolver.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_Test1#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_Test1#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_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.ConstructionAndInternalPropertyInjection_Test2#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_Test2#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..b4a7556
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_Test2#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty = (global::Test.IServiceProperty)resolver.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.ConstructionAndInternalPropertyInjection_Test2#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_Test2#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalPropertyInjection_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/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..93b8007
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty = (global::Test.IServiceProperty)resolver.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#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection#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.ConstructionAndInternalSetterPropertyInjection_Test1#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_Test1#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..6fcc669
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_Test1#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty = (global::Test.IServiceProperty)resolver.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_Test1#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_Test1#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_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.ConstructionAndInternalSetterPropertyInjection_Test2#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_Test2#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..b4a7556
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_Test2#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty = (global::Test.IServiceProperty)resolver.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_Test2#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_Test2#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndInternalSetterPropertyInjection_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/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..6ae4eeb
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty1 = (global::Test.IServiceProperty1)resolver.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2 = (global::Test.IServiceProperty2)resolver.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3 = (global::Test.IServiceProperty3)resolver.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#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjection#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.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_ExecutionAndPublication#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_ExecutionAndPublication#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..0f95a2f
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_ExecutionAndPublication#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty1 = (global::Test.IServiceProperty1)resolver.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2 = (global::Test.IServiceProperty2)resolver.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3 = (global::Test.IServiceProperty3)resolver.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_Test1_ExecutionAndPublication#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_ExecutionAndPublication#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_ExecutionAndPublication#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.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_None#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_None#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..781ad40
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_None#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty1 = (global::Test.IServiceProperty1)resolver.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2 = (global::Test.IServiceProperty2)resolver.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3 = (global::Test.IServiceProperty3)resolver.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_Test1_None#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_None#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_None#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.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_PublicationOnly#Splat.DI.Reg.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_PublicationOnly#Splat.DI.Reg.g.verified.cs
new file mode 100644
index 0000000..711e50d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_PublicationOnly#Splat.DI.Reg.g.verified.cs
@@ -0,0 +1,17 @@
+//HintName: Splat.DI.Reg.g.cs
+
+//
+namespace Splat
+{
+ internal static partial class SplatRegistrations
+ {
+ static partial void SetupIOCInternal(Splat.IDependencyResolver resolver)
+ {
+ {
+ global::System.Lazy lazy = new global::System.Lazy(() => new global::Test.TestConcrete((global::Test.IService1)resolver.GetService(typeof(global::Test.IService1)), (global::Test.IService2)resolver.GetService(typeof(global::Test.IService2))){ ServiceProperty1 = (global::Test.IServiceProperty1)resolver.GetService(typeof(global::Test.IServiceProperty1)), ServiceProperty2 = (global::Test.IServiceProperty2)resolver.GetService(typeof(global::Test.IServiceProperty2)), ServiceProperty3 = (global::Test.IServiceProperty3)resolver.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_Test1_PublicationOnly#Splat.DI.g.verified.cs b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_PublicationOnly#Splat.DI.g.verified.cs
new file mode 100644
index 0000000..1ca6b3d
--- /dev/null
+++ b/src/Splat.DependencyInjection.SourceGenerator.Tests/RegisterLazySingletonTests.ConstructionAndMultiplePropertyInjectionWithLazyMode_Test1_PublicationOnly#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)
+ {
+ }
+
+ ///