Commit graph

212 commits

Author SHA1 Message Date
Mike Bierlee f7578d79a3 Fix unnecessary re-registration of types when registerBeforeResolving is specified 2022-10-27 01:42:09 +03:00
Mike Bierlee e1cb511178 Autoformat container.d 2022-10-27 01:37:36 +03:00
Mike Bierlee c5e458f75a Update copyrights 2022-02-18 00:45:03 +03:00
Mike Bierlee bf77c95a0d Prevent import of template arguments that are not types 2022-02-18 00:43:39 +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
nucz 00dd758e01 fix "multiple ! arguments are not allowed" on ...
...constructor argument injection
2021-06-15 23:25:39 +03:00
heromyth 3a5d5bf214 Interface is allowed by initializedBy. 2021-05-04 21:57:20 +03:00
Mike Bierlee dcaa4d77be Autoformat code according to The D Style 2021-05-01 22:16:44 +03:00
Mike Bierlee 2b40ab95cf Don't import polyfill and altphobos packages publicly
They might break user code
2021-05-01 22:01:14 +03:00
Mike Bierlee 5e9774b96a Change imports to only include used symbols 2021-05-01 21:41:54 +03:00
Mike Bierlee 6ab7795463 Compensate for broken isFunction in Phobos by rolling own implementation (Fixes #32) 2021-05-01 21:41:10 +03:00
Mike Bierlee edfa5cdffb Fail compilation with helpful message when trying to register class by supertype it does not inherit from 2021-04-29 22:24:27 +03:00
Mike Bierlee de5fe524a0 Fix always polyfilling isFunction 2021-04-29 01:45:08 +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 89512e0cb0 Move initializer to its own example 2021-04-29 01:45:08 +03:00
Mike Bierlee bb4eaf8676 Clean-up initializer 2021-04-29 01:45:08 +03:00
Mike Bierlee ef00ec4f6f Merge remote-tracking branch 'origin/master' into develop 2021-01-04 02:11:17 +03:00
Mike Bierlee 3f6636109e Update copyrights 2021-01-04 02:04:20 +03:00
heromyth cad0200904 ConcreteType should be a class 2020-03-29 21:34:02 +03:00
Mike Bierlee 7a26dd12e0
Merge pull request #28 from huntlabs/develop
Instance initialization improved
2020-03-18 21:25:02 +03:00
Mike Bierlee 81de14a1ee Update copyrights 2020-03-11 23:38:54 +03:00
heromyth 0c8c1434f7 Check if a Type is registered 2020-03-11 09:55:15 +08:00
heromyth 3b11c4aec4 Add a constuction handler 2020-02-26 16:14:12 +08:00
heromyth 55726e84db All the unittests passed 2020-02-11 10:19:08 +08:00
heromyth 15d8c7e754 Restore callPostConstructors 2020-02-10 15:34:00 +08:00
heromyth b9d4bd1b83 Register with an initializer. 2020-02-09 23:46:06 +08:00
heromyth 4ebeeb9c9f isFunction may not work 2020-02-09 23:43:11 +08: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
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 93d4d3c20f Recursively import types everywhere
#20
2017-08-13 18:21:03 +02:00
Mike Bierlee 91fcefa7ed Recursively import template type's modules
In case when the template type itself is a template type. Fixes #20
2017-08-13 18:13:19 +02: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 cc0ea0d9e4 Add backwards compatiblity for isFunction 2016-12-26 18:31:39 +01:00
Mike Bierlee 925c3f4119 Fix check on whether a member was a function
Checks on some kinds of members, such as constants, would trip up with the isCallable trait.
2016-12-26 18:17:51 +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 4ac095c25b Revert minimal D compatibility to 2.068.2
Now that GDC has been officially upgraded to 2.068.2 we can drop baseline support to that version.
2016-12-26 18:17:51 +01:00
Mike Bierlee 0d5180c98f Also fix memory corruption for GDC 2016-12-18 01:21:56 +01:00
Mike Bierlee 708ec67070 Prevent memory corruption in DMD 2.066.1
As a consequence registations will NOT be cleared during deconstruction of the container in that version
2016-12-18 01:16:00 +01:00
Mike Bierlee 3d9a449766 Fix aliases tripping up UDA discovery 2016-12-17 23:58:37 +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 68c8d6b6a6 Fix documentation 2016-12-14 21:12:52 +01:00
Mike Bierlee 8fe5b8da9b Adjust package documentation according extended use of derived work 2016-12-13 23:23:05 +01:00