-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Labels
Enhancement 🔨Improvement of existing featuresImprovement of existing features
Description
Every policy in Unity operates on instances of solid type NamedTypeBuildKey
. This requires allocating new instances every time type or name is used.
Using solid type does not allow optimizations where caller might already have all required information and could be simply cast into required type/name combo. To resolve this issue NamedTypeBuildKey
should be changed to interface INamedType
. Instead of
NamedTypeBuildKey SomePolicy(NamedTypeBuildKey buildKey, IBuilderContext context);
it should became
INamedType SomePolicy(INamedType buildKey, IBuilderContext context);
IBuilderContext should also use INamedType
instead of NamedTypeBuildKey
public interface IBuilderContext
{
...
INamedType OriginalBuildKey { get; }
INamedType BuildKey { get; set; }
...
Metadata
Metadata
Assignees
Labels
Enhancement 🔨Improvement of existing featuresImprovement of existing features