container icon indicating copy to clipboard operation
container copied to clipboard

Namespace consolidation

Open ENikS opened this issue 5 years ago • 0 comments

Namespaces

Microsoft.Practices.Unity

Unity project started it's life at Microsoft.Practices.Unity namespace. In 2015, when the project was released into open source domain the namespace has been changed to be just Unity.

Unity

In later years, the project expanded to include several new namespaces. Reshrper played a big role while it was offered for free to the projects. A new namespaces were created to incapsulate Injection, Resolution, Builder, Extension, and etc.

using Unity.Builder;
using Unity.Extension;
using Unity.Strategies;

Consolidation

Although Visual Studio offers significant help in managing namespaces, reduction of implemented namespaces may benefit the project overall. The following namespaces are considered:

Unity.Extension

This namespace will encapsulate any and all types related to extending Unity Container. The following namespaces will be rolled into Unity.Extension:

// v4
using Microsoft.Practices.Unity.ObjectBuilder;
using Microsoft.Practices.ObjectBuilder2;

// v5
using Unity.Policy;
using Unity.Builder;
using Unity.Strategies;

ENikS avatar Dec 16 '20 23:12 ENikS