Commit graph

153 commits

Author SHA1 Message Date
Mike Bierlee 9b05aa3af9 Reformat code to use otbs brace style
It's more compact and more common in the coding world these days.
2023-03-07 01:24:28 +03:00
Mike Bierlee b8caa00be1 Autoformat code 2023-03-07 00:46:07 +03:00
Mike Bierlee dfac28102e Fix deprecation warnings when resolving post-constructors and pre-destructors (fix #43) 2023-03-07 00:45:44 +03:00
Mike Bierlee d4ce13f8b1 Rename modules to match convention 2023-03-06 23:21:08 +03:00
Mike Bierlee fd9d63a6ec Update copyrights 2023-01-11 02:01:51 +03:00
Mike Bierlee c5e458f75a Update copyrights 2022-02-18 00:45:03 +03:00
Mike Bierlee 4faf7f2e47 Fix chained registration scopes getting rid of initializedBy's factory method 2021-08-24 23:17:26 +03:00
Mike Bierlee 70b4c9e9dd Remove helpful compilation warning in favor of supporting more edge-cases out of the box 2021-07-03 18:38:21 +03:00
Mike Bierlee 0127c0a80c Add unittest for fix in #37 2021-06-15 23:34:50 +03:00
Mike Bierlee dcaa4d77be Autoformat code according to The D Style 2021-05-01 22:16:44 +03:00
Mike Bierlee eaac0eb7ce Add initializedOnceBy() to create singleton instances via injection initializer 2021-04-29 01:45:08 +03:00
Mike Bierlee 8f4a64cf4c Move injection initializer to registration scope 2021-04-29 01:45:08 +03:00
Mike Bierlee 3f6636109e Update copyrights 2021-01-04 02:04:20 +03:00
Mike Bierlee 81de14a1ee Update copyrights 2020-03-11 23:38:54 +03:00
Mike Bierlee 343dd65fdf Update copyrights 2019-07-14 12:40:16 +03:00
Mike Bierlee dc48c87948 Prevent registration, resolving and constructor injection selection of structs
Fixes #25
2018-06-11 18:45:27 +03:00
Mike Bierlee a5079dc8a6 Remove unnecessary import 2018-04-15 11:28:13 +03:00
Carlin St Pierre d52d2d963e Support types that have recursive template arguments with createImportsString 2018-04-14 14:00:30 +10:00
Mike Bierlee 4410206ec4 Update copyrigths
And convert tabs to spaces
2018-01-01 15:56:47 +01:00
Mike Bierlee 4c25b91c63 Import modules of argument types of registration type's template before calling post-constructor 2017-08-13 17:49:40 +02:00
Mike Bierlee e90306ef57 Update copyrights 2017-02-13 20:20:35 +01:00
Mike Bierlee 10d24eb9fb Remove workaround 2016-12-26 18:17:51 +01:00
Mike Bierlee 898dfd8943 Remove deprecated getInstance() 2016-12-26 18:17:51 +01:00
Mike Bierlee a7b4549799 Add test verifying for pre-destruction on container destruction 2016-12-18 03:56:10 +01:00
Mike Bierlee 6a1fa7e2c1 Move test classes to separate module 2016-12-17 23:33:29 +01:00
Mike Bierlee b6dea95c0d Add pre-destruction 2016-12-17 23:09:56 +01:00
Mike Bierlee fbef764b48 Add post construction 2016-12-17 21:14:16 +01:00
Mike Bierlee 7ba8e545f6 Move context registration related method out of container
Should be still usable as before because of UFCS
2016-12-14 22:04:13 +01:00
Mike Bierlee cc314324a7 Use empty main instead of relying on main generation by compilers
GDC doesn't seem to do this
2016-12-13 22:28:12 +01:00
Mike Bierlee 2f5ffd5da5 Add test for value injection within injectors and their dependencies 2016-12-12 22:51:26 +01:00
Mike Bierlee 7c718ec159 Add tests verifying that dependency injection is performed for value injectors 2016-12-12 22:51:26 +01:00
Mike Bierlee 86fb525066 Add mandatory injection of values 2016-12-11 01:31:09 +01:00
Mike Bierlee 52dcecef9a Add optional value injection when values cannot be injected by injectors 2016-12-11 01:15:30 +01:00
Mike Bierlee 9eb3a89695 Make it clear when a value injector is missing 2016-12-11 00:53:21 +01:00
Mike Bierlee 4954979574 Move value injection test to its own test file 2016-12-10 22:46:32 +01:00
Mike Bierlee d3ed3e91b9 Add value injector 2016-12-09 02:15:59 +01:00
Mike Bierlee e1f0cca5c5 Fix injection of dependencies from foreign modules
Fixes issue #12
2016-09-05 19:37:53 +02:00
Mike Bierlee 9cc320aa93 Add test of prevention of transitive dependencies 2016-09-03 18:40:01 +02:00
Mike Bierlee 95e30477c6 Prevent creation of circular dependencies in constructors 2016-09-03 16:57:38 +02:00
Mike Bierlee c0553967c9 Add extra testcase 2016-08-23 21:20:54 +02:00
Mike Bierlee ab765e0092 Add constructor injection 2016-08-23 00:11:29 +02:00
Mike Bierlee 81c6faed16 Pass factory through constructor to prevent nullpointer exceptions 2016-08-17 23:01:22 +02:00
Mike Bierlee 6b3b23a376 Move factory parameters to parameter object 2016-08-17 22:28:47 +02:00
Mike Bierlee 44e77aff9c Move factory stuff to own module 2016-08-17 20:44:36 +02:00
Mike Bierlee b6ccc9d4a9 Pull keeping track of originating containmer up to Registration class 2016-08-08 23:06:05 +02:00
Mike Bierlee 9e5a27d046 Deprecate singleton factory method
The factory method encourages misuse of dependency injection (by using it as a service locator). Removing the factory method forces the user to make this choice deliberately.
2016-08-08 22:17:17 +02:00
Mike Bierlee 02dbe20c64 Remove deprecated muck 2016-08-08 21:32:27 +02:00
Mike Bierlee 771c49d86a Deprecate array-based assignment of persistent resolve/registration options 2016-06-27 20:55:07 +02:00
Mike Bierlee f67e67b93c Fix test to properly test the variadic variant 2016-06-27 20:43:12 +02:00
Mike Bierlee e800a9029e Test deprecated options-by-array overload 2016-06-27 20:40:08 +02:00