├── .editorconfig ├── .gitattributes ├── .github └── workflows │ ├── doxygen.yml │ ├── linter.yml │ └── tests.yml ├── .gitignore ├── Assets ├── Demo.meta ├── Demo │ ├── Graphics.meta │ ├── Graphics │ │ ├── Materials.meta │ │ └── Materials │ │ │ ├── Bullet.mat │ │ │ ├── Bullet.mat.meta │ │ │ ├── Ground.mat │ │ │ ├── Ground.mat.meta │ │ │ ├── Player.mat │ │ │ ├── Player.mat.meta │ │ │ ├── Skybox.mat │ │ │ ├── Skybox.mat.meta │ │ │ ├── Turret Gun.mat │ │ │ ├── Turret Gun.mat.meta │ │ │ ├── Turret.mat │ │ │ └── Turret.mat.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── Bullet.prefab │ │ ├── Bullet.prefab.meta │ │ ├── Effects.meta │ │ ├── Effects │ │ │ ├── Bullet Destruction Effect.prefab │ │ │ ├── Bullet Destruction Effect.prefab.meta │ │ │ ├── Player Destruction Effect.prefab │ │ │ └── Player Destruction Effect.prefab.meta │ │ ├── Player.prefab │ │ ├── Player.prefab.meta │ │ ├── Turret.prefab │ │ └── Turret.prefab.meta │ ├── Resources.meta │ ├── Resources │ │ ├── Bullet Factory Config.asset │ │ └── Bullet Factory Config.asset.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── SampleScene.meta │ │ ├── SampleScene.unity │ │ ├── SampleScene.unity.meta │ │ ├── SampleSceneSettings.lighting │ │ └── SampleSceneSettings.lighting.meta │ ├── Scripts.meta │ └── Scripts │ │ ├── Bullets.meta │ │ ├── Bullets │ │ ├── Bullet.cs │ │ ├── Bullet.cs.meta │ │ ├── BulletFactory.cs │ │ ├── BulletFactory.cs.meta │ │ ├── BulletHitTrigger.cs │ │ ├── BulletHitTrigger.cs.meta │ │ ├── ILogger.cs │ │ ├── ILogger.cs.meta │ │ ├── IProjectileFactory.cs │ │ ├── IProjectileFactory.cs.meta │ │ ├── UnityLogger.cs │ │ └── UnityLogger.cs.meta │ │ ├── Damage.meta │ │ ├── Damage │ │ ├── IDestroyable.cs │ │ ├── IDestroyable.cs.meta │ │ ├── IHittable.cs │ │ └── IHittable.cs.meta │ │ ├── Dependencies.meta │ │ ├── Dependencies │ │ ├── BulletFactoryConfig.cs │ │ ├── BulletFactoryConfig.cs.meta │ │ ├── CompositionRoot.cs │ │ └── CompositionRoot.cs.meta │ │ ├── Effects.meta │ │ ├── Effects │ │ ├── DestructionEffect.cs │ │ └── DestructionEffect.cs.meta │ │ ├── InjectablePoco.cs │ │ ├── InjectablePoco.cs.meta │ │ ├── Movement.meta │ │ ├── Movement │ │ ├── IMovement.cs │ │ ├── IMovement.cs.meta │ │ ├── Movement.cs │ │ └── Movement.cs.meta │ │ ├── Player.cs │ │ ├── Player.cs.meta │ │ ├── Shooting.meta │ │ ├── Shooting │ │ ├── IShootFrom.cs │ │ ├── IShootFrom.cs.meta │ │ ├── IShootingTarget.cs │ │ └── IShootingTarget.cs.meta │ │ ├── TestPocoBaking.meta │ │ ├── TestPocoBaking │ │ ├── TestPoco.cs │ │ ├── TestPoco.cs.meta │ │ ├── TestPocoContainer.cs │ │ ├── TestPocoContainer.cs.meta │ │ ├── TestPocoDependant.cs │ │ └── TestPocoDependant.cs.meta │ │ ├── Turrets.meta │ │ ├── Turrets │ │ ├── Turret.cs │ │ ├── Turret.cs.meta │ │ ├── TurretAim.cs │ │ ├── TurretAim.cs.meta │ │ ├── TurretHead.cs │ │ └── TurretHead.cs.meta │ │ ├── TwoConstructorsClass.cs │ │ ├── TwoConstructorsClass.cs.meta │ │ ├── UI.meta │ │ └── UI │ │ ├── PointerControls.cs │ │ ├── PointerControls.cs.meta │ │ ├── RestartSceneButton.cs │ │ └── RestartSceneButton.cs.meta ├── PerformanceTest.meta ├── PerformanceTest │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── With DI.prefab │ │ ├── With DI.prefab.meta │ │ ├── Without DI.prefab │ │ └── Without DI.prefab.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── PerformanceTestScene.unity │ │ └── PerformanceTestScene.unity.meta │ ├── Scripts.meta │ └── Scripts │ │ ├── DI.meta │ │ ├── DI │ │ ├── Dependency1.cs │ │ ├── Dependency1.cs.meta │ │ ├── Dependency2.cs │ │ ├── Dependency2.cs.meta │ │ ├── Dependency3.cs │ │ ├── Dependency3.cs.meta │ │ ├── Dependent1.cs │ │ ├── Dependent1.cs.meta │ │ ├── Dependent12.cs │ │ ├── Dependent12.cs.meta │ │ ├── Dependent123.cs │ │ ├── Dependent123.cs.meta │ │ ├── Dependent13.cs │ │ ├── Dependent13.cs.meta │ │ ├── Dependent2.cs │ │ ├── Dependent2.cs.meta │ │ ├── Dependent3.cs │ │ └── Dependent3.cs.meta │ │ ├── PeriodicSpawner.cs │ │ └── PeriodicSpawner.cs.meta ├── Resources.meta ├── Resources │ ├── DI Settings.asset │ └── DI Settings.asset.meta ├── Scripts.meta ├── Scripts │ ├── DI.meta │ └── DI │ │ ├── Baked.meta │ │ └── Baked │ │ └── .gitkeep ├── TextMesh Pro.meta └── TextMesh Pro │ ├── Documentation.meta │ ├── Documentation │ ├── TextMesh Pro User Guide 2016.pdf │ └── TextMesh Pro User Guide 2016.pdf.meta │ ├── Fonts.meta │ ├── Fonts │ ├── LiberationSans - OFL.txt │ ├── LiberationSans - OFL.txt.meta │ ├── LiberationSans.ttf │ └── LiberationSans.ttf.meta │ ├── Resources.meta │ ├── Resources │ ├── Fonts & Materials.meta │ ├── Fonts & Materials │ │ ├── LiberationSans SDF - Drop Shadow.mat │ │ ├── LiberationSans SDF - Drop Shadow.mat.meta │ │ ├── LiberationSans SDF - Fallback.asset │ │ ├── LiberationSans SDF - Fallback.asset.meta │ │ ├── LiberationSans SDF - Outline.mat │ │ ├── LiberationSans SDF - Outline.mat.meta │ │ ├── LiberationSans SDF.asset │ │ └── LiberationSans SDF.asset.meta │ ├── LineBreaking Following Characters.txt │ ├── LineBreaking Following Characters.txt.meta │ ├── LineBreaking Leading Characters.txt │ ├── LineBreaking Leading Characters.txt.meta │ ├── Shaders.meta │ ├── Shaders │ │ ├── TMP_Bitmap-Custom-Atlas.shader │ │ ├── TMP_Bitmap-Custom-Atlas.shader.meta │ │ ├── TMP_Bitmap-Mobile.shader │ │ ├── TMP_Bitmap-Mobile.shader.meta │ │ ├── TMP_Bitmap.shader │ │ ├── TMP_Bitmap.shader.meta │ │ ├── TMP_SDF Overlay.shader │ │ ├── TMP_SDF Overlay.shader.meta │ │ ├── TMP_SDF-Mobile Masking.shader │ │ ├── TMP_SDF-Mobile Masking.shader.meta │ │ ├── TMP_SDF-Mobile Overlay.shader │ │ ├── TMP_SDF-Mobile Overlay.shader.meta │ │ ├── TMP_SDF-Mobile.shader │ │ ├── TMP_SDF-Mobile.shader.meta │ │ ├── TMP_SDF-Surface-Mobile.shader │ │ ├── TMP_SDF-Surface-Mobile.shader.meta │ │ ├── TMP_SDF-Surface.shader │ │ ├── TMP_SDF-Surface.shader.meta │ │ ├── TMP_SDF.shader │ │ ├── TMP_SDF.shader.meta │ │ ├── TMP_Sprite.shader │ │ ├── TMP_Sprite.shader.meta │ │ ├── TMPro.cginc │ │ ├── TMPro.cginc.meta │ │ ├── TMPro_Properties.cginc │ │ ├── TMPro_Properties.cginc.meta │ │ ├── TMPro_Surface.cginc │ │ └── TMPro_Surface.cginc.meta │ ├── Sprite Assets.meta │ ├── Sprite Assets │ │ ├── EmojiOne.asset │ │ └── EmojiOne.asset.meta │ ├── Style Sheets.meta │ ├── Style Sheets │ │ ├── Default Style Sheet.asset │ │ └── Default Style Sheet.asset.meta │ ├── TMP Settings.asset │ └── TMP Settings.asset.meta │ ├── Sprites.meta │ └── Sprites │ ├── EmojiOne Attribution.txt │ ├── EmojiOne Attribution.txt.meta │ ├── EmojiOne.json │ ├── EmojiOne.json.meta │ ├── EmojiOne.png │ └── EmojiOne.png.meta ├── DIFramework.Editor.csproj.DotSettings ├── DIFramework.Lifecycle.csproj.DotSettings ├── DIFramework.PerformanceTests.csproj.DotSettings ├── DIFramework.PlayTests.csproj.DotSettings ├── DIFramework.csproj.DotSettings ├── Documentation ├── Doxyfile └── static │ ├── LICENSE │ ├── doxygen-awesome-sidebar-only.css │ ├── doxygen-awesome.css │ ├── favicon.ico │ └── header.html ├── LICENSE.md ├── Macros ├── ctordi.txt └── ctordip.txt ├── Packages ├── com.deltation.di-framework.meta ├── com.deltation.di-framework │ ├── Assets.meta │ ├── Assets │ │ ├── DELTation.meta │ │ ├── DELTation │ │ │ ├── DIFramework.meta │ │ │ └── DIFramework │ │ │ │ ├── Editor.meta │ │ │ │ ├── Editor │ │ │ │ ├── BakeOnBuildPreprocessor.cs │ │ │ │ ├── BakeOnBuildPreprocessor.cs.meta │ │ │ │ ├── Baking.meta │ │ │ │ ├── Baking │ │ │ │ │ ├── InjectionBaker.cs │ │ │ │ │ ├── InjectionBaker.cs.meta │ │ │ │ │ ├── InjectionBakingData.cs │ │ │ │ │ ├── InjectionBakingData.cs.meta │ │ │ │ │ ├── InjectionBakingMenu.cs │ │ │ │ │ ├── InjectionBakingMenu.cs.meta │ │ │ │ │ ├── InjectionBakingTypesUtils.cs │ │ │ │ │ └── InjectionBakingTypesUtils.cs.meta │ │ │ │ ├── ChildrenDependencyContainerCustomEditor.cs │ │ │ │ ├── ChildrenDependencyContainerCustomEditor.cs.meta │ │ │ │ ├── ContainerLifecycleCustomEditor.cs │ │ │ │ ├── ContainerLifecycleCustomEditor.cs.meta │ │ │ │ ├── DIFramework.Editor.asmdef │ │ │ │ ├── DIFramework.Editor.asmdef.meta │ │ │ │ ├── DependencyContainerBaseCustomEditor.cs │ │ │ │ ├── DependencyContainerBaseCustomEditor.cs.meta │ │ │ │ ├── DependencyGraph.meta │ │ │ │ ├── DependencyGraph │ │ │ │ │ ├── DependencyGraphView.cs │ │ │ │ │ ├── DependencyGraphView.cs.meta │ │ │ │ │ ├── DependencyGraphWindow.cs │ │ │ │ │ ├── DependencyGraphWindow.cs.meta │ │ │ │ │ ├── DependencyNode.cs │ │ │ │ │ └── DependencyNode.cs.meta │ │ │ │ ├── DiSettingsCustomEditor.cs │ │ │ │ ├── DiSettingsCustomEditor.cs.meta │ │ │ │ ├── FallbackDependencyContainerCustomEditor.cs │ │ │ │ ├── FallbackDependencyContainerCustomEditor.cs.meta │ │ │ │ ├── GlobalResolverReportGenerator.cs │ │ │ │ ├── GlobalResolverReportGenerator.cs.meta │ │ │ │ ├── Graphics.meta │ │ │ │ ├── Graphics │ │ │ │ │ ├── container.png │ │ │ │ │ ├── container.png.meta │ │ │ │ │ ├── di_settings.png │ │ │ │ │ ├── di_settings.png.meta │ │ │ │ │ ├── ignore_by_container.png │ │ │ │ │ ├── ignore_by_container.png.meta │ │ │ │ │ ├── resolver.png │ │ │ │ │ ├── resolver.png.meta │ │ │ │ │ ├── resolver_warning.png │ │ │ │ │ ├── resolver_warning.png.meta │ │ │ │ │ ├── root_container.png │ │ │ │ │ └── root_container.png.meta │ │ │ │ ├── HierarchyIcons.cs │ │ │ │ ├── HierarchyIcons.cs.meta │ │ │ │ ├── InvalidateCacheOnLoad.cs │ │ │ │ ├── InvalidateCacheOnLoad.cs.meta │ │ │ │ ├── ListDependencyContainerCustomEditor.cs │ │ │ │ ├── ListDependencyContainerCustomEditor.cs.meta │ │ │ │ ├── MenuHelper.cs │ │ │ │ ├── MenuHelper.cs.meta │ │ │ │ ├── MissingResolverWarningIcons.cs │ │ │ │ ├── MissingResolverWarningIcons.cs.meta │ │ │ │ ├── ResolverCustomEditor.cs │ │ │ │ ├── ResolverCustomEditor.cs.meta │ │ │ │ ├── RootContainerCreator.cs │ │ │ │ ├── RootContainerCreator.cs.meta │ │ │ │ ├── RootDependencyContainerCustomEditor.cs │ │ │ │ ├── RootDependencyContainerCustomEditor.cs.meta │ │ │ │ ├── TypeNameExtensions.cs │ │ │ │ └── TypeNameExtensions.cs.meta │ │ │ │ ├── Runtime.meta │ │ │ │ ├── Runtime │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ ├── AssemblyInfo.cs.meta │ │ │ │ ├── Baking.meta │ │ │ │ ├── Baking │ │ │ │ │ ├── BakedInjection.cs │ │ │ │ │ ├── BakedInjection.cs.meta │ │ │ │ │ ├── InjectionFunction.cs │ │ │ │ │ ├── InjectionFunction.cs.meta │ │ │ │ │ ├── PocoInstantiationFunction.cs │ │ │ │ │ ├── PocoInstantiationFunction.cs.meta │ │ │ │ │ ├── PocoResolutionFunction.cs │ │ │ │ │ ├── PocoResolutionFunction.cs.meta │ │ │ │ │ ├── ResolutionFunction.cs │ │ │ │ │ └── ResolutionFunction.cs.meta │ │ │ │ ├── ContainerBuilder.Registered.cs │ │ │ │ ├── ContainerBuilder.Registered.cs.meta │ │ │ │ ├── ContainerBuilder.cs │ │ │ │ ├── ContainerBuilder.cs.meta │ │ │ │ ├── ContainerBuilderExtensions.cs │ │ │ │ ├── ContainerBuilderExtensions.cs.meta │ │ │ │ ├── ContainerLifecycle.cs │ │ │ │ ├── ContainerLifecycle.cs.meta │ │ │ │ ├── Containers.meta │ │ │ │ ├── Containers │ │ │ │ │ ├── ChildrenDependencyContainer.cs │ │ │ │ │ ├── ChildrenDependencyContainer.cs.meta │ │ │ │ │ ├── ConfigurableDependencyContainer.cs │ │ │ │ │ ├── ConfigurableDependencyContainer.cs.meta │ │ │ │ │ ├── DependencyContainerBase.cs │ │ │ │ │ ├── DependencyContainerBase.cs.meta │ │ │ │ │ ├── FallbackDependencyContainer.cs │ │ │ │ │ ├── FallbackDependencyContainer.cs.meta │ │ │ │ │ ├── IIgnoreByContainer.cs │ │ │ │ │ ├── IIgnoreByContainer.cs.meta │ │ │ │ │ ├── IgnoreByContainer.cs │ │ │ │ │ ├── IgnoreByContainer.cs.meta │ │ │ │ │ ├── ListDependencyContainer.cs │ │ │ │ │ └── ListDependencyContainer.cs.meta │ │ │ │ ├── ContainersExtensions.cs │ │ │ │ ├── ContainersExtensions.cs.meta │ │ │ │ ├── DIFramework.asmdef │ │ │ │ ├── DIFramework.asmdef.meta │ │ │ │ ├── Dependencies.meta │ │ │ │ ├── Dependencies │ │ │ │ │ ├── CompositeDependency.cs │ │ │ │ │ ├── CompositeDependency.cs.meta │ │ │ │ │ ├── DependencyUtils.cs │ │ │ │ │ ├── DependencyUtils.cs.meta │ │ │ │ │ ├── DependencyWithMetadata.cs │ │ │ │ │ ├── DependencyWithMetadata.cs.meta │ │ │ │ │ ├── FactoryMethodDelegateDependency.cs │ │ │ │ │ ├── FactoryMethodDelegateDependency.cs.meta │ │ │ │ │ ├── GlobalDependency.cs │ │ │ │ │ ├── GlobalDependency.cs.meta │ │ │ │ │ ├── IDependency.cs │ │ │ │ │ ├── IDependency.cs.meta │ │ │ │ │ ├── ObjectDependency.cs │ │ │ │ │ ├── ObjectDependency.cs.meta │ │ │ │ │ ├── TypeDependency.cs │ │ │ │ │ └── TypeDependency.cs.meta │ │ │ │ ├── DependencySource.cs │ │ │ │ ├── DependencySource.cs.meta │ │ │ │ ├── DependencySources.cs │ │ │ │ ├── DependencySources.cs.meta │ │ │ │ ├── Di.cs │ │ │ │ ├── Di.cs.meta │ │ │ │ ├── DiSettings.cs │ │ │ │ ├── DiSettings.cs.meta │ │ │ │ ├── Editor.meta │ │ │ │ ├── Editor │ │ │ │ │ ├── IShowIconInHierarchy.cs │ │ │ │ │ └── IShowIconInHierarchy.cs.meta │ │ │ │ ├── Exceptions.meta │ │ │ │ ├── Exceptions │ │ │ │ │ ├── DependencyAlreadyRegistered.cs │ │ │ │ │ ├── DependencyAlreadyRegistered.cs.meta │ │ │ │ │ ├── DependencyLoopException.cs │ │ │ │ │ ├── DependencyLoopException.cs.meta │ │ │ │ │ ├── DependencyNotRegisteredException.cs │ │ │ │ │ ├── DependencyNotRegisteredException.cs.meta │ │ │ │ │ ├── DependencyNotResolvedException.cs │ │ │ │ │ ├── DependencyNotResolvedException.cs.meta │ │ │ │ │ ├── NotInjectableException.cs │ │ │ │ │ └── NotInjectableException.cs.meta │ │ │ │ ├── FactoryMethod.cs │ │ │ │ ├── FactoryMethod.cs.meta │ │ │ │ ├── FactoryMethodDelegate.cs │ │ │ │ ├── FactoryMethodDelegate.cs.meta │ │ │ │ ├── ICanRegisterContainerBuilder.cs │ │ │ │ ├── ICanRegisterContainerBuilder.cs.meta │ │ │ │ ├── IDependencyContainer.cs │ │ │ │ ├── IDependencyContainer.cs.meta │ │ │ │ ├── IInitializable.cs │ │ │ │ ├── IInitializable.cs.meta │ │ │ │ ├── IResolver.cs │ │ │ │ ├── IResolver.cs.meta │ │ │ │ ├── Lifecycle.meta │ │ │ │ ├── Lifecycle │ │ │ │ │ ├── DIFramework.Lifecycle.asmdef │ │ │ │ │ ├── DIFramework.Lifecycle.asmdef.meta │ │ │ │ │ ├── IDestroyable.cs │ │ │ │ │ ├── IDestroyable.cs.meta │ │ │ │ │ ├── IFixedUpdatable.cs │ │ │ │ │ ├── IFixedUpdatable.cs.meta │ │ │ │ │ ├── ILateUpdatable.cs │ │ │ │ │ ├── ILateUpdatable.cs.meta │ │ │ │ │ ├── IStartable.cs │ │ │ │ │ ├── IStartable.cs.meta │ │ │ │ │ ├── IUpdatable.cs │ │ │ │ │ └── IUpdatable.cs.meta │ │ │ │ ├── Pooling.meta │ │ │ │ ├── Pooling │ │ │ │ │ ├── ListPool.cs │ │ │ │ │ └── ListPool.cs.meta │ │ │ │ ├── Reporting.meta │ │ │ │ ├── Reporting │ │ │ │ │ ├── ComponentResolutionData.cs │ │ │ │ │ ├── ComponentResolutionData.cs.meta │ │ │ │ │ ├── ResolverReport.cs │ │ │ │ │ └── ResolverReport.cs.meta │ │ │ │ ├── Resolution.meta │ │ │ │ ├── Resolution │ │ │ │ │ ├── CachedComponentResolver.cs │ │ │ │ │ ├── CachedComponentResolver.cs.meta │ │ │ │ │ ├── Injection.cs │ │ │ │ │ ├── Injection.cs.meta │ │ │ │ │ ├── PocoInjection.cs │ │ │ │ │ ├── PocoInjection.cs.meta │ │ │ │ │ ├── ResolutionBySource.cs │ │ │ │ │ ├── ResolutionBySource.cs.meta │ │ │ │ │ ├── ResolutionContext.cs │ │ │ │ │ ├── ResolutionContext.cs.meta │ │ │ │ │ ├── ResolverPool.cs │ │ │ │ │ └── ResolverPool.cs.meta │ │ │ │ ├── Resolver.cs │ │ │ │ ├── Resolver.cs.meta │ │ │ │ ├── RootDependencyContainer.cs │ │ │ │ ├── RootDependencyContainer.cs.meta │ │ │ │ ├── Sorting.meta │ │ │ │ ├── Sorting │ │ │ │ │ ├── TopologicalSorting.cs │ │ │ │ │ └── TopologicalSorting.cs.meta │ │ │ │ ├── TypedCache.cs │ │ │ │ ├── TypedCache.cs.meta │ │ │ │ ├── UnityUtils.cs │ │ │ │ └── UnityUtils.cs.meta │ │ │ │ ├── Tests.meta │ │ │ │ └── Tests │ │ │ │ ├── Performance.meta │ │ │ │ ├── Performance │ │ │ │ ├── CustomContainerPerformanceTest.cs │ │ │ │ ├── CustomContainerPerformanceTest.cs.meta │ │ │ │ ├── DIFramework.PerformanceTests.asmdef │ │ │ │ ├── DIFramework.PerformanceTests.asmdef.meta │ │ │ │ ├── ResolverPerformanceTest.cs │ │ │ │ └── ResolverPerformanceTest.cs.meta │ │ │ │ ├── Runtime.meta │ │ │ │ └── Runtime │ │ │ │ ├── ChildrenDependencyContainerTests.cs │ │ │ │ ├── ChildrenDependencyContainerTests.cs.meta │ │ │ │ ├── Components.meta │ │ │ │ ├── Components │ │ │ │ ├── Benchmark.meta │ │ │ │ ├── Benchmark │ │ │ │ │ ├── Components.cs │ │ │ │ │ └── Components.cs.meta │ │ │ │ ├── Child.cs │ │ │ │ ├── Child.cs.meta │ │ │ │ ├── ComponentsWithSeveralConstructors.cs │ │ │ │ ├── ComponentsWithSeveralConstructors.cs.meta │ │ │ │ ├── ConstructChecker.cs │ │ │ │ ├── ConstructChecker.cs.meta │ │ │ │ ├── DefaultExecutionOrderScript.cs │ │ │ │ ├── DefaultExecutionOrderScript.cs.meta │ │ │ │ ├── Ignored.cs │ │ │ │ ├── Ignored.cs.meta │ │ │ │ ├── InterfaceDependencyComponent.cs │ │ │ │ ├── InterfaceDependencyComponent.cs.meta │ │ │ │ ├── LoopComponent1.cs │ │ │ │ ├── LoopComponent1.cs.meta │ │ │ │ ├── LoopComponent2.cs │ │ │ │ ├── LoopComponent2.cs.meta │ │ │ │ ├── Parent.cs │ │ │ │ ├── Parent.cs.meta │ │ │ │ ├── ParentDependencyComponent.cs │ │ │ │ ├── ParentDependencyComponent.cs.meta │ │ │ │ ├── ResolutionCounter.cs │ │ │ │ ├── ResolutionCounter.cs.meta │ │ │ │ ├── RigidbodyComponent.cs │ │ │ │ ├── RigidbodyComponent.cs.meta │ │ │ │ ├── StringDependencyComponent.cs │ │ │ │ └── StringDependencyComponent.cs.meta │ │ │ │ ├── ContainerBuilderExtensionsTests.cs │ │ │ │ ├── ContainerBuilderExtensionsTests.cs.meta │ │ │ │ ├── ContainerLifecycleTests.cs │ │ │ │ ├── ContainerLifecycleTests.cs.meta │ │ │ │ ├── Containers.meta │ │ │ │ ├── Containers │ │ │ │ ├── CtorInjectionContainer.cs │ │ │ │ ├── CtorInjectionContainer.cs.meta │ │ │ │ ├── CustomContainer.cs │ │ │ │ └── CustomContainer.cs.meta │ │ │ │ ├── CustomDependencyContainerTests.cs │ │ │ │ ├── CustomDependencyContainerTests.cs.meta │ │ │ │ ├── DIFramework.Tests.asmdef │ │ │ │ ├── DIFramework.Tests.asmdef.meta │ │ │ │ ├── DependencyResolutionTests.cs │ │ │ │ ├── DependencyResolutionTests.cs.meta │ │ │ │ ├── DependencyTests.cs │ │ │ │ ├── DependencyTests.cs.meta │ │ │ │ ├── DependencyUtilsTests.cs │ │ │ │ ├── DependencyUtilsTests.cs.meta │ │ │ │ ├── DiTests.cs │ │ │ │ ├── DiTests.cs.meta │ │ │ │ ├── FactoryMethodDelegateTests.cs │ │ │ │ ├── FactoryMethodDelegateTests.cs.meta │ │ │ │ ├── FallbackDependencyContainerTests.cs │ │ │ │ ├── FallbackDependencyContainerTests.cs.meta │ │ │ │ ├── InjectionTests.cs │ │ │ │ ├── InjectionTests.cs.meta │ │ │ │ ├── InternalDependencyTests.cs │ │ │ │ ├── InternalDependencyTests.cs.meta │ │ │ │ ├── ListDependencyContainerTests.cs │ │ │ │ ├── ListDependencyContainerTests.cs.meta │ │ │ │ ├── MultipleRootContainersTests.cs │ │ │ │ ├── MultipleRootContainersTests.cs.meta │ │ │ │ ├── PocoInjectionTests.cs │ │ │ │ ├── PocoInjectionTests.cs.meta │ │ │ │ ├── PocoResolutionTests.cs │ │ │ │ ├── PocoResolutionTests.cs.meta │ │ │ │ ├── Pocos.meta │ │ │ │ ├── Pocos │ │ │ │ ├── AbstractClass.cs │ │ │ │ ├── AbstractClass.cs.meta │ │ │ │ ├── Interfaces.cs │ │ │ │ ├── Interfaces.cs.meta │ │ │ │ ├── Poco.cs │ │ │ │ ├── Poco.cs.meta │ │ │ │ ├── SingleInstanceContainer.cs │ │ │ │ ├── SingleInstanceContainer.cs.meta │ │ │ │ ├── SingleInstanceContainer_PocoDep2.cs │ │ │ │ └── SingleInstanceContainer_PocoDep2.cs.meta │ │ │ │ ├── ResolverTests.cs │ │ │ │ ├── ResolverTests.cs.meta │ │ │ │ ├── TestFixtureBase.cs │ │ │ │ ├── TestFixtureBase.cs.meta │ │ │ │ ├── TopologicalSortTests.cs │ │ │ │ ├── TopologicalSortTests.cs.meta │ │ │ │ ├── link.xml │ │ │ │ └── link.xml.meta │ │ ├── link.xml │ │ └── link.xml.meta │ ├── LICENSE.md │ ├── LICENSE.md.meta │ ├── README.md │ ├── README.md.meta │ ├── package.json │ └── package.json.meta ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Packages │ └── com.unity.testtools.codecoverage │ │ └── Settings.json ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset ├── README.md ├── Screenshots ├── Benchmark │ ├── baked_di.png │ ├── bar-graph_gc.png │ ├── bar-graph_time.png │ ├── di.png │ └── no_di.png ├── resolver_example.jpg └── resolver_inspector.jpg ├── codecov.yml └── di-framework.sln.DotSettings /.gitattributes: -------------------------------------------------------------------------------- 1 | *.unity binary merge=unityyamlmerge 2 | *.prefab binary merge=unityyamlmerge 3 | *.asset binary merge=unityyamlmerge -------------------------------------------------------------------------------- /.github/workflows/doxygen.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Doxygen Documentation 4 | 5 | # Controls when the action will run. 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the master branch 8 | push: 9 | branches: [ master ] 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - uses: actions/checkout@v2 22 | 23 | - name: Generate documentation 24 | uses: mattnotmitt/doxygen-action@v1 25 | with: 26 | working-directory: './' 27 | doxyfile-path: 'Documentation/Doxyfile' 28 | 29 | - name: Deploy 30 | uses: peaceiris/actions-gh-pages@v3 31 | with: 32 | github_token: ${{ secrets.GITHUB_TOKEN }} 33 | publish_dir: './Documentation/html' -------------------------------------------------------------------------------- /.github/workflows/linter.yml: -------------------------------------------------------------------------------- 1 | name: Check code formatting 2 | on: 3 | push: 4 | branches: 5 | - dev 6 | pull_request: 7 | branches: 8 | - master 9 | - dev 10 | workflow_dispatch: 11 | 12 | jobs: 13 | dotnet-format: 14 | name: 'Run dotnet-format' 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v2 18 | - uses: actions/setup-dotnet@v1 19 | with: 20 | dotnet-version: 3.1.101 21 | - uses: xt0rted/dotnet-format-problem-matcher@v1 22 | - run: dotnet tool install -g dotnet-format --version 5.0.211103 23 | - run: dotnet tool restore 24 | - run: dotnet format 25 | --include './Packages/com.deltation.di-framework/Assets/**/*.cs' 26 | --include './Assets/Scripts/**/*.cs' 27 | --folder -v detailed 28 | - uses: EndBug/add-and-commit@v7.0.0 29 | with: 30 | author_name: 'Formatter Bot' 31 | message: 'Apply code formatting (${{ github.workflow }})' 32 | author_email: 41898282+formatter-bot[bot]@users.noreply.github.com 33 | -------------------------------------------------------------------------------- /Assets/Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72e8250241c2b34418c0203a17b725b4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Graphics.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c4096acc9a89f04ca7b5ae8bdca5fea 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Graphics/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a175f9f77d72ad4dbe2322b6d8eccd3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Graphics/Materials/Bullet.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab773fe67b257cd44981fdd0d6553949 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Graphics/Materials/Ground.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80cfc165b9521f14eac9369e6d2b4655 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Graphics/Materials/Player.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 604daa2a0af940a4da4a9a5425acc865 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Graphics/Materials/Skybox.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdedc88238ee65a4b91d000f83af2d7d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Graphics/Materials/Turret Gun.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed503611bd9ca5e4bbefdab08204a68b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Graphics/Materials/Turret.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60442991133fd0e47bbc9848f37dc740 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 061f6077d35adfc4c9701c36f0b088c0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Prefabs/Bullet.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0148400b548580447a7fc82ea593b51a 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Demo/Prefabs/Effects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d00bc476a5078a429bc9ec8d788a7ef 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Prefabs/Effects/Bullet Destruction Effect.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e45f938c1340164cb04e60cc791013a 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Demo/Prefabs/Effects/Player Destruction Effect.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83bdf0ad751e549439f5ad2ccf425b4f 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Demo/Prefabs/Player.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f7648e1492187c43849ee6449f7ef7b 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Demo/Prefabs/Turret.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40c7993c1eaf1aa429047dcc723da547 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Demo/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92d282426108a784ba98cccda43ca012 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Resources/Bullet Factory Config.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 84499d0561754f1a8278ede1ce80f129, type: 3} 13 | m_Name: Bullet Factory Config 14 | m_EditorClassIdentifier: 15 | _bulletPrefab: {fileID: 1125400310960031611, guid: 0148400b548580447a7fc82ea593b51a, 16 | type: 3} 17 | _powerfulBulletSpeedMultiplier: 2 18 | -------------------------------------------------------------------------------- /Assets/Demo/Resources/Bullet Factory Config.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 804a059bd02b20a49b9f3612f1202db9 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b21d63c354d4a3f4caddce443762aefb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scenes/SampleScene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 776cfa364d341434fa8b6bfb6ee85ffc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Demo/Scenes/SampleSceneSettings.lighting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ee13d95c49a97a4e85e19ae6775f72d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4890085278179872738 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2612e5ab835f62e41be2b31af801a056 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b1da77b296040879e0dfaf83c04fb79 3 | timeCreated: 1605464492 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/Bullet.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using Demo.Scripts.Damage; 4 | using UnityEngine; 5 | 6 | namespace Demo.Scripts.Bullets 7 | { 8 | public sealed class Bullet : MonoBehaviour, IDestroyable 9 | { 10 | [SerializeField, Min(0f)] private float _lifetime = 1f; 11 | 12 | [Min(0f)] public float Speed = 10f; 13 | 14 | public void Destroy() 15 | { 16 | OnPreDestroyed?.Invoke(this, EventArgs.Empty); 17 | Destroy(gameObject); 18 | } 19 | 20 | public event EventHandler OnPreDestroyed; 21 | 22 | private void Update() 23 | { 24 | var direction = _transform.rotation * Vector3.forward; 25 | var translation = Speed * Time.deltaTime * direction; 26 | transform.Translate(translation, Space.World); 27 | } 28 | 29 | private IEnumerator Start() 30 | { 31 | yield return new WaitForSeconds(_lifetime); 32 | Destroy(); 33 | } 34 | 35 | private void Awake() 36 | { 37 | _transform = transform; 38 | } 39 | 40 | private Transform _transform; 41 | } 42 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/Bullet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 275d0abcb02d45969847fb1a71fe9ec9 3 | timeCreated: 1605394612 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/BulletFactory.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Demo.Scripts.Bullets 4 | { 5 | public sealed class BulletFactory : IProjectileFactory 6 | { 7 | private readonly ILogger _logger; 8 | private readonly float _powerfulSpeedMultiplier; 9 | private readonly Bullet _prefab; 10 | private readonly Transform _transform; 11 | 12 | public BulletFactory(Transform transform, Bullet prefab, float powerfulSpeedMultiplier, ILogger logger) 13 | { 14 | _transform = transform; 15 | _prefab = prefab; 16 | _powerfulSpeedMultiplier = powerfulSpeedMultiplier; 17 | _logger = logger; 18 | } 19 | 20 | public Bullet Create(Vector3 position, Quaternion rotation) 21 | { 22 | _logger.Log($"Creating a bullet at {position}."); 23 | return Object.Instantiate(_prefab, position, rotation, _transform); 24 | } 25 | 26 | public Bullet CreatePowerful(Vector3 position, Quaternion rotation) 27 | { 28 | var bullet = Create(position, rotation); 29 | bullet.Speed *= _powerfulSpeedMultiplier; 30 | return bullet; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/BulletFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48867dc3b1c6452f84283bab65ad9af5 3 | timeCreated: 1605394778 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/BulletHitTrigger.cs: -------------------------------------------------------------------------------- 1 | using Demo.Scripts.Damage; 2 | using UnityEngine; 3 | 4 | namespace Demo.Scripts.Bullets 5 | { 6 | public class BulletHitTrigger : MonoBehaviour 7 | { 8 | public void Construct(Bullet bullet) 9 | { 10 | _bullet = bullet; 11 | } 12 | 13 | private void OnTriggerEnter(Collider other) 14 | { 15 | if (!other.TryGetComponent(out IHittable hittable)) return; 16 | hittable.Hit(); 17 | _bullet.Destroy(); 18 | } 19 | 20 | private Bullet _bullet; 21 | } 22 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/BulletHitTrigger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 296a69d8343e4c0fbde4f0c6c97f2eee 3 | timeCreated: 1605463349 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/ILogger.cs: -------------------------------------------------------------------------------- 1 | namespace Demo.Scripts.Bullets 2 | { 3 | public interface ILogger 4 | { 5 | void Log(string message); 6 | } 7 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/ILogger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f51de851f4d44caeac03072cc71f4baf 3 | timeCreated: 1644522199 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/IProjectileFactory.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Demo.Scripts.Bullets 4 | { 5 | public interface IProjectileFactory 6 | { 7 | TProjectile Create(Vector3 position, Quaternion rotation); 8 | TProjectile CreatePowerful(Vector3 position, Quaternion rotation); 9 | } 10 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/IProjectileFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa1e1dcb51cb4482b81dee9320bff607 3 | timeCreated: 1605394559 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/UnityLogger.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Demo.Scripts.Bullets 4 | { 5 | public class UnityLogger : ILogger 6 | { 7 | public void Log(string message) => Debug.Log(message); 8 | } 9 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Bullets/UnityLogger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75ba0d9db526419f9d67ac0e613531ac 3 | timeCreated: 1644522199 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Damage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a593a7399f5d445caa573ef3ec6fdb4d 3 | timeCreated: 1605464587 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Damage/IDestroyable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Demo.Scripts.Damage 4 | { 5 | public interface IDestroyable 6 | { 7 | event EventHandler OnPreDestroyed; 8 | } 9 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Damage/IDestroyable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad5b90da3f7f4b5990322f989f90466e 3 | timeCreated: 1605463552 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Damage/IHittable.cs: -------------------------------------------------------------------------------- 1 | namespace Demo.Scripts.Damage 2 | { 3 | public interface IHittable 4 | { 5 | void Hit(); 6 | } 7 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Damage/IHittable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35cc75ed8b2142e8bf4fb9ad8ae3de20 3 | timeCreated: 1605462980 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Dependencies.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb623f15531b445c84d0a703eb44e3f2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Dependencies/BulletFactoryConfig.cs: -------------------------------------------------------------------------------- 1 | using Demo.Scripts.Bullets; 2 | using UnityEngine; 3 | 4 | namespace Demo.Scripts.Dependencies 5 | { 6 | [CreateAssetMenu] 7 | public class BulletFactoryConfig : ScriptableObject 8 | { 9 | [SerializeField] private Bullet _bulletPrefab; 10 | [SerializeField] private float _powerfulBulletSpeedMultiplier; 11 | 12 | public Bullet BulletPrefab => _bulletPrefab; 13 | 14 | public float PowerfulBulletSpeedMultiplier => _powerfulBulletSpeedMultiplier; 15 | } 16 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Dependencies/BulletFactoryConfig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84499d0561754f1a8278ede1ce80f129 3 | timeCreated: 1644520455 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Dependencies/CompositionRoot.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework; 2 | using DELTation.DIFramework.Containers; 3 | using Demo.Scripts.Bullets; 4 | using UnityEngine; 5 | using ILogger = Demo.Scripts.Bullets.ILogger; 6 | 7 | namespace Demo.Scripts.Dependencies 8 | { 9 | public sealed class CompositionRoot : DependencyContainerBase 10 | { 11 | [SerializeField] private Transform _bulletsRoot; 12 | 13 | protected override void ComposeDependencies(ICanRegisterContainerBuilder builder) 14 | { 15 | builder 16 | .RegisterFromResources("Bullet Factory Config").AsInternal() 17 | .Register().AsInternal() 18 | .RegisterFromMethod((BulletFactoryConfig config, ILogger logger) => 19 | CreateBulletFactory(config, logger) 20 | ) 21 | ; 22 | } 23 | 24 | private BulletFactory CreateBulletFactory(BulletFactoryConfig bulletFactoryConfig, ILogger logger) => 25 | new BulletFactory(_bulletsRoot, bulletFactoryConfig.BulletPrefab, 26 | bulletFactoryConfig.PowerfulBulletSpeedMultiplier, logger 27 | ); 28 | } 29 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Dependencies/CompositionRoot.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5d2d33df2ca4017af6657c68834dc42 3 | timeCreated: 1605124348 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Effects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf35bb5a949f4a81b3c8f1780839b49d 3 | timeCreated: 1605464516 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Effects/DestructionEffect.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Demo.Scripts.Damage; 3 | using UnityEngine; 4 | 5 | namespace Demo.Scripts.Effects 6 | { 7 | public sealed class DestructionEffect : MonoBehaviour 8 | { 9 | [SerializeField] private GameObject _effect = default; 10 | 11 | public void Construct(IDestroyable destroyable) 12 | { 13 | _destroyable = destroyable; 14 | } 15 | 16 | private void OnEnable() 17 | { 18 | _destroyable.OnPreDestroyed += _onDestroyed; 19 | } 20 | 21 | private void OnDisable() 22 | { 23 | _destroyable.OnPreDestroyed -= _onDestroyed; 24 | } 25 | 26 | private void Awake() 27 | { 28 | _onDestroyed = (sender, args) => { Instantiate(_effect, transform.position, transform.rotation); }; 29 | } 30 | 31 | private EventHandler _onDestroyed; 32 | private IDestroyable _destroyable; 33 | } 34 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Effects/DestructionEffect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29c53f4fa3d5407b996263003dd62e8b 3 | timeCreated: 1605463622 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/InjectablePoco.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | 3 | namespace Demo.Scripts 4 | { 5 | public class InjectablePoco 6 | { 7 | private StringBuilder _stringBuilder; 8 | 9 | public InjectablePoco(StringBuilder stringBuilder) => _stringBuilder = stringBuilder; 10 | } 11 | 12 | public class InjectablePoco2 13 | { 14 | private StringBuilder _stringBuilder; 15 | private SimpleInjectablePoco _poco; 16 | 17 | public InjectablePoco2(StringBuilder stringBuilder, SimpleInjectablePoco poco) 18 | { 19 | _poco = poco; 20 | _stringBuilder = stringBuilder; 21 | } 22 | } 23 | 24 | public class PrivateInjectablePoco 25 | { 26 | private PrivateInjectablePoco() { } 27 | } 28 | 29 | public class SimpleInjectablePoco { } 30 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/InjectablePoco.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c35fa02f7d24764922ad7ebc03de856 3 | timeCreated: 1619297133 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Movement.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a83673bc768041738c81820bbc22ed1a 3 | timeCreated: 1605464545 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Movement/IMovement.cs: -------------------------------------------------------------------------------- 1 | namespace Demo.Scripts.Movement 2 | { 3 | public interface IMovement 4 | { 5 | float Vertical { get; set; } 6 | float Horizontal { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Movement/IMovement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0893af5082674694870392ced58bfe1a 3 | timeCreated: 1605434720 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Movement/Movement.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Demo.Scripts.Movement 4 | { 5 | public sealed class Movement : MonoBehaviour, IMovement 6 | { 7 | [SerializeField, Min(0f)] private float _speed = 1f; 8 | 9 | public float Vertical { get; set; } 10 | public float Horizontal { get; set; } 11 | 12 | private void FixedUpdate() 13 | { 14 | var direction = new Vector3(Horizontal, 0f, Vertical); 15 | direction.Normalize(); 16 | var velocity = direction * _speed; 17 | velocity.y = _rigidbody.velocity.y; 18 | _rigidbody.velocity = velocity; 19 | } 20 | 21 | public void Construct(Rigidbody rigidbody) 22 | { 23 | _rigidbody = rigidbody; 24 | } 25 | 26 | private Rigidbody _rigidbody; 27 | } 28 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Movement/Movement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 982cf12903764eb296a563dcd3d1b015 3 | timeCreated: 1605434414 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Player.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Demo.Scripts.Damage; 3 | using Demo.Scripts.Shooting; 4 | using UnityEngine; 5 | 6 | namespace Demo.Scripts 7 | { 8 | public class Player : MonoBehaviour, IShootingTarget, IHittable, IDestroyable 9 | { 10 | [SerializeField, Min(1)] private int _maxHealth = 5; 11 | 12 | bool IShootingTarget.IsActive => _isAlive; 13 | 14 | public Vector3 Position => transform.position; 15 | 16 | public void Hit() 17 | { 18 | if (!_isAlive) return; 19 | 20 | _health--; 21 | if (_health < 0) 22 | _health = 0; 23 | 24 | if (_health > 0) 25 | return; 26 | 27 | _isAlive = false; 28 | OnPreDestroyed?.Invoke(this, EventArgs.Empty); 29 | Destroy(gameObject); 30 | } 31 | 32 | public event EventHandler OnPreDestroyed; 33 | 34 | private void Awake() 35 | { 36 | _health = _maxHealth; 37 | } 38 | 39 | private bool _isAlive = true; 40 | private int _health; 41 | } 42 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Player.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c51209aaea142f59972a119307abc25 3 | timeCreated: 1605435261 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Shooting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fb40608fd204da492e35ce6410c6286 3 | timeCreated: 1605464478 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Shooting/IShootFrom.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Demo.Scripts.Shooting 4 | { 5 | public interface IShootFrom 6 | { 7 | Vector3 Position { get; } 8 | Quaternion Rotation { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Shooting/IShootFrom.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 155668bd2eea488baf0cd5bc3cbe8f05 3 | timeCreated: 1605395495 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Shooting/IShootingTarget.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Demo.Scripts.Shooting 4 | { 5 | public interface IShootingTarget 6 | { 7 | bool IsActive { get; } 8 | Vector3 Position { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Shooting/IShootingTarget.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e62bbc4a64d4f369c077bcc38b29630 3 | timeCreated: 1605435238 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/TestPocoBaking.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56c924e63a6e45aaa405cd6cb772dbf9 3 | timeCreated: 1619300791 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/TestPocoBaking/TestPoco.cs: -------------------------------------------------------------------------------- 1 | namespace Demo.Scripts.TestPocoBaking 2 | { 3 | public class TestPoco 4 | { 5 | public TestPocoDependency Dependency; 6 | 7 | public TestPoco(TestPocoDependency dependency) => Dependency = dependency; 8 | } 9 | 10 | public class TestPocoDependency { } 11 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/TestPocoBaking/TestPoco.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c26f468ee9fb442b9d7f5506e3e33082 3 | timeCreated: 1619300797 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/TestPocoBaking/TestPocoContainer.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework; 2 | using DELTation.DIFramework.Containers; 3 | 4 | namespace Demo.Scripts.TestPocoBaking 5 | { 6 | public class TestPocoContainer : DependencyContainerBase 7 | { 8 | protected override void ComposeDependencies(ICanRegisterContainerBuilder builder) 9 | { 10 | builder.Register() 11 | .Register(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/TestPocoBaking/TestPocoContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8f4da963fd543b9bba8de32994dda97 3 | timeCreated: 1619300819 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/TestPocoBaking/TestPocoDependant.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Demo.Scripts.TestPocoBaking 4 | { 5 | public class TestPocoDependant : MonoBehaviour 6 | { 7 | public void Construct(TestPoco testPoco) 8 | { 9 | _testPoco = testPoco; 10 | } 11 | 12 | private TestPoco _testPoco; 13 | } 14 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/TestPocoBaking/TestPocoDependant.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4905563284474353b9aa91f5a1323785 3 | timeCreated: 1619300862 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Turrets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c3e5782d48945d08f0523a8b4a66b37 3 | timeCreated: 1605464452 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Turrets/Turret.cs: -------------------------------------------------------------------------------- 1 | using Demo.Scripts.Bullets; 2 | using Demo.Scripts.Shooting; 3 | using UnityEngine; 4 | 5 | namespace Demo.Scripts.Turrets 6 | { 7 | public sealed class Turret : MonoBehaviour 8 | { 9 | [SerializeField, Min(0f)] private float _shootingPeriod = 1f; 10 | [SerializeField, Range(0f, 1f)] private float _powerfulShotProbability = 0.1f; 11 | 12 | public void Construct(IProjectileFactory bulletFactory, IShootFrom shootFrom, IShootingTarget target) 13 | { 14 | _bulletFactory = bulletFactory; 15 | _shootFrom = shootFrom; 16 | _target = target; 17 | } 18 | 19 | private void Start() 20 | { 21 | var time = Random.Range(_shootingPeriod, _shootingPeriod * 2f); 22 | InvokeRepeating(nameof(Shoot), time, _shootingPeriod); 23 | } 24 | 25 | private void Shoot() 26 | { 27 | if (!_target.IsActive) return; 28 | 29 | if (Random.value <= _powerfulShotProbability) 30 | _bulletFactory.CreatePowerful(_shootFrom.Position, _shootFrom.Rotation); 31 | else 32 | _bulletFactory.Create(_shootFrom.Position, _shootFrom.Rotation); 33 | } 34 | 35 | private IProjectileFactory _bulletFactory; 36 | private IShootingTarget _target; 37 | private IShootFrom _shootFrom; 38 | } 39 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Turrets/Turret.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 788aa91e15244ff49aa5ba31a21ade0a 3 | timeCreated: 1605394534 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Turrets/TurretAim.cs: -------------------------------------------------------------------------------- 1 | using Demo.Scripts.Shooting; 2 | using UnityEngine; 3 | 4 | namespace Demo.Scripts.Turrets 5 | { 6 | public sealed class TurretAim : MonoBehaviour 7 | { 8 | [SerializeField] private float _angularSpeed = 90f; 9 | 10 | private void Update() 11 | { 12 | if (!_target.IsActive) return; 13 | var deltaRotation = _angularSpeed * Time.deltaTime; 14 | _transform.rotation = RotateTowards(TargetRotation, deltaRotation); 15 | } 16 | 17 | private Quaternion TargetRotation 18 | { 19 | get 20 | { 21 | var offset = _target.Position - _transform.position; 22 | return Quaternion.LookRotation(offset, Vector3.up); 23 | } 24 | } 25 | 26 | private Quaternion RotateTowards(Quaternion targetRotation, float deltaRotation) => 27 | Quaternion.RotateTowards(_transform.rotation, targetRotation, deltaRotation); 28 | 29 | private void Awake() 30 | { 31 | _transform = transform; 32 | } 33 | 34 | public void Construct(IShootingTarget target) 35 | { 36 | _target = target; 37 | } 38 | 39 | private Transform _transform; 40 | private IShootingTarget _target; 41 | } 42 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Turrets/TurretAim.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 818749ac297047d3b0cefe0128b3c8ca 3 | timeCreated: 1605435281 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Turrets/TurretHead.cs: -------------------------------------------------------------------------------- 1 | using Demo.Scripts.Shooting; 2 | using UnityEngine; 3 | 4 | namespace Demo.Scripts.Turrets 5 | { 6 | public class TurretHead : MonoBehaviour, IShootFrom 7 | { 8 | [SerializeField] private Vector3 _offset = Vector3.zero; 9 | 10 | public Vector3 Position => transform.position + Rotation * _offset; 11 | public Quaternion Rotation => transform.rotation; 12 | 13 | private void OnDrawGizmos() 14 | { 15 | Gizmos.color = Color.red; 16 | Gizmos.DrawRay(Position, Rotation * Vector3.forward); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/Turrets/TurretHead.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a24b1f0a033542fabd99107429396625 3 | timeCreated: 1605395528 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/TwoConstructorsClass.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Demo.Scripts 4 | { 5 | public class TwoConstructorsClass : MonoBehaviour 6 | { 7 | public void Construct(Rigidbody rigidbody) 8 | { 9 | _rigidbody = rigidbody; 10 | } 11 | 12 | public void Construct(Rigidbody2D rigidbody2D) 13 | { 14 | _rigidbody2D = rigidbody2D; 15 | } 16 | 17 | private Rigidbody _rigidbody; 18 | private Rigidbody2D _rigidbody2D; 19 | } 20 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/TwoConstructorsClass.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bef5f69bedd4f2d90a469e67c737802 3 | timeCreated: 1615911667 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80a20f2c283c48b5b9e8fbb69e9ad340 3 | timeCreated: 1605464612 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/UI/PointerControls.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3dd7b5808ba4f50bc8e213f4ed94aca 3 | timeCreated: 1605464726 -------------------------------------------------------------------------------- /Assets/Demo/Scripts/UI/RestartSceneButton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.EventSystems; 3 | using UnityEngine.SceneManagement; 4 | 5 | namespace Demo.Scripts.UI 6 | { 7 | public sealed class RestartSceneButton : MonoBehaviour, IPointerClickHandler 8 | { 9 | public void OnPointerClick(PointerEventData eventData) 10 | { 11 | var activeSceneBuildIndex = SceneManager.GetActiveScene().buildIndex; 12 | SceneManager.LoadScene(activeSceneBuildIndex); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Assets/Demo/Scripts/UI/RestartSceneButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b3178c90d3d463f8571ab040040f70d 3 | timeCreated: 1605464617 -------------------------------------------------------------------------------- /Assets/PerformanceTest.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fde8f1e1339d4240a511c746aba9c82 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PerformanceTest/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51adad993949df64a887d0408b3920ef 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PerformanceTest/Prefabs/With DI.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01135bce6b37e5b43aba9e76dcd07c29 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/PerformanceTest/Prefabs/Without DI.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f56f29526f7c6b4d812884a25d82fb0 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad0d219a53694fd4387c78611585581a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scenes/PerformanceTestScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a14cdde6f6d062548a4f763e5c90ff25 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9404a1d2c0669a64aa3aba39e70f4818 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45f4c884ddef4ca981f3434975e1ca55 3 | timeCreated: 1610360651 -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependency1.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PerformanceTest.Scripts.DI 4 | { 5 | public class Dependency1 : MonoBehaviour { } 6 | } -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependency1.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14d2e26478384eabb53eecddc8bf3967 3 | timeCreated: 1610360614 -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependency2.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PerformanceTest.Scripts.DI 4 | { 5 | public class Dependency2 : MonoBehaviour { } 6 | } -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependency2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28102707293649d5a062d7cb031f1924 3 | timeCreated: 1610360622 -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependency3.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PerformanceTest.Scripts.DI 4 | { 5 | public class Dependency3 : MonoBehaviour { } 6 | } -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependency3.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b7166998fae48d8b9d12a35506b9b48 3 | timeCreated: 1610360628 -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent1.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PerformanceTest.Scripts.DI 4 | { 5 | public class Dependent1 : MonoBehaviour 6 | { 7 | [SerializeField] private bool _resolveManually = false; 8 | 9 | private void Awake() 10 | { 11 | if (_resolveManually) 12 | Construct(GetComponentInChildren()); 13 | } 14 | 15 | public void Construct(Dependency1 dependency1) 16 | { 17 | _dependency1 = dependency1; 18 | } 19 | 20 | private Dependency1 _dependency1; 21 | } 22 | } -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent1.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ecfdc9a0f83476fbed9c881c2fb4564 3 | timeCreated: 1610360638 -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent12.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PerformanceTest.Scripts.DI 4 | { 5 | public class Dependent12 : MonoBehaviour 6 | { 7 | [SerializeField] private bool _resolveManually = false; 8 | 9 | private void Awake() 10 | { 11 | if (_resolveManually) 12 | Construct(GetComponentInChildren(), GetComponentInChildren()); 13 | } 14 | 15 | public void Construct(Dependency1 dependency1, Dependency2 dependency2) 16 | { 17 | _dependency1 = dependency1; 18 | _dependency2 = dependency2; 19 | } 20 | 21 | private Dependency1 _dependency1; 22 | private Dependency2 _dependency2; 23 | } 24 | } -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent12.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36f6cb7569654bd882c896c55f3d0f3b 3 | timeCreated: 1610361212 -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent123.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PerformanceTest.Scripts.DI 4 | { 5 | public class Dependent123 : MonoBehaviour 6 | { 7 | [SerializeField] private bool _resolveManually = false; 8 | 9 | private void Awake() 10 | { 11 | if (_resolveManually) 12 | Construct(GetComponentInChildren(), GetComponentInChildren(), 13 | GetComponentInChildren() 14 | ); 15 | } 16 | 17 | public void Construct(Dependency1 dependency1, Dependency2 dependency2, Dependency3 dependency3) 18 | { 19 | _dependency1 = dependency1; 20 | _dependency2 = dependency2; 21 | _dependency3 = dependency3; 22 | } 23 | 24 | private Dependency1 _dependency1; 25 | private Dependency2 _dependency2; 26 | private Dependency3 _dependency3; 27 | } 28 | } -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent123.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 666230d6065d4a0e9b1a2b985e490524 3 | timeCreated: 1610361288 -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent13.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PerformanceTest.Scripts.DI 4 | { 5 | public class Dependent13 : MonoBehaviour 6 | { 7 | [SerializeField] private bool _resolveManually = false; 8 | 9 | private void Awake() 10 | { 11 | if (_resolveManually) 12 | Construct(GetComponentInChildren(), GetComponentInChildren()); 13 | } 14 | 15 | public void Construct(Dependency1 dependency1, Dependency3 dependency3) 16 | { 17 | _dependency1 = dependency1; 18 | _dependency3 = dependency3; 19 | } 20 | 21 | private Dependency1 _dependency1; 22 | private Dependency3 _dependency3; 23 | } 24 | } -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent13.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26d4abb4f5ac47b793b9424e06d8629c 3 | timeCreated: 1610361262 -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent2.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PerformanceTest.Scripts.DI 4 | { 5 | public class Dependent2 : MonoBehaviour 6 | { 7 | [SerializeField] private bool _resolveManually = false; 8 | 9 | private void Awake() 10 | { 11 | if (_resolveManually) 12 | Construct(GetComponentInChildren()); 13 | } 14 | 15 | public void Construct(Dependency2 dependency) 16 | { 17 | _dependency = dependency; 18 | } 19 | 20 | private Dependency2 _dependency; 21 | } 22 | } -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ad840b1b946491bbbc68a72d4e690b3 3 | timeCreated: 1610361166 -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent3.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace PerformanceTest.Scripts.DI 4 | { 5 | public class Dependent3 : MonoBehaviour 6 | { 7 | [SerializeField] private bool _resolveManually = false; 8 | 9 | private void Awake() 10 | { 11 | if (_resolveManually) 12 | Construct(GetComponentInChildren()); 13 | } 14 | 15 | public void Construct(Dependency3 dependency) 16 | { 17 | _dependency = dependency; 18 | } 19 | 20 | private Dependency3 _dependency; 21 | } 22 | } -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/DI/Dependent3.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2286dc224a74a98871f2289d7fec8b1 3 | timeCreated: 1610361194 -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/PeriodicSpawner.cs: -------------------------------------------------------------------------------- 1 | using Unity.Profiling; 2 | using UnityEngine; 3 | 4 | namespace PerformanceTest.Scripts 5 | { 6 | public class PeriodicSpawner : MonoBehaviour 7 | { 8 | public GameObject Prefab = default; 9 | public float Period = 1f; 10 | public int Count = 50; 11 | 12 | private void Update() 13 | { 14 | _timeTillNextSpawn -= Time.deltaTime; 15 | if (_timeTillNextSpawn > 0f) return; 16 | 17 | for (var i = 0; i < Count; i++) 18 | { 19 | _preparePerfMarker.Begin(); 20 | Instantiate(Prefab); 21 | _preparePerfMarker.End(); 22 | } 23 | 24 | _timeTillNextSpawn = Period; 25 | } 26 | 27 | private float _timeTillNextSpawn; 28 | 29 | private static ProfilerMarker _preparePerfMarker = new ProfilerMarker("Instantiate And Inject"); 30 | } 31 | } -------------------------------------------------------------------------------- /Assets/PerformanceTest/Scripts/PeriodicSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2967127cf4f24477be2bbce4e227f497 3 | timeCreated: 1610360562 -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3629332c448827249a1a4ba5813cd73e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/DI Settings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c0a8b0f001d046b3aad3b36023e6de94, type: 3} 13 | m_Name: DI Settings 14 | m_EditorClassIdentifier: 15 | _defaultDependencySource: 30 16 | _showIconsInHierarchy: 1 17 | _showMissingResolverWarnings: 1 18 | _useBakedData: 1 19 | _bakeOnBuild: 0 20 | _bakedAssembliesRegex: ^Assembly-CSharp$ 21 | -------------------------------------------------------------------------------- /Assets/Resources/DI Settings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb5bd70a0d6cf824f98392d8ae1aa01b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4dd934b2c8158a8428d4a11362e64f66 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/DI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34058d27445d5b4408bcbbb34d0bbbaa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/DI/Baked.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0c38c3297d59e9409d02a89d027ea2f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/DI/Baked/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Assets/Scripts/DI/Baked/.gitkeep -------------------------------------------------------------------------------- /Assets/TextMesh Pro.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f54d1bd14bd3ca042bd867b519fee8cc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Documentation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e7e8f5a82a3a134e91c54efd2274ea9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b8d251f9af63b746bf2f7ffe00ebb9b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Fonts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ab70aee4d56447429c680537fbf93ed 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e59c59b81ab47f9b6ec5781fa725d2c 3 | timeCreated: 1484171296 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Fonts/LiberationSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Assets/TextMesh Pro/Fonts/LiberationSans.ttf -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Fonts/LiberationSans.ttf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3265ab4bf004d28a9537516768c1c75 3 | timeCreated: 1484171297 4 | licenseType: Pro 5 | TrueTypeFontImporter: 6 | serializedVersion: 2 7 | fontSize: 16 8 | forceTextureCase: -2 9 | characterSpacing: 1 10 | characterPadding: 0 11 | includeFontData: 1 12 | use2xBehaviour: 0 13 | fontNames: [] 14 | fallbackFontReferences: [] 15 | customCharacters: 16 | fontRenderingMode: 0 17 | userData: 18 | assetBundleName: 19 | assetBundleVariant: 20 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 243e06394e614e5d99fab26083b707fa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Fonts & Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 731f1baa9d144a9897cb1d341c2092b8 3 | folderAsset: yes 4 | timeCreated: 1442040525 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e73a58f6e2794ae7b1b7e50b7fb811b0 3 | timeCreated: 1484172806 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e498d1c8094910479dc3e1b768306a4 3 | timeCreated: 1484171803 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79459efec17a4d00a321bdcc27bbc385 3 | timeCreated: 1484172856 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f586378b4e144a9851e7b34d9b748ee 3 | timeCreated: 1484171803 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt: -------------------------------------------------------------------------------- 1 | )]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,. -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fade42e8bc714b018fac513c043d323b 3 | timeCreated: 1425440388 4 | licenseType: Store 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt: -------------------------------------------------------------------------------- 1 | ([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇〉》」$⦆¥₩ # -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d82c1b31c7e74239bff1220585707d2b 3 | timeCreated: 1425440388 4 | licenseType: Store 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99f836c9cb9345dba2e72c4a1f2d0695 3 | folderAsset: yes 4 | timeCreated: 1436068007 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48bb5f55d8670e349b6e614913f9d910 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_Bitmap-Mobile.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e3b057af24249748ff873be7fafee47 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_Bitmap.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 128e987d567d4e2c824d754223b3f3b0 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_SDF Overlay.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd89cf5b9246416f84610a006f916af7 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_SDF-Mobile Masking.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc1ede39bf3643ee8e493720e4259791 3 | timeCreated: 1463704911 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_SDF-Mobile Overlay.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a02a7d8c237544f1962732b55a9aebf1 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_SDF-Mobile.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe393ace9b354375a9cb14cdbbc28be4 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_SDF-Surface-Mobile.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85187c2149c549c5b33f0cdb02836b17 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_SDF-Surface.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7ada0af4f174f0694ca6a487b8f543d 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_SDF.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68e6db2ebdc24f95958faec2be5558d6 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMP_Sprite.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf81c85f95fe47e1a27f6ae460cf182c 3 | timeCreated: 1450517184 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 407bc68d299748449bbf7f48ee690f8d 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3997e2241185407d80309a82f9148466 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Shaders/TMPro_Surface.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d930090c0cd643c7b55f19a38538c162 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Sprite Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 512a49d95c0c4332bdd98131869c23c9 3 | folderAsset: yes 4 | timeCreated: 1441876896 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c41005c129ba4d66911b75229fd70b45 3 | timeCreated: 1480316912 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Style Sheets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4aecb92fff08436c8303b10eab8da368 3 | folderAsset: yes 4 | timeCreated: 1441876950 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f952c082cb03451daed3ee968ac6c63e 3 | timeCreated: 1432805430 4 | licenseType: Store 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/TMP Settings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f5b5dff67a942289a9defa416b206f3 3 | timeCreated: 1436653997 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0603b6d5186471b96c778c3949c7ce2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt: -------------------------------------------------------------------------------- 1 | This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/ 2 | 3 | Please visit their website to view the complete set of their emojis and review their licensing terms. -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 381dcb09d5029d14897e55f98031fca5 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Sprites/EmojiOne.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f05276190cf498a8153f6cbe761d4e6 3 | timeCreated: 1480316860 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Sprites/EmojiOne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Assets/TextMesh Pro/Sprites/EmojiOne.png -------------------------------------------------------------------------------- /DIFramework.Editor.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True 5 | True 6 | True 7 | True -------------------------------------------------------------------------------- /DIFramework.Lifecycle.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True -------------------------------------------------------------------------------- /DIFramework.PerformanceTests.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /DIFramework.PlayTests.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True 5 | True 6 | True 7 | True -------------------------------------------------------------------------------- /DIFramework.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True 5 | True 6 | True 7 | True 8 | True -------------------------------------------------------------------------------- /Documentation/static/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 jothepro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Documentation/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Documentation/static/favicon.ico -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Vladislav Kantaev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Macros/ctordi.txt: -------------------------------------------------------------------------------- 1 | public void Construct($IService$ $service$) 2 | { 3 | _$service$ = $service$; 4 | } 5 | 6 | private $IService$ _$service$; -------------------------------------------------------------------------------- /Macros/ctordip.txt: -------------------------------------------------------------------------------- 1 | [UnityEngine.Scripting.Preserve] 2 | public void Construct($IService$ $service$) 3 | { 4 | _$service$ = $service$; 5 | } 6 | 7 | private $IService$ _$service$; 8 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7585199405524c699b50a33fb0c05707 3 | timeCreated: 1612607823 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2582eb3bb235b354eb314bf2e55df3a6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f289b534d8509894c8b4291827d6e1db 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd8d64f8961038848abe6ff9118a17f3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1f91e91bc9579141923226d7abcb343 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/BakeOnBuildPreprocessor.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Editor.Baking; 2 | using UnityEditor.Build; 3 | using UnityEditor.Build.Reporting; 4 | using UnityEngine; 5 | 6 | namespace DELTation.DIFramework.Editor 7 | { 8 | public class BakeOnBuildPreprocessor : IPreprocessBuildWithReport 9 | { 10 | public int callbackOrder => 0; 11 | 12 | public void OnPreprocessBuild(BuildReport report) 13 | { 14 | if (!DiSettings.TryGetInstance(out var settings) || !settings.BakeOnBuild) return; 15 | 16 | Debug.Log("Baking DI injection..."); 17 | InjectionBakingMenu.Bake(); 18 | Debug.Log("Successfully baked DI injection."); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/BakeOnBuildPreprocessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d48c35cd31244b78723e3a23ca2a8bc 3 | timeCreated: 1626376573 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Baking.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1b5f80b09d24be6be615bf91f9bfdef 3 | timeCreated: 1615842472 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Baking/InjectionBaker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e9191e5663e4373949d3297a26d9fcf 3 | timeCreated: 1615915314 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Baking/InjectionBakingData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace DELTation.DIFramework.Editor.Baking 5 | { 6 | internal static class InjectionBakingData 7 | { 8 | public const string ClassTemplate = @"// Generated automatically by DI Framework 9 | 10 | using DELTation.DIFramework.Baking; 11 | using UnityEngine; 12 | 13 | namespace {0} 14 | {{ 15 | /// 16 | /// Baked injection data 17 | /// 18 | internal static class {1} 19 | {{ 20 | #if UNITY_EDITOR 21 | [UnityEditor.InitializeOnLoadMethod] 22 | #else 23 | [RuntimeInitializeOnLoadMethod] 24 | #endif 25 | public static void Bake() 26 | {{ 27 | BakedInjection.DataExists = true; 28 | BakedInjection.Clear(); 29 | 30 | {2} 31 | }} 32 | 33 | {3} 34 | }} 35 | }} 36 | "; 37 | private const int SpacesInIndent = 4; 38 | 39 | 40 | private static readonly string[] FoldersHierarchy = { "Scripts", "DI", "Baked" }; 41 | 42 | public static readonly string DoubleIndent = new string(' ', SpacesInIndent * 2); 43 | public static readonly string TripleIndent = new string(' ', SpacesInIndent * 3); 44 | 45 | public static string ClassName => "BakedInjectionData"; 46 | 47 | public static string Namespace => string.Join(".", GetFoldersHierarchy().Skip(1)); 48 | 49 | public static IReadOnlyList GetFoldersHierarchy() => FoldersHierarchy; 50 | } 51 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Baking/InjectionBakingData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66a95661035e49b0b0fddbb73273e434 3 | timeCreated: 1615915568 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Baking/InjectionBakingMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e308ddbc0ab4019a621dcc860e355f6 3 | timeCreated: 1615842506 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Baking/InjectionBakingTypesUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | 4 | namespace DELTation.DIFramework.Editor.Baking 5 | { 6 | internal static class InjectionBakingTypesUtils 7 | { 8 | public static string GetFullyQualifiedName([NotNull] Type type) 9 | { 10 | if (type == null) throw new ArgumentNullException(nameof(type)); 11 | return type.GetFullFriendlyName()?.Replace("+", ".") ?? string.Empty; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Baking/InjectionBakingTypesUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 141f540f7b82406d9ad5f36ac870f32a 3 | timeCreated: 1615915865 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/ChildrenDependencyContainerCustomEditor.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Containers; 2 | using UnityEditor; 3 | 4 | namespace DELTation.DIFramework.Editor 5 | { 6 | [CustomEditor(typeof(ChildrenDependencyContainer))] 7 | internal class ChildrenDependencyContainerCustomEditor : UnityEditor.Editor { } 8 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/ChildrenDependencyContainerCustomEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3bc98a6e914e43f980c68df55a8fab08 3 | timeCreated: 1622834275 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/ContainerLifecycleCustomEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bca1ffc37d9641079437ffa70e0da984 3 | timeCreated: 1645300989 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/DIFramework.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DIFramework.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:1b60fcce313931d4f9eefc7f1c079778", 6 | "GUID:7661adf0dcc98034093743fe3a566d1a" 7 | ], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [], 18 | "noEngineReferences": false 19 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/DIFramework.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e52d7d91ba38c8e4ea526d047d12ac5e 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/DependencyContainerBaseCustomEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3554bb6c7276454da3b4c9a731bd0bfe 3 | timeCreated: 1622833633 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/DependencyGraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a34ad53e39644ce901837fd7059aeb9 3 | timeCreated: 1645290589 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/DependencyGraph/DependencyGraphView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 397af1d91789441dafeefbad63eb4d0e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/DependencyGraph/DependencyGraphWindow.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Containers; 2 | using UnityEditor; 3 | using UnityEngine.UIElements; 4 | 5 | namespace DELTation.DIFramework.Editor.DependencyGraph 6 | { 7 | public class DependencyGraphWindow : EditorWindow 8 | { 9 | private DependencyGraphView _graphView; 10 | 11 | private void OnEnable() 12 | { 13 | if (_graphView == null) return; 14 | if (!rootVisualElement.Contains(_graphView)) 15 | rootVisualElement.Add(_graphView); 16 | } 17 | 18 | private void OnDisable() 19 | { 20 | if (_graphView != null) 21 | rootVisualElement.Remove(_graphView); 22 | } 23 | 24 | public void Initialize(DependencyContainerBase container) 25 | { 26 | _graphView = new DependencyGraphView(container); 27 | _graphView.StretchToParentSize(); 28 | rootVisualElement.Add(_graphView); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/DependencyGraph/DependencyGraphWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b6b719144ae455aa7fc23c89512d99c 3 | timeCreated: 1645290661 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/DependencyGraph/DependencyNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor.Experimental.GraphView; 3 | 4 | namespace DELTation.DIFramework.Editor.DependencyGraph 5 | { 6 | public class DependencyNode : Node 7 | { 8 | public DependencyNode() 9 | { 10 | DependantsPort = GeneratePort(Direction.Output, Port.Capacity.Multi); 11 | DependantsPort.portName = ""; 12 | outputContainer.Add(DependantsPort); 13 | } 14 | 15 | private Port DependantsPort { get; } 16 | 17 | private Port CreateDependencyPort(Type type) 18 | { 19 | var dependencyPort = GeneratePort(Direction.Input, Port.Capacity.Single); 20 | dependencyPort.portName = type.GetFriendlyName(); 21 | inputContainer.Add(dependencyPort); 22 | return dependencyPort; 23 | } 24 | 25 | private Port GeneratePort(Direction portDirection, Port.Capacity capacity) => 26 | InstantiatePort(Orientation.Horizontal, portDirection, capacity, typeof(float)); 27 | 28 | public Edge AddDependency(DependencyNode dependencyNode, Type requiredDependencyType) 29 | { 30 | var dependencyPort = CreateDependencyPort(requiredDependencyType); 31 | var edge = dependencyPort.ConnectTo(dependencyNode.DependantsPort); 32 | return edge; 33 | } 34 | 35 | public void AddUnresolvedDependencyPort(Type requiredDependencyType) 36 | { 37 | var port = CreateDependencyPort(requiredDependencyType); 38 | port.portName = $"(UNRESOLVED) {port.portName}"; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/DependencyGraph/DependencyNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8658c92ed174836adc46b7b8f61b625 3 | timeCreated: 1645290617 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/DiSettingsCustomEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bb5e27168b741238a3a8630f6e1644c 3 | timeCreated: 1619294965 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/FallbackDependencyContainerCustomEditor.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Containers; 2 | using UnityEditor; 3 | 4 | namespace DELTation.DIFramework.Editor 5 | { 6 | [CustomEditor(typeof(FallbackDependencyContainer))] 7 | internal class FallbackDependencyContainerCustomEditor : UnityEditor.Editor { } 8 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/FallbackDependencyContainerCustomEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d598d96f1784623b5be822b898044c1 3 | timeCreated: 1622834330 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/GlobalResolverReportGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a43f8965958340c398deda73582f5ba4 3 | timeCreated: 1605909071 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb0d2432dbe8cf7499e82cffc85df70b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/container.png -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/di_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/di_settings.png -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/ignore_by_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/ignore_by_container.png -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/resolver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/resolver.png -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/resolver_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/resolver_warning.png -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/root_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/Graphics/root_container.png -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/HierarchyIcons.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace DELTation.DIFramework.Editor 5 | { 6 | [InitializeOnLoad] 7 | public static class HierarchyIcons 8 | { 9 | static HierarchyIcons() => EditorApplication.hierarchyWindowItemOnGUI += UpdateIcons; 10 | 11 | private static void UpdateIcons(int instanceId, Rect selectionRect) 12 | { 13 | if (!DiSettings.TryGetInstance(out var settings) || !settings.ShowIconsInHierarchy) return; 14 | 15 | if (!(EditorUtility.InstanceIDToObject(instanceId) is GameObject gameObject)) return; 16 | if (!gameObject.TryGetComponent(out IShowIconInHierarchy showIconInHierarchy)) return; 17 | if (!(showIconInHierarchy is Object @object)) return; 18 | 19 | DrawIcon(@object, selectionRect); 20 | } 21 | 22 | private static void DrawIcon(Object @object, Rect selectionRect) 23 | { 24 | const float iconSize = 16f; 25 | var rect = new Rect(selectionRect.x + selectionRect.width - iconSize, selectionRect.y, iconSize, iconSize); 26 | GUI.DrawTexture(rect, GetObjectIcon(@object)); 27 | } 28 | 29 | private static Texture GetObjectIcon(Object @object) => 30 | EditorGUIUtility.ObjectContent(@object, @object.GetType()).image; 31 | } 32 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/HierarchyIcons.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0563bb4ba0d94bce99c7b0d5d425f5d6 3 | timeCreated: 1618948515 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/InvalidateCacheOnLoad.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Resolution; 2 | using UnityEditor; 3 | 4 | namespace DELTation.DIFramework.Editor 5 | { 6 | internal static class InvalidateCacheOnLoad 7 | { 8 | [InitializeOnEnterPlayMode] 9 | public static void InvalidateCache() 10 | { 11 | Injection.InvalidateCache(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/InvalidateCacheOnLoad.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d868840a07a4e2181ad589b7dcde57c 3 | timeCreated: 1615833377 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/ListDependencyContainerCustomEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41dd0cf66b9e4e94b89c05e219059109 3 | timeCreated: 1605349165 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/MenuHelper.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Editor 2 | { 3 | internal static class MenuHelper 4 | { 5 | public const string MenuName = "DI"; 6 | } 7 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/MenuHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b2fa972ae4e472bafe36a5f36a560f1 3 | timeCreated: 1615842529 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/MissingResolverWarningIcons.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: beb14af9c14e4e8387f0ac9b9a345b9c 3 | timeCreated: 1622831451 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/ResolverCustomEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ad9a726db894af9abf53a03abb97ce9 3 | timeCreated: 1605280597 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/RootContainerCreator.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEditor.SceneManagement; 3 | using UnityEngine; 4 | using UnityEngine.SceneManagement; 5 | using static DELTation.DIFramework.Editor.MenuHelper; 6 | 7 | namespace DELTation.DIFramework.Editor 8 | { 9 | internal static class RootContainerCreator 10 | { 11 | [MenuItem(MenuName + "/Create Root Container", priority = 0)] 12 | public static void CreateRootContainer() 13 | { 14 | var go = new GameObject { name = "[Dependencies]" }; 15 | go.AddComponent(); 16 | EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene()); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/RootContainerCreator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 635a4b4099514405aa86dd9af11fd7cf 3 | timeCreated: 1608796691 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/RootDependencyContainerCustomEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3bfb9e10853e4242ba933a4039c0c2bf 3 | timeCreated: 1605128306 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Editor/TypeNameExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bcd8fbac8364831a5f362f8b089f497 3 | timeCreated: 1626608350 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 977264163bfa63e42b62a2521355fbb7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("DIFramework.PlayTests")] 4 | [assembly: InternalsVisibleTo("DIFramework.Editor")] -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef641a0c05614e45b0b2f17ef1444bf5 3 | timeCreated: 1644517336 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Baking.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7328c9b75dbc42119215016d4de56ec2 3 | timeCreated: 1615840723 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Baking/BakedInjection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60a546ab4fc24f16a9665cdc08190a54 3 | timeCreated: 1615840737 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Baking/InjectionFunction.cs: -------------------------------------------------------------------------------- 1 | using JetBrains.Annotations; 2 | using UnityEngine; 3 | 4 | namespace DELTation.DIFramework.Baking 5 | { 6 | /// 7 | /// Represents a procedure to satisfy component's dependencies. 8 | /// 9 | public delegate void InjectionFunction([NotNull] MonoBehaviour component, 10 | [NotNull] ResolutionFunction resolutionFunction); 11 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Baking/InjectionFunction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca01ec79f6734adabfce941ca3106b75 3 | timeCreated: 1615841839 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Baking/PocoInstantiationFunction.cs: -------------------------------------------------------------------------------- 1 | using JetBrains.Annotations; 2 | 3 | namespace DELTation.DIFramework.Baking 4 | { 5 | /// 6 | /// Represents a procedure to create an instance of POCO. 7 | /// 8 | public delegate object PocoInstantiationFunction([NotNull] PocoResolutionFunction resolutionFunction); 9 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Baking/PocoInstantiationFunction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37c72a1a70334841ab98fdff2f387824 3 | timeCreated: 1619294310 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Baking/PocoResolutionFunction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | 4 | namespace DELTation.DIFramework.Baking 5 | { 6 | /// 7 | /// Represents a function to find dependencies of an instance of POCO. 8 | /// 9 | public delegate object PocoResolutionFunction([NotNull] Type type); 10 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Baking/PocoResolutionFunction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d86cfa0677245279bad89e4a865bf1f 3 | timeCreated: 1619294132 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Baking/ResolutionFunction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | using UnityEngine; 4 | 5 | namespace DELTation.DIFramework.Baking 6 | { 7 | /// 8 | /// Represents a function to find component's dependency. 9 | /// 10 | public delegate object ResolutionFunction([NotNull] MonoBehaviour component, [NotNull] Type type); 11 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Baking/ResolutionFunction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3facc887c8ad4414950a1fb448a26b79 3 | timeCreated: 1615841520 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/ContainerBuilder.Registered.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace DELTation.DIFramework 5 | { 6 | public interface IRegisteredContainerBuilder : ICanRegisterContainerBuilder 7 | { 8 | /// 9 | /// Mark the last dependency as internal (disallow to resolve it outside the container). 10 | /// 11 | /// The same container builder. 12 | IRegisteredContainerBuilder AsInternal(); 13 | } 14 | 15 | internal class InternalOnlyTag { } 16 | 17 | internal partial class ContainerBuilder 18 | { 19 | /// 20 | public IRegisteredContainerBuilder AsInternal() 21 | { 22 | if (WasAbleToRegisterLast) 23 | { 24 | EnsureNotEmpty(); 25 | var index = DependenciesCount - 1; 26 | AddTag(index, typeof(InternalOnlyTag)); 27 | } 28 | 29 | return this; 30 | } 31 | 32 | [Conditional("DEBUG")] 33 | private void EnsureNotEmpty() 34 | { 35 | if (DependenciesCount == 0) 36 | throw new InvalidOperationException("Container builder is empty."); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/ContainerBuilder.Registered.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba983abe44f444b0ada3cde531d6a3be 3 | timeCreated: 1644612661 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/ContainerBuilder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d647d9fb3a34bbb809d010159934b78 3 | timeCreated: 1605288378 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/ContainerBuilderExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0abe5b5f35ce44aeb0108416113748cb 3 | timeCreated: 1636654604 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/ContainerLifecycle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4573e2ad52a42b1b16440bc9fe52267 3 | timeCreated: 1636659639 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bcfe92d149e449c8a238b339d8263e50 3 | timeCreated: 1603977131 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers/ChildrenDependencyContainer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Containers 4 | { 5 | /// 6 | /// Containers that registers all children. 7 | /// 8 | [DisallowMultipleComponent, AddComponentMenu("Dependency Container/Children Dependency Container")] 9 | public sealed class ChildrenDependencyContainer : DependencyContainerBase 10 | { 11 | protected override void ComposeDependencies(ICanRegisterContainerBuilder builder) 12 | { 13 | foreach (var component in GetComponentsInChildren()) 14 | { 15 | if (component == null) continue; // if a script is missing 16 | if (IsIgnored(component)) continue; 17 | builder.Register(component); 18 | } 19 | } 20 | 21 | private static bool IsIgnored(Component component) => component is Transform; 22 | } 23 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers/ChildrenDependencyContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 040cea81ead140b3b09d01e92a02762c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {fileID: 2800000, guid: 645555965af09204999f7c88c551e407, type: 3} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers/ConfigurableDependencyContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b67679fabda44afa8abacc12fafc57c3 3 | timeCreated: 1619039026 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers/DependencyContainerBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80f339fcf9d04fafb5a971e68c6aa9bd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {fileID: 2800000, guid: 645555965af09204999f7c88c551e407, type: 3} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers/FallbackDependencyContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19d612115d554b4a9042e6ca47a12ae3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {fileID: 2800000, guid: 645555965af09204999f7c88c551e407, type: 3} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers/IIgnoreByContainer.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Containers 2 | { 3 | /// 4 | /// Makes containers ignore the object. 5 | /// 6 | public interface IIgnoreByContainer { } 7 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers/IIgnoreByContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d186037d8fb4e4293c0ab501bc650a0 3 | timeCreated: 1644523794 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers/IgnoreByContainer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Containers 4 | { 5 | /// 6 | public sealed class IgnoreByContainer : MonoBehaviour, IIgnoreByContainer { } 7 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers/IgnoreByContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e99075442a5f40e58e67b226c77d42d6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {fileID: 2800000, guid: 237da16131c20fa4db0c21edb63a4972, type: 3} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Containers/ListDependencyContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8911f1965eb14108bdb8b092b45649fe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {fileID: 2800000, guid: 645555965af09204999f7c88c551e407, type: 3} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/ContainersExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 128e0535279a4c6a9dcf83bde81dd038 3 | timeCreated: 1605122370 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/DIFramework.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DIFramework", 3 | "references": [ 4 | "GUID:7661adf0dcc98034093743fe3a566d1a" 5 | ], 6 | "includePlatforms": [], 7 | "excludePlatforms": [], 8 | "allowUnsafeCode": false, 9 | "overrideReferences": false, 10 | "precompiledReferences": [], 11 | "autoReferenced": true, 12 | "defineConstraints": [], 13 | "versionDefines": [], 14 | "noEngineReferences": false 15 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/DIFramework.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b60fcce313931d4f9eefc7f1c079778 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee70b464917e416ea0628131b263dccc 3 | timeCreated: 1644660844 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/CompositeDependency.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ef180c985d348518085b5c71bb0fcc8 3 | timeCreated: 1644663394 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/DependencyUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dca394c6e49a430faac2fd8a7d769b2e 3 | timeCreated: 1644662205 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/DependencyWithMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using DELTation.DIFramework.Resolution; 4 | 5 | namespace DELTation.DIFramework.Dependencies 6 | { 7 | internal readonly struct DependencyWithMetadata : IDependency, IEquatable 8 | { 9 | private readonly IDependency _dependency; 10 | public readonly HashSet Tags; 11 | 12 | public DependencyWithMetadata(IDependency dependency) 13 | { 14 | _dependency = dependency; 15 | Tags = new HashSet(); 16 | } 17 | 18 | public string GetInternalDependencyTypeName() => _dependency.GetInternalDependencyTypeName(); 19 | 20 | public object ProduceInitializedObject(PocoInjection.ResolutionFunction resolutionFunction) => 21 | _dependency.ProduceInitializedObject(resolutionFunction); 22 | 23 | public Type GetResultingType() => _dependency.GetResultingType(); 24 | public void GetDependencies(ICollection dependencies) => _dependency.GetDependencies(dependencies); 25 | 26 | public bool Equals(DependencyWithMetadata other) => 27 | Equals(_dependency, other._dependency) && Equals(Tags, other.Tags); 28 | 29 | public override bool Equals(object obj) => obj is DependencyWithMetadata other && Equals(other); 30 | 31 | public override int GetHashCode() 32 | { 33 | unchecked 34 | { 35 | return ((_dependency != null ? _dependency.GetHashCode() : 0) * 397) ^ 36 | (Tags != null ? Tags.GetHashCode() : 0); 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/DependencyWithMetadata.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3371791f73bb478791c012aa98490b42 3 | timeCreated: 1644661770 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/FactoryMethodDelegateDependency.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using DELTation.DIFramework.Resolution; 4 | 5 | namespace DELTation.DIFramework.Dependencies 6 | { 7 | public class FactoryMethodDelegateDependency : IDependency 8 | { 9 | private readonly FactoryMethodDelegate _factoryMethodDelegate; 10 | 11 | public FactoryMethodDelegateDependency(FactoryMethodDelegate factoryMethodDelegate) => 12 | _factoryMethodDelegate = factoryMethodDelegate; 13 | 14 | public string GetInternalDependencyTypeName() => "Factory Method"; 15 | 16 | public object ProduceInitializedObject(PocoInjection.ResolutionFunction resolutionFunction) => 17 | _factoryMethodDelegate.Instantiate(resolutionFunction); 18 | 19 | public Type GetResultingType() => _factoryMethodDelegate.ReturnType; 20 | 21 | public void GetDependencies(ICollection dependencies) 22 | { 23 | // ReSharper disable once ForCanBeConvertedToForeach 24 | for (var index = 0; index < _factoryMethodDelegate.ParameterTypes.Count; index++) 25 | { 26 | var parameterInfo = _factoryMethodDelegate.ParameterTypes[index]; 27 | dependencies.Add(parameterInfo.ParameterType); 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/FactoryMethodDelegateDependency.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78beaac1365843ec9e81d2b23fff5c38 3 | timeCreated: 1644661776 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/GlobalDependency.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using DELTation.DIFramework.Resolution; 4 | 5 | namespace DELTation.DIFramework.Dependencies 6 | { 7 | internal class GlobalDependency : IDependency 8 | { 9 | private readonly Type _type; 10 | 11 | public GlobalDependency(Type type) => _type = type; 12 | 13 | public string GetInternalDependencyTypeName() => "Global"; 14 | 15 | public object ProduceInitializedObject(PocoInjection.ResolutionFunction resolutionFunction) => 16 | throw new InvalidOperationException("Global dependency cannot be instantiated."); 17 | 18 | public Type GetResultingType() => _type; 19 | 20 | public void GetDependencies(ICollection dependencies) { } 21 | } 22 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/GlobalDependency.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c142835eee14f4d9f13a45f392b3c7b 3 | timeCreated: 1645306102 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/IDependency.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using DELTation.DIFramework.Resolution; 4 | using JetBrains.Annotations; 5 | 6 | namespace DELTation.DIFramework.Dependencies 7 | { 8 | public interface IDependency 9 | { 10 | string GetInternalDependencyTypeName(); 11 | 12 | [NotNull] 13 | object ProduceInitializedObject(PocoInjection.ResolutionFunction resolutionFunction); 14 | 15 | [NotNull, MustUseReturnValue] 16 | Type GetResultingType(); 17 | 18 | void GetDependencies([NotNull] ICollection dependencies); 19 | } 20 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/IDependency.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 657675c5640844689a84741ad973f0ea 3 | timeCreated: 1644660850 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/ObjectDependency.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using DELTation.DIFramework.Resolution; 4 | using JetBrains.Annotations; 5 | 6 | namespace DELTation.DIFramework.Dependencies 7 | { 8 | public class ObjectDependency : IDependency 9 | { 10 | private readonly object _object; 11 | 12 | public ObjectDependency([NotNull] object o) => _object = o ?? throw new ArgumentNullException(nameof(o)); 13 | 14 | public string GetInternalDependencyTypeName() => "Object"; 15 | 16 | public object ProduceInitializedObject(PocoInjection.ResolutionFunction resolutionFunction) => _object; 17 | public Type GetResultingType() => _object.GetType(); 18 | 19 | public void GetDependencies(ICollection dependencies) 20 | { 21 | // already created objects do not have any dependencies 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/ObjectDependency.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21fe7b8f35a64df18429d5cc346c5ac7 3 | timeCreated: 1644661783 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/TypeDependency.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using DELTation.DIFramework.Resolution; 4 | using JetBrains.Annotations; 5 | 6 | namespace DELTation.DIFramework.Dependencies 7 | { 8 | public class TypeDependency : IDependency 9 | { 10 | private readonly Type _type; 11 | 12 | public TypeDependency([NotNull] Type type) => _type = type ?? throw new ArgumentNullException(nameof(type)); 13 | 14 | public string GetInternalDependencyTypeName() => "Type"; 15 | 16 | public object ProduceInitializedObject(PocoInjection.ResolutionFunction resolutionFunction) => 17 | PocoInjection.CreateInstance(_type, resolutionFunction); 18 | 19 | public Type GetResultingType() => _type; 20 | 21 | public void GetDependencies(ICollection dependencies) 22 | { 23 | if (!PocoInjection.TryGetInjectableConstructorParameters(_type, out var parameters)) return; 24 | 25 | // ReSharper disable once ForCanBeConvertedToForeach 26 | for (var index = 0; index < parameters.Count; index++) 27 | { 28 | var parameterInfo = parameters[index]; 29 | dependencies.Add(parameterInfo.ParameterType); 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Dependencies/TypeDependency.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c3a837856114d099573c6d72daa855a 3 | timeCreated: 1644661779 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/DependencySource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DELTation.DIFramework 4 | { 5 | [Flags] 6 | public enum DependencySource 7 | { 8 | Local = 1 << 1, // From this GameObject 9 | Children = 1 << 2, // From children of the Resolver 10 | Parent = 1 << 3, // From parents of the Resolver 11 | Global = 1 << 4, // From root containers 12 | } 13 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/DependencySource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c2af3eac2df42c28b3a3523a646b02c 3 | timeCreated: 1605118038 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/DependencySources.cs: -------------------------------------------------------------------------------- 1 | using static DELTation.DIFramework.DependencySource; 2 | 3 | namespace DELTation.DIFramework 4 | { 5 | internal static class DependencySources 6 | { 7 | public static DependencySource All => Local | Children | Parent | Global; 8 | } 9 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/DependencySources.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e3d5365c2f24d3da575b3dcbd91fe1a 3 | timeCreated: 1612698929 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Di.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89bb5f8c4b4347538b02ab0350c3cb16 3 | timeCreated: 1618951573 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/DiSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0a8b0f001d046b3aad3b36023e6de94 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {fileID: 2800000, guid: ff09f4942bf36a2459c517c6264f2fa6, type: 3} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1b34cb6374547ffba6e64015dbc3d3b 3 | timeCreated: 1618948814 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Editor/IShowIconInHierarchy.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Editor 2 | { 3 | /// 4 | /// A tag to show component's icon in hierarchy view. 5 | /// 6 | public interface IShowIconInHierarchy { } 7 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Editor/IShowIconInHierarchy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2768bcd37bb941aca1dfd653c367fec4 3 | timeCreated: 1618948828 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa6f5c1fabce43a3954bf86cc33d311b 3 | timeCreated: 1614717825 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions/DependencyAlreadyRegistered.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | 4 | namespace DELTation.DIFramework.Exceptions 5 | { 6 | public class DependencyAlreadyRegistered : Exception 7 | { 8 | public readonly Type Type; 9 | public readonly object RegisteredDependency; 10 | 11 | public DependencyAlreadyRegistered([NotNull] Type type, [NotNull] object registeredDependency) 12 | { 13 | Type = type ?? throw new ArgumentNullException(nameof(type)); 14 | RegisteredDependency = 15 | registeredDependency ?? throw new ArgumentNullException(nameof(registeredDependency)); 16 | Message = $"Dependency of type {type} is already registered: {registeredDependency}."; 17 | } 18 | 19 | public override string Message { get; } 20 | } 21 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions/DependencyAlreadyRegistered.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 090fe37340f34f21abbcf97dfe5286ea 3 | timeCreated: 1614718562 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions/DependencyLoopException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DELTation.DIFramework.Exceptions 4 | { 5 | public class DependencyLoopException : Exception 6 | { 7 | public DependencyLoopException() : base("Dependency graph has a loop.") { } 8 | } 9 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions/DependencyLoopException.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 379162f426344a37965233d08dfed234 3 | timeCreated: 1622833391 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions/DependencyNotRegisteredException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | 4 | namespace DELTation.DIFramework.Exceptions 5 | { 6 | public class DependencyNotRegisteredException : Exception 7 | { 8 | public readonly Type Type; 9 | 10 | public DependencyNotRegisteredException([NotNull] Type type) 11 | { 12 | Type = type ?? throw new ArgumentNullException(nameof(type)); 13 | Message = $"Dependency of type {type} is not registered."; 14 | } 15 | 16 | public override string Message { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions/DependencyNotRegisteredException.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2be2a96ead1b43b3917e3822ee045447 3 | timeCreated: 1614718379 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions/DependencyNotResolvedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | using UnityEngine; 4 | 5 | namespace DELTation.DIFramework.Exceptions 6 | { 7 | public class DependencyNotResolvedException : Exception 8 | { 9 | public readonly Type Type; 10 | public readonly MonoBehaviour Component; 11 | 12 | public DependencyNotResolvedException([NotNull] MonoBehaviour component, [NotNull] Type type) 13 | { 14 | Component = component ? component : throw new ArgumentNullException(nameof(component)); 15 | Type = type ?? throw new ArgumentNullException(nameof(type)); 16 | Message = $"{component}: did not resolve dependency of type {type}."; 17 | } 18 | 19 | public override string Message { get; } 20 | } 21 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions/DependencyNotResolvedException.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd3f115ceda040e197b8dda6fd6b3ba5 3 | timeCreated: 1614718157 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions/NotInjectableException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | using UnityEngine; 4 | 5 | namespace DELTation.DIFramework.Exceptions 6 | { 7 | public class NotInjectableException : Exception 8 | { 9 | public readonly MonoBehaviour Component; 10 | public readonly string ConstructorName; 11 | 12 | public NotInjectableException([NotNull] MonoBehaviour component, [NotNull] string constructorName) 13 | { 14 | Component = component ? component : throw new ArgumentNullException(nameof(component)); 15 | ConstructorName = constructorName ?? throw new ArgumentNullException(nameof(constructorName)); 16 | Message = $"{component}'s {constructorName} method is not injectable."; 17 | } 18 | 19 | public override string Message { get; } 20 | } 21 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Exceptions/NotInjectableException.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56f32d5c5a6144daadeeeb3cc8d92ae3 3 | timeCreated: 1614717831 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/FactoryMethod.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework 2 | { 3 | public delegate TR FactoryMethod() 4 | where TR : class; 5 | 6 | public delegate TR FactoryMethod(T1 a1) 7 | where TR : class 8 | where T1 : class; 9 | 10 | public delegate TR FactoryMethod(T1 a1, T2 a2) 11 | where TR : class 12 | where T1 : class 13 | where T2 : class; 14 | 15 | public delegate TR FactoryMethod(T1 a1, T2 a2, T3 a3) 16 | where TR : class 17 | where T1 : class 18 | where T2 : class 19 | where T3 : class; 20 | 21 | public delegate TR FactoryMethod(T1 a1, T2 a2, T3 a3, T4 a4) 22 | where TR : class 23 | where T1 : class 24 | where T2 : class 25 | where T3 : class 26 | where T4 : class; 27 | 28 | public delegate TR FactoryMethod(T1 a1, T2 a2, T3 a3, T4 a4, T5 t5) 29 | where TR : class 30 | where T1 : class 31 | where T2 : class 32 | where T3 : class 33 | where T4 : class 34 | where T5 : class; 35 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/FactoryMethod.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0912e826bcd441c29ba2b02c2a5140ec 3 | timeCreated: 1644523794 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/FactoryMethodDelegate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef662360e4a741028cac44270b462949 3 | timeCreated: 1644515129 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/ICanRegisterContainerBuilder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bacaf05b21e460e91231d276eafea05 3 | timeCreated: 1644612574 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/IDependencyContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50bacf12d662492db1fe928304159399 3 | timeCreated: 1603975726 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/IInitializable.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework 2 | { 3 | internal interface IInitializable 4 | { 5 | void EnsureInitialized(); 6 | } 7 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/IInitializable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f620fec5bff4186807af5eeac326af2 3 | timeCreated: 1605120236 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/IResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace DELTation.DIFramework 5 | { 6 | internal interface IResolver 7 | { 8 | void Resolve(); 9 | bool CanBeResolvedSafe(MonoBehaviour component, Type type, out DependencySource actualSource); 10 | } 11 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/IResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc060ea77c164035bc3ae6d5c5f35d66 3 | timeCreated: 1612699717 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5183f2316243f2b47ab78fca0e2e95d6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/DIFramework.Lifecycle.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DIFramework.Lifecycle", 3 | "references": [], 4 | "includePlatforms": [], 5 | "excludePlatforms": [], 6 | "allowUnsafeCode": false, 7 | "overrideReferences": false, 8 | "precompiledReferences": [], 9 | "autoReferenced": true, 10 | "defineConstraints": [], 11 | "versionDefines": [], 12 | "noEngineReferences": false 13 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/DIFramework.Lifecycle.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7661adf0dcc98034093743fe3a566d1a 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/IDestroyable.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Lifecycle 2 | { 3 | public interface IDestroyable 4 | { 5 | /// 6 | /// Executed by 7 | /// 8 | /// at Unity's OnDestroy callback. 9 | /// 10 | void OnDestroy(); 11 | } 12 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/IDestroyable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d661bcdde53f404499842f0947458444 3 | timeCreated: 1636659604 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/IFixedUpdatable.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Lifecycle 2 | { 3 | public interface IFixedUpdatable 4 | { 5 | /// 6 | /// Executed by 7 | /// 8 | /// at Unity's FixedUpdate callback. 9 | /// 10 | void OnFixedUpdate(); 11 | } 12 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/IFixedUpdatable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a66ad32c01f4fa684501cb5f71b8ca7 3 | timeCreated: 1636740969 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/ILateUpdatable.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Lifecycle 2 | { 3 | public interface ILateUpdatable 4 | { 5 | /// 6 | /// Executed by 7 | /// 8 | /// at Unity's LateUpdate callback. 9 | /// 10 | void OnLateUpdate(); 11 | } 12 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/ILateUpdatable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75bbbd289a8a41ae8d22b55795a9989d 3 | timeCreated: 1636740970 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/IStartable.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Lifecycle 2 | { 3 | public interface IStartable 4 | { 5 | /// 6 | /// Executed by 7 | /// 8 | /// at Unity's Start callback. 9 | /// 10 | void OnStart(); 11 | } 12 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/IStartable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a951d3e33d34aeeaadc32922fbd5383 3 | timeCreated: 1636659411 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/IUpdatable.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Lifecycle 2 | { 3 | public interface IUpdatable 4 | { 5 | /// 6 | /// Executed by 7 | /// 8 | /// at Unity's Update callback. 9 | /// 10 | void OnUpdate(); 11 | } 12 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Lifecycle/IUpdatable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e31b6dbf8ba4cf19d095c6c9a1f8b58 3 | timeCreated: 1636659489 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Pooling.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ccf607ab198457196887a967cd28241 3 | timeCreated: 1615928300 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Pooling/ListPool.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.CompilerServices; 4 | using JetBrains.Annotations; 5 | 6 | namespace DELTation.DIFramework.Pooling 7 | { 8 | internal static class ListPool 9 | { 10 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 11 | public static List Rent() 12 | { 13 | if (FreeLists.Count == 0) 14 | return new List(); 15 | 16 | var lastListIndex = FreeLists.Count - 1; 17 | var lastList = FreeLists[lastListIndex]; 18 | FreeLists.RemoveAt(lastListIndex); 19 | FreeListsSet.Remove(lastList); 20 | lastList.Clear(); 21 | return lastList; 22 | } 23 | 24 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 25 | public static void Return([NotNull] List list) 26 | { 27 | if (list == null) throw new ArgumentNullException(nameof(list)); 28 | 29 | list.Clear(); 30 | if (FreeListsSet.Contains(list)) return; 31 | 32 | FreeLists.Add(list); 33 | FreeListsSet.Add(list); 34 | } 35 | 36 | private static readonly HashSet> FreeListsSet = new HashSet>(); 37 | private static readonly List> FreeLists = new List>(); 38 | } 39 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Pooling/ListPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a7aaf94161c4b73aee415277fe22a87 3 | timeCreated: 1615928304 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Reporting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25d6cdac96424ab49ff745c2d0ad569f 3 | timeCreated: 1605908193 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Reporting/ComponentResolutionData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67209ad725a8480d8cbd5b1786c1ee95 3 | timeCreated: 1605908221 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Reporting/ResolverReport.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9bbe820e5fe34239a47dcc5513387a7f 3 | timeCreated: 1605908005 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Resolution.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd3cb1a805ef4b8a869408e04cced39b 3 | timeCreated: 1612699077 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Resolution/CachedComponentResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f733d28947e44422a1485f2ed9329524 3 | timeCreated: 1612699286 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Resolution/Injection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d45d429054d474f9ea0a3cd82d5c255 3 | timeCreated: 1605905602 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Resolution/PocoInjection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 822674bd6e2e41499d8c080ce5c7f920 3 | timeCreated: 1619121256 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Resolution/ResolutionBySource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f8bacc40fe4468ba9fa50f47171495b 3 | timeCreated: 1612698873 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Resolution/ResolutionContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace DELTation.DIFramework.Resolution 5 | { 6 | internal readonly struct ResolutionContext : IEquatable 7 | { 8 | public readonly GameObject Resolver; 9 | public readonly Component Component; 10 | 11 | public ResolutionContext(GameObject resolver, Component component) 12 | { 13 | Resolver = resolver; 14 | Component = component; 15 | } 16 | 17 | public bool Equals(ResolutionContext other) => 18 | Equals(Resolver, other.Resolver) && Equals(Component, other.Component); 19 | 20 | public override bool Equals(object obj) => obj is ResolutionContext other && Equals(other); 21 | 22 | public override int GetHashCode() 23 | { 24 | unchecked 25 | { 26 | return ((Resolver != null ? Resolver.GetHashCode() : 0) * 397) ^ 27 | (Component != null ? Component.GetHashCode() : 0); 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Resolution/ResolutionContext.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c5066a544364383939ecbcd0764a099 3 | timeCreated: 1612698877 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Resolution/ResolverPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06a9667cbbb240bc90a36b7f8a2e81bd 3 | timeCreated: 1615920042 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Resolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 596154ae2f344d76ac02b30e82d81226 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: -500 8 | icon: {fileID: 2800000, guid: f3aeabe40aee78044aa3e5fc6ee12f47, type: 3} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/RootDependencyContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4992552e00a045e88eb085a57700a36f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: -505 8 | icon: {fileID: 2800000, guid: 06813c7186862db4080ca00230a99bf5, type: 3} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Sorting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13686cb58b4749e6a59e03f2f1076cf7 3 | timeCreated: 1619118437 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/Sorting/TopologicalSorting.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54191726ca61401bb44b97eb590d07d9 3 | timeCreated: 1619118443 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/TypedCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5059c146825e4ac3a4a78343d0c4b047 3 | timeCreated: 1603977726 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/UnityUtils.cs: -------------------------------------------------------------------------------- 1 | using JetBrains.Annotations; 2 | using UnityEngine; 3 | 4 | namespace DELTation.DIFramework 5 | { 6 | internal static class UnityUtils 7 | { 8 | public static bool IsNullOrUnityNull([CanBeNull] object obj) => 9 | obj is Object unityObj ? unityObj == null : obj == null; 10 | } 11 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Runtime/UnityUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df83105b03654a0a977e653eb609ee09 3 | timeCreated: 1644508988 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71ee49a6ecb98e04692654c19f649e6c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Performance.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0774ba2ef8946a9946b2e90d00e1e2e 3 | timeCreated: 1644695481 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Performance/CustomContainerPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c66e577d21b445d83a7b42e9370714f 3 | timeCreated: 1644695534 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Performance/DIFramework.PerformanceTests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DIFramework.PerformanceTests", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:91836b14885b8a34196f4aa8303d7793", 6 | "GUID:1b60fcce313931d4f9eefc7f1c079778" 7 | ], 8 | "includePlatforms": [], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": true, 12 | "precompiledReferences": [ 13 | "nunit.framework.dll" 14 | ], 15 | "autoReferenced": true, 16 | "defineConstraints": [ 17 | "UNITY_INCLUDE_TESTS" 18 | ], 19 | "versionDefines": [], 20 | "noEngineReferences": false 21 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Performance/DIFramework.PerformanceTests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5cc1084a660a3c4f82fe71b5ad64cc4 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Performance/ResolverPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace DELTation.DIFramework.Tests.Performance 7 | { 8 | [Explicit] 9 | public class ResolverPerformanceTest 10 | { 11 | private const int WarmupCount = 10; 12 | private const int MeasurementCount = 25; 13 | private const int IterationsPerMeasurement = 10; 14 | 15 | [Test, Performance] 16 | public void InstantiatePrefabWithDi() 17 | { 18 | var prefab = AssetDatabase.LoadAssetAtPath("Assets/PerformanceTest/Prefabs/With DI.prefab"); 19 | 20 | Measure.Method(() => Object.Instantiate(prefab)) 21 | .WarmupCount(WarmupCount) 22 | .MeasurementCount(MeasurementCount) 23 | .IterationsPerMeasurement(IterationsPerMeasurement) 24 | .GC() 25 | .Run(); 26 | } 27 | 28 | [Test, Performance] 29 | public void InstantiatePrefabWithoutDi() 30 | { 31 | var prefab = AssetDatabase.LoadAssetAtPath("Assets/PerformanceTest/Prefabs/Without DI.prefab"); 32 | Measure.Method(() => Object.Instantiate(prefab)) 33 | .WarmupCount(WarmupCount) 34 | .MeasurementCount(MeasurementCount) 35 | .IterationsPerMeasurement(IterationsPerMeasurement) 36 | .GC() 37 | .Run(); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Performance/ResolverPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7fae0cbff444417af9816605494b9ad 3 | timeCreated: 1644696578 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6dd062fdf785b5545ac20bb93507a83c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/ChildrenDependencyContainerTests.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Containers; 2 | using DELTation.DIFramework.Tests.Runtime.Components; 3 | using NUnit.Framework; 4 | using UnityEngine; 5 | 6 | namespace DELTation.DIFramework.Tests.Runtime 7 | { 8 | [TestFixture] 9 | public class ChildrenDependencyContainerTests : TestFixtureBase 10 | { 11 | [Test] 12 | public void CreateObject_WithDependency_Resolved() 13 | { 14 | var container = CreateContainerWith(); 15 | var body = container.gameObject.AddComponent(); 16 | 17 | var dependency = CreateRigidbodyComponent(); 18 | 19 | Assert.That(dependency.Rigidbody, Is.EqualTo(body)); 20 | } 21 | 22 | private RigidbodyComponent CreateRigidbodyComponent() 23 | { 24 | var go = NewGameObject(); 25 | var dependency = go.AddComponent(); 26 | go.AddComponent(); 27 | return dependency; 28 | } 29 | 30 | [Test] 31 | public void CreateObject_WithIgnoredDependency_NotResolved() 32 | { 33 | var ignoredBody = NewGameObject() 34 | .gameObject.AddComponent() 35 | .gameObject.AddComponent(); 36 | var container = CreateContainerWith(); 37 | ignoredBody.transform.parent = container.transform; 38 | 39 | var resolved = container.TryResolve(out Rigidbody _); 40 | 41 | Assert.That(resolved, Is.False); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/ChildrenDependencyContainerTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdf21fccc7d844aa9c1e92fd7f62bbaf 3 | timeCreated: 1605121955 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a81a4f693f84970911033fb1c357cab 3 | timeCreated: 1605279078 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/Benchmark.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4882846b58eb4aee93d7b0a1bdce863e 3 | timeCreated: 1614201364 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/Benchmark/Components.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9bf28216d874f319276dd675fb409a7 3 | timeCreated: 1614201368 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/Child.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Tests.Runtime.Components 2 | { 3 | public class Child : Parent { } 4 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/Child.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff9a975631f44c32a783d54e9ed7d5f9 3 | timeCreated: 1605279131 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/ComponentsWithSeveralConstructors.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public class ComponentsWithSeveralConstructors : MonoBehaviour 6 | { 7 | public bool FirstCalled { get; private set; } 8 | public bool SecondCalled { get; private set; } 9 | public void Construct(Parent p) => FirstCalled = true; 10 | public void Construct(Child c) => SecondCalled = true; 11 | } 12 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/ComponentsWithSeveralConstructors.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 503f7c3596f14e768be3d196468f723c 3 | timeCreated: 1605302780 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/ConstructChecker.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public class ConstructChecker : MonoBehaviour 6 | { 7 | public bool Constructed { get; private set; } 8 | 9 | public void Construct() => Constructed = true; 10 | } 11 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/ConstructChecker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00852a3bd8904e14a1d92af716814b32 3 | timeCreated: 1605279261 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/DefaultExecutionOrderScript.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public class DefaultExecutionOrderScript : MonoBehaviour 6 | { 7 | public void Construct() 8 | { 9 | if (Awaken) 10 | AwakenWhenConstructed = true; 11 | } 12 | 13 | public bool AwakenWhenConstructed { get; private set; } 14 | public bool Awaken { get; private set; } 15 | 16 | private void Awake() 17 | { 18 | Awaken = true; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/DefaultExecutionOrderScript.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0bebfee2f854844b66fd99157285322 3 | timeCreated: 1605278701 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/Ignored.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Containers; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public class Ignored : IIgnoreByContainer { } 6 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/Ignored.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb771242de6c4289b5eec490d373f5d2 3 | timeCreated: 1605279124 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/InterfaceDependencyComponent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public interface IInterface { } 6 | 7 | public class InterfaceImplementation : MonoBehaviour, IInterface { } 8 | 9 | public class InterfaceDependencyComponent : MonoBehaviour 10 | { 11 | public IInterface Dependency { get; private set; } 12 | 13 | public void Construct(IInterface dependency) => Dependency = dependency; 14 | } 15 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/InterfaceDependencyComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4099f7d721640ce8412738ededc8422 3 | timeCreated: 1605299493 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/LoopComponent1.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public class LoopComponent1 : MonoBehaviour 6 | { 7 | public LoopComponent2 Component { get; private set; } 8 | 9 | public void Construct(LoopComponent2 component) 10 | { 11 | Component = component; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/LoopComponent1.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13b2bcec2b9a49b8968f47029e9dea26 3 | timeCreated: 1605279049 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/LoopComponent2.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public class LoopComponent2 : MonoBehaviour 6 | { 7 | public LoopComponent1 Component { get; private set; } 8 | 9 | public void Construct(LoopComponent1 component) 10 | { 11 | Component = component; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/LoopComponent2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 026b73a4965a45fbaf2267c96fc652e8 3 | timeCreated: 1605279057 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/Parent.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Tests.Runtime.Components 2 | { 3 | public class Parent { } 4 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/Parent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b18652b12d54ef1baaf7d8380c8e457 3 | timeCreated: 1605279128 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/ParentDependencyComponent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public class ParentDependencyComponent : MonoBehaviour 6 | { 7 | public Parent Parent { get; private set; } 8 | 9 | public void Construct(Parent parent) 10 | { 11 | Parent = parent; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/ParentDependencyComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6ff0660704541949935f7830908e883 3 | timeCreated: 1605279135 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/ResolutionCounter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public sealed class ResolutionCounter : MonoBehaviour 6 | { 7 | public int Count { get; private set; } 8 | 9 | public void Construct() => Count++; 10 | } 11 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/ResolutionCounter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9dc3dd102eef48388ec1253e7f9d1e63 3 | timeCreated: 1605278422 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/RigidbodyComponent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public class RigidbodyComponent : MonoBehaviour 6 | { 7 | public Rigidbody Rigidbody { get; private set; } 8 | 9 | public void Construct(Rigidbody rigidbody) 10 | { 11 | Rigidbody = rigidbody; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/RigidbodyComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6da75a0502734d8997a38395719046f1 3 | timeCreated: 1604244145 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/StringDependencyComponent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Components 4 | { 5 | public class StringDependencyComponent : MonoBehaviour 6 | { 7 | public string String; 8 | 9 | public void Construct(string @string) 10 | { 11 | String = @string; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Components/StringDependencyComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52ac1a95010d48159ded1ddda60939b1 3 | timeCreated: 1605279120 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/ContainerBuilderExtensionsTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1dfb366ccede4ec8a8f61a0730ec9c1d 3 | timeCreated: 1636655570 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/ContainerLifecycleTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f64ce98afcc4cec9c3dc34125113553 3 | timeCreated: 1636660305 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Containers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e86cf94f0c204750a6863405ca2bd3ca 3 | timeCreated: 1605279109 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Containers/CtorInjectionContainer.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Containers; 2 | using UnityEngine; 3 | 4 | namespace DELTation.DIFramework.Tests.Runtime.Containers 5 | { 6 | public class CtorInjectionContainer : DependencyContainerBase 7 | { 8 | protected override void ComposeDependencies(ICanRegisterContainerBuilder builder) 9 | { 10 | builder 11 | .Register() 12 | .Register() 13 | .Register("abc"); 14 | } 15 | 16 | public class IndirectStringDependent 17 | { 18 | public IndirectStringDependent(StringDependent dependent) => Dependent = dependent; 19 | public StringDependent Dependent { get; } 20 | } 21 | 22 | public class StringDependent 23 | { 24 | public StringDependent(string s) => S = s; 25 | public string S { get; } 26 | } 27 | 28 | public class StringDependentComponent : MonoBehaviour 29 | { 30 | public void Construct(IndirectStringDependent dependent) 31 | { 32 | Dependent = dependent; 33 | } 34 | 35 | public IndirectStringDependent Dependent { get; private set; } 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Containers/CtorInjectionContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f025a025e57f43c68084b0149b55b810 3 | timeCreated: 1605303293 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Containers/CustomContainer.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Containers; 2 | using DELTation.DIFramework.Tests.Runtime.Components; 3 | 4 | namespace DELTation.DIFramework.Tests.Runtime.Containers 5 | { 6 | public class CustomContainer : DependencyContainerBase 7 | { 8 | public const string String = "Some String"; 9 | 10 | protected override void ComposeDependencies(ICanRegisterContainerBuilder builder) 11 | { 12 | builder.Register(String) 13 | .Register() 14 | .Register(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Containers/CustomContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0eb53af47084a3cb92b80452d489141 3 | timeCreated: 1605123532 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/CustomDependencyContainerTests.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Tests.Runtime.Components; 2 | using DELTation.DIFramework.Tests.Runtime.Containers; 3 | using NUnit.Framework; 4 | 5 | namespace DELTation.DIFramework.Tests.Runtime 6 | { 7 | [TestFixture] 8 | public sealed class CustomDependencyContainerTests : TestFixtureBase 9 | { 10 | [Test] 11 | public void CreateObject_WithDependency_Resolved() 12 | { 13 | CreateContainerWith(); 14 | 15 | var component = NewGameObject().AddComponent(); 16 | component.gameObject.AddComponent(); 17 | 18 | Assert.That(component.String, Is.EquivalentTo(CustomContainer.String)); 19 | } 20 | 21 | [Test] 22 | public void CreateObject_WithParentDependency_ResolvedViaChild() 23 | { 24 | CreateContainerWith(); 25 | 26 | var component = NewGameObject().AddComponent(); 27 | component.gameObject.AddComponent(); 28 | 29 | Assert.That(component.Parent, Is.InstanceOf()); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/CustomDependencyContainerTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68d4d78f6c0a4b7c81aea25a1f2120dd 3 | timeCreated: 1605123638 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/DIFramework.Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DIFramework.PlayTests", 3 | "references": [ 4 | "GUID:1b60fcce313931d4f9eefc7f1c079778", 5 | "GUID:27619889b8ba8c24980f49ee34dbb44a", 6 | "GUID:91836b14885b8a34196f4aa8303d7793", 7 | "GUID:7661adf0dcc98034093743fe3a566d1a" 8 | ], 9 | "includePlatforms": [], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": true, 13 | "precompiledReferences": [ 14 | "nunit.framework.dll" 15 | ], 16 | "autoReferenced": true, 17 | "defineConstraints": [ 18 | "UNITY_INCLUDE_TESTS" 19 | ], 20 | "versionDefines": [], 21 | "noEngineReferences": false 22 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/DIFramework.Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc705190aca68cb4992e33baf549eb5e 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/DependencyResolutionTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b9c47b84a1d4b2083c05ee73a8687f7 3 | timeCreated: 1604243992 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/DependencyTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 188b721caefa431196320fb61e281f90 3 | timeCreated: 1644517365 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/DependencyUtilsTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b37835f65c14e68829b85f6b4f10b89 3 | timeCreated: 1645302882 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/DiTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14c8dcfdeafa411bb0fe1e2e30e324ab 3 | timeCreated: 1618952013 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/FactoryMethodDelegateTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a6d9d5c4d0f42a3922e6bfb6ff5d1c9 3 | timeCreated: 1644519484 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/FallbackDependencyContainerTests.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Containers; 2 | using DELTation.DIFramework.Tests.Runtime.Components; 3 | using NUnit.Framework; 4 | using UnityEngine; 5 | 6 | namespace DELTation.DIFramework.Tests.Runtime 7 | 8 | { 9 | [TestFixture] 10 | public class FallbackDependencyContainerTests : TestFixtureBase 11 | { 12 | [Test] 13 | public void CreateObject_WithDependency_Resolved() 14 | { 15 | var body = NewGameObject("Rigidbody").AddComponent(); 16 | CreateContainerWith(); 17 | 18 | var go = NewGameObject(); 19 | var dependency = go.AddComponent(); 20 | go.AddComponent(); 21 | 22 | Assert.That(dependency.Rigidbody, Is.EqualTo(body)); 23 | } 24 | 25 | [Test] 26 | public void CreateObject_WithIgnoredDependency_NotResolved() 27 | { 28 | NewGameObject() 29 | .gameObject.AddComponent() 30 | .gameObject.AddComponent(); 31 | var container = CreateContainerWith(); 32 | 33 | var resolved = container.TryResolve(out Rigidbody _); 34 | 35 | Assert.That(resolved, Is.False); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/FallbackDependencyContainerTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35c7c27ba675460e98f7268a531e6db9 3 | timeCreated: 1605122078 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/InjectionTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa33438fac714270b9726ed6f4589d42 3 | timeCreated: 1644744445 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/InternalDependencyTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8941c961cf7b4692946c22712e86da0d 3 | timeCreated: 1644608289 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/ListDependencyContainerTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38e630ba0fa3404b83df6fcbab8453a5 3 | timeCreated: 1605122004 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/MultipleRootContainersTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53804a9a416c48e29944956316190c8f 3 | timeCreated: 1612550347 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/PocoInjectionTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DELTation.DIFramework.Resolution; 3 | using NUnit.Framework; 4 | using UnityEngine; 5 | 6 | namespace DELTation.DIFramework.Tests.Runtime 7 | { 8 | public class PocoInjectionTests 9 | { 10 | [Test, TestCase(typeof(string), true), TestCase(typeof(MonoBehaviour), false)] 11 | public void GivenIsPoco_WhenDerivesFromUnityObject_ThenIsPocoIsTrue(Type type, bool expectIsPoco) 12 | { 13 | // Arrange 14 | 15 | // Act 16 | var isPoco = PocoInjection.IsPoco(type); 17 | 18 | // Assert 19 | Assert.That(isPoco, Is.EqualTo(expectIsPoco)); 20 | } 21 | 22 | [Test, TestCase(typeof(InjectablePoco), true), TestCase(typeof(NotInjectablePoco), false)] 23 | public void GivenIsInjectable_WhenHasInjectableConstructorParameters_ThenIsInjectableIsTrue(Type type, 24 | bool expectIsInjectable) 25 | { 26 | // Arrange 27 | 28 | // Act 29 | var isInjectable = PocoInjection.IsInjectable(type); 30 | 31 | // Assert 32 | Assert.That(isInjectable, Is.EqualTo(expectIsInjectable)); 33 | } 34 | 35 | private class InjectablePoco 36 | { 37 | public InjectablePoco(string str) { } 38 | } 39 | 40 | private class NotInjectablePoco 41 | { 42 | public NotInjectablePoco(int i) { } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/PocoInjectionTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e14a6b8df94a47f78d82dff95ae06723 3 | timeCreated: 1645302593 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/PocoResolutionTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b1322525d064c84b1072966c525a8c4 3 | timeCreated: 1619038585 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70f7be93d25f4068abdd9b1375c4d5c2 3 | timeCreated: 1619038720 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos/AbstractClass.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Tests.Runtime.Pocos 2 | { 3 | public abstract class AbstractClass { } 4 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos/AbstractClass.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be84dd11abb146fd802e60e25cd0ba79 3 | timeCreated: 1619290201 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos/Interfaces.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Tests.Runtime.Pocos 2 | { 3 | public class InterfaceImpl : IInterface { } 4 | 5 | public interface IInterface { } 6 | 7 | public class InterfaceDependant 8 | { 9 | public readonly IInterface Interface; 10 | 11 | public InterfaceDependant(IInterface @interface) => Interface = @interface; 12 | } 13 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos/Interfaces.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ac9f21ef3164b498937b9934659ade9 3 | timeCreated: 1619122120 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos/Poco.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Tests.Runtime.Pocos 2 | { 3 | public class Poco 4 | { 5 | public readonly PocoDep1 Dep1; 6 | public readonly PocoDep2 Dep2; 7 | public readonly PocoDep3 Dep3; 8 | 9 | public Poco(PocoDep1 dep1, PocoDep2 dep2, PocoDep3 dep3) 10 | { 11 | Dep1 = dep1; 12 | Dep2 = dep2; 13 | Dep3 = dep3; 14 | } 15 | } 16 | 17 | public class PocoDep2 { } 18 | 19 | public class PocoDep1 20 | { 21 | public readonly PocoDep2 Dep; 22 | 23 | public PocoDep1(PocoDep2 dep) => Dep = dep; 24 | } 25 | 26 | public class PocoDep3 27 | { 28 | public readonly PocoDep4 Dep; 29 | 30 | public PocoDep3(PocoDep4 dep) => Dep = dep; 31 | } 32 | 33 | public class PocoDep4 { } 34 | 35 | public class PocoLoop1 36 | { 37 | public readonly PocoLoop2 Dep; 38 | 39 | public PocoLoop1(PocoLoop2 dep) => Dep = dep; 40 | } 41 | 42 | public class PocoLoop2 43 | { 44 | public readonly PocoLoop1 Dep; 45 | 46 | public PocoLoop2(PocoLoop1 dep) => Dep = dep; 47 | } 48 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos/Poco.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb3252d5033144078f08ed16edd465a8 3 | timeCreated: 1619038726 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos/SingleInstanceContainer.cs: -------------------------------------------------------------------------------- 1 | using DELTation.DIFramework.Containers; 2 | 3 | namespace DELTation.DIFramework.Tests.Runtime.Pocos 4 | { 5 | public class SingleInstanceContainer : DependencyContainerBase where T : class 6 | { 7 | protected override void ComposeDependencies(ICanRegisterContainerBuilder builder) 8 | { 9 | builder.Register(); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos/SingleInstanceContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f985878e2337479b891f699cad5d04fc 3 | timeCreated: 1619290295 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos/SingleInstanceContainer_PocoDep2.cs: -------------------------------------------------------------------------------- 1 | namespace DELTation.DIFramework.Tests.Runtime.Pocos 2 | { 3 | public class SingleInstanceContainer_PocoDep2 : SingleInstanceContainer { } 4 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/Pocos/SingleInstanceContainer_PocoDep2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 809c76ddfb4b46ed808077f08bbeecbb 3 | timeCreated: 1619290490 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/ResolverTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76d7ee15dd62431888754be9f775c8cb 3 | timeCreated: 1605278286 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/TestFixtureBase.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using JetBrains.Annotations; 3 | using NUnit.Framework; 4 | using UnityEngine; 5 | 6 | namespace DELTation.DIFramework.Tests.Runtime 7 | { 8 | public class TestFixtureBase 9 | { 10 | private readonly List _gameObjects = new List(); 11 | 12 | [TearDown] 13 | public void TearDown() 14 | { 15 | foreach (var gameObject in _gameObjects) 16 | { 17 | Object.DestroyImmediate(gameObject); 18 | } 19 | 20 | _gameObjects.Clear(); 21 | } 22 | 23 | protected GameObject NewGameObject([CanBeNull] string name = null) 24 | { 25 | var go = new GameObject(); 26 | 27 | if (name != null) 28 | go.name = name; 29 | 30 | _gameObjects.Add(go); 31 | return go; 32 | } 33 | 34 | protected GameObject NewInactiveGameObject() 35 | { 36 | var go = NewGameObject(); 37 | go.SetActive(false); 38 | return go; 39 | } 40 | 41 | protected T CreateContainerWith() where T : Component 42 | { 43 | var root = NewGameObject().AddComponent(); 44 | var component = NewGameObject().AddComponent(); 45 | component.transform.parent = root.transform; 46 | return component; 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/TestFixtureBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81a8b8d6c5854bdc9dd1eec0c4257d09 3 | timeCreated: 1605121831 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/TopologicalSortTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d19184a826645b6bd488356637c066b 3 | timeCreated: 1644518146 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/link.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/DELTation/DIFramework/Tests/Runtime/link.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 446448f487d04f10b2adee200fbb680f 3 | timeCreated: 1608763876 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/link.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/Assets/link.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d8537e7bb5e4ba392d46e95577fb5a4 3 | timeCreated: 1608764243 -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Vladislav Kantaev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0bb2a2cbad4f8342b40557caf31e6a5 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/README.md: -------------------------------------------------------------------------------- 1 | # DI Framework 2 | 3 | [Documentation reference.](https://github.com/Delt06/di-framework) -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b756314ff6813c5428a980f2372b870e 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.deltation.di-framework", 3 | "version": "2.7.3", 4 | "displayName": "DI Framework", 5 | "description": "A simple Unity DI/IoC framework to inject dependencies into your components.", 6 | "unity": "2020.3", 7 | 8 | "keywords": [ 9 | "DI", 10 | "IoC" 11 | ], 12 | 13 | "author": { 14 | "name": "Vladislav Kantaev", 15 | "email": "vvkantaev@yandex.ru", 16 | "url": "https://delt06.github.io/page/" 17 | } 18 | } -------------------------------------------------------------------------------- /Packages/com.deltation.di-framework/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9aad84c34fe7f344bb277091be151b81 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Demo/Scenes/SampleScene.unity 10 | guid: 9fc0d4010bbf28b4594072e72b8655ab 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 1 27 | m_EnterPlayModeOptions: 1 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.3.16f1 2 | m_EditorVersionWithRevision: 2020.3.16f1 (049d6eca3c44) 3 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Screenshots/Benchmark/baked_di.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Screenshots/Benchmark/baked_di.png -------------------------------------------------------------------------------- /Screenshots/Benchmark/bar-graph_gc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Screenshots/Benchmark/bar-graph_gc.png -------------------------------------------------------------------------------- /Screenshots/Benchmark/bar-graph_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Screenshots/Benchmark/bar-graph_time.png -------------------------------------------------------------------------------- /Screenshots/Benchmark/di.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Screenshots/Benchmark/di.png -------------------------------------------------------------------------------- /Screenshots/Benchmark/no_di.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Screenshots/Benchmark/no_di.png -------------------------------------------------------------------------------- /Screenshots/resolver_example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Screenshots/resolver_example.jpg -------------------------------------------------------------------------------- /Screenshots/resolver_inspector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Delt06/di-framework/fca71b895c71fa4f414127c780b987e045fc1d86/Screenshots/resolver_inspector.jpg -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | # basic 6 | target: auto 7 | threshold: 0.5% 8 | base: auto 9 | if_ci_failed: error #success, failure, error, ignore 10 | informational: false 11 | only_pulls: false 12 | patch: false 13 | 14 | range: 70..90 15 | round: down # up, down, or nearest 16 | precision: 2 # Number of decimal places, between 0 and 5 17 | 18 | comment: 19 | layout: diff, files # accepted in any order: reach, diff, flags, and/or files -------------------------------------------------------------------------------- /di-framework.sln.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True 5 | True 6 | True 7 | True --------------------------------------------------------------------------------