Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Provides functionality to have multiple inherited containers.
Instead of having one
Container ParentfieldContainerclass now haveList<Container> Parents. The major part of changes are inContainerBuilderwhich have nowAddParent(Container),RemoveParent(Container),RemoveAllParents()methods instead of oneSetParent(Container). ResultingContainerincludes all unique resolvers from all of its parents, for doing thatContainerBuilderusesHashSetto distinguish resolvers, which is extra hash calculation per resolver.This changes not only breaking because of
ContainerBuilderAPI but as this repo author @gustavopsantos mentioned in our discussion are also can produce complex and error prone container compositions. For defending of that I can say that this functionality doesn't force users to use multiple inheritance and also doesn't change very basic usage of Reflex, but for those who wants to have complex setups there is corresponding functionality which requires more control and attention.I guess there is a lot to discuss and change if this idea is even acceptable, so I have not changed documentations.
Type of change
How Has This Been Tested?
In code bellow in
ReflexSampleProjectInstallerI've changed code so it detach all scenes from project scope and also create two parent containers and one child container from scratch.There are also few tests added in
ScopedContainerTests.cs.Checklist: