diff --git a/.gitignore b/.gitignore index 55fef6c..5dae65f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /node_modules /package-lock.json /yarn.lock +/_site diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index fff1af1..0000000 --- a/.gitmodules +++ /dev/null @@ -1,10 +0,0 @@ -[submodule "src/Abstractions"] - path = src/Abstractions - url = https://github.com/unitycontainer/abstractions.git -[submodule "src/Container"] - path = src/Container - url = https://github.com/unitycontainer/container.git - branch = v5.x -[submodule "src/SpecificationTests"] - path = src/SpecificationTests - url = https://github.com/unitycontainer/specification-tests.git diff --git a/appveyor.yml b/_appveyor.yml similarity index 100% rename from appveyor.yml rename to _appveyor.yml diff --git a/articles/installation.md b/articles/installation.md index dfa0d80..37aac29 100644 --- a/articles/installation.md +++ b/articles/installation.md @@ -8,11 +8,11 @@ Unity is designed to support a range of common scenarios for resolving instances ## To prepare your application -Before you can add Unity to your solution you need to decide if you want to reference packages individually ([Abstractions](https://www.nuget.org/packages/Unity.Abstractions/), [Container](https://www.nuget.org/packages/Unity.Container/)) or use composite [Unity]([Unity](https://www.nuget.org/packages/Unity/)) package. +Before you can add Unity to your solution you need to decide if you want to reference packages individually ([Abstractions](https://www.nuget.org/packages/Unity.Abstractions/), [Container](https://www.nuget.org/packages/Unity.Container/)) or use composite [Unity](https://www.nuget.org/packages/Unity) package. ### Referencing composite package - Referencing single [Unity]([Unity](https://www.nuget.org/packages/Unity/)) package is more appropriate in case of small(ish) project, when everything is contained within one solution. Upgrading such solution is trivial with the help of NuGet Manager. + Referencing single [Unity](https://www.nuget.org/packages/Unity/) package is more appropriate in case of small(ish) project, when everything is contained within one solution. Upgrading such solution is trivial with the help of NuGet Manager. ### Referencing individual packages diff --git a/docfx.json b/docfx.json index 5b14786..5b0bd67 100644 --- a/docfx.json +++ b/docfx.json @@ -3,9 +3,19 @@ { "src": [ { - "files": [ - "src/Abstractions/src/Unity.Abstractions.csproj" - ] + "files": ["*.csproj"], + "exclude": [ "**/bin/**", "**/obj/**" ], + "src": "../Abstractions/src" + }, + { + "files": ["*.csproj"], + "exclude": [ "**/bin/**", "**/obj/**" ], + "src": "../Container/src" + }, + { + "files": ["*.csproj"], + "exclude": [ "**/bin/**", "**/obj/**", "**/Microsoft.Practices/**" ], + "src": "../Configuration/src" } ], "dest": "api", diff --git a/specs/specification.md b/specs/specification.md index ea2ec30..aa2d8b8 100644 --- a/specs/specification.md +++ b/specs/specification.md @@ -7,7 +7,7 @@ title: Unity Container Specification ## 1 Introduction -Unity is a full featured, general-purpose container for use in any type of Microsoft® .NET Framework-based application. It provides all of the features commonly found in dependency injection implementations. +Unity is a full featured, general-purpose container for use in any type of Microsoft® .NET Framework-based application. It provides all of the features commonly found in dependency injection implementations. In addition, Unity is extensible. You can write container extensions that change the behavior of the container, or add new capabilities. For example, the interception feature provided by Unity, which you can use to add policies to objects, is implemented as a container extension. @@ -30,7 +30,3 @@ In addition, Unity is extensible. You can write container extensions that change [!include [Workflow](workflow.md)] -[!code-csharp [Overrides](../src/Abstractions/src/Dependency/Injection/Abstracts/InjectionMember.cs#Overrides)] - - -[!code-csharp [Implementation](../src/Abstractions/src/Dependency/Injection/Abstracts/InjectionMember.cs#Implementation)] diff --git a/src/Abstractions b/src/Abstractions deleted file mode 160000 index fffc59a..0000000 --- a/src/Abstractions +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fffc59a7cc62ecb60ec7121f247fd6840ba0be88 diff --git a/src/Container b/src/Container deleted file mode 160000 index 3ef2b1d..0000000 --- a/src/Container +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3ef2b1d75506138329119e81b0a08814fe0165b2 diff --git a/src/Documentation.sln b/src/Documentation.sln deleted file mode 100644 index 2b87c72..0000000 --- a/src/Documentation.sln +++ /dev/null @@ -1,91 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28407.52 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Unity.Container", "Container\src\Unity.Container.csproj", "{EE1F752C-1FAB-41AD-AD63-857D0E62AB6B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Unity.Specification.Tests", "Container\tests\Unity.Specification\Unity.Specification.Tests.csproj", "{EE6E1971-4752-4444-9211-70BDE3CC4014}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Unity.Abstractions", "Abstractions\src\Unity.Abstractions.csproj", "{2A50E743-8817-41DB-BD23-6F9625665EF7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Unity.Specification", "SpecificationTests\src\Unity.Specification.csproj", "{DBEC49D6-88ED-4717-A827-23BADE3DC5E1}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Unity.Specification.Diagnostic", "SpecificationTests\diagnostic\Unity.Specification.Diagnostic.csproj", "{510FC085-87EF-4EB8-85EB-6C1E0F629313}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Unity.Specification.Tests.Diagnostic", "Container\tests\Unity.Diagnostic\Unity.Specification.Tests.Diagnostic.csproj", "{5F84ACD0-148C-4DE0-ADCA-073B5C66BAD1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Specification", "Specification", "{F8CC6AB5-0A31-4DD5-9926-72CCC64E34F7}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{BF3AB5C4-79AF-4A82-8D53-B4DA476D363F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EE1F752C-1FAB-41AD-AD63-857D0E62AB6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE1F752C-1FAB-41AD-AD63-857D0E62AB6B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE1F752C-1FAB-41AD-AD63-857D0E62AB6B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE1F752C-1FAB-41AD-AD63-857D0E62AB6B}.Release|Any CPU.Build.0 = Release|Any CPU - {EE6E1971-4752-4444-9211-70BDE3CC4014}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE6E1971-4752-4444-9211-70BDE3CC4014}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE6E1971-4752-4444-9211-70BDE3CC4014}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2A50E743-8817-41DB-BD23-6F9625665EF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2A50E743-8817-41DB-BD23-6F9625665EF7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2A50E743-8817-41DB-BD23-6F9625665EF7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2A50E743-8817-41DB-BD23-6F9625665EF7}.Release|Any CPU.Build.0 = Release|Any CPU - {DBEC49D6-88ED-4717-A827-23BADE3DC5E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DBEC49D6-88ED-4717-A827-23BADE3DC5E1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DBEC49D6-88ED-4717-A827-23BADE3DC5E1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {510FC085-87EF-4EB8-85EB-6C1E0F629313}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {510FC085-87EF-4EB8-85EB-6C1E0F629313}.Debug|Any CPU.Build.0 = Debug|Any CPU - {510FC085-87EF-4EB8-85EB-6C1E0F629313}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5F84ACD0-148C-4DE0-ADCA-073B5C66BAD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5F84ACD0-148C-4DE0-ADCA-073B5C66BAD1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5F84ACD0-148C-4DE0-ADCA-073B5C66BAD1}.Release|Any CPU.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {EE6E1971-4752-4444-9211-70BDE3CC4014} = {BF3AB5C4-79AF-4A82-8D53-B4DA476D363F} - {DBEC49D6-88ED-4717-A827-23BADE3DC5E1} = {F8CC6AB5-0A31-4DD5-9926-72CCC64E34F7} - {510FC085-87EF-4EB8-85EB-6C1E0F629313} = {F8CC6AB5-0A31-4DD5-9926-72CCC64E34F7} - {5F84ACD0-148C-4DE0-ADCA-073B5C66BAD1} = {BF3AB5C4-79AF-4A82-8D53-B4DA476D363F} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {5AAFE72A-A2F4-4EE5-B3E2-B8E1E4652456} - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection -EndGlobal diff --git a/src/SpecificationTests b/src/SpecificationTests deleted file mode 160000 index a68b987..0000000 --- a/src/SpecificationTests +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a68b987fd22f7f0063430ed822aa7f7ff78dbca4 diff --git a/tutorials/Composition/Mapping/mapping.md b/tutorials/Composition/Mapping/mapping.md index 4ff0114..449fe44 100644 --- a/tutorials/Composition/Mapping/mapping.md +++ b/tutorials/Composition/Mapping/mapping.md @@ -3,16 +3,16 @@ uid: Tutorial.Mapping title: Type Mapping --- -# Type Mapping +## Type Mapping In service oriented architecture components expose services through well known contracts. In `C#` terms the contracts are the abstract classes or interfaces these components and services are exposing. So when we say service type, in most of the cases, we mean the interfaces implementing the contract. And the components are called Implementation types. Unity allows to publish these components and make all the contracts they implement available to clients to consume. This publishing and "advertisement" is done by registering types and interfaces (contracts) associated with components. -## Registration Type +### Registration Type Registration type is the type of the 'Contract' this service provides. It could be the [Type](xref:System.Type) of the service itself of any of the base types it implements. -## Service To Implementation Mapping +### Service To Implementation Mapping The mapping is done when service is registered. Any type of registration (Type, Factory, Instance) allow to associate a service with different contracts. \ No newline at end of file diff --git a/tutorials/registration/instance.md b/tutorials/registration/instance.md index e7b46f5..7257e3f 100644 --- a/tutorials/registration/instance.md +++ b/tutorials/registration/instance.md @@ -43,7 +43,7 @@ container.RegisterInstance(typeof(IService), instance) container.RegisterInstance(typeof(IService), "xyz", instance) ``` -In this example Unity creates two registrations of type **IService**. When either is resolved it returns the instance of the **Service** object we registered with container. For more information see [Type Mapping](mapping.md) +In this example Unity creates two registrations of type **IService**. When either is resolved it returns the instance of the **Service** object we registered with container. For more information see [Type Mapping](xref:Tutorial.Mapping) ## Lifetime diff --git a/tutorials/registration/metadata.md b/tutorials/registration/metadata.md index 2719fd1..fa69975 100644 --- a/tutorials/registration/metadata.md +++ b/tutorials/registration/metadata.md @@ -64,7 +64,7 @@ var result = container.Resolve(); Assert(typeof(Service) == result.GetType()) ``` -For more information see [Type Mapping](mapping.md). +For more information see [Type Mapping](xref:Tutorial.Mapping). ## [Lifetime Manager](xref:Unity.IContainerRegistration#Unity_IContainerRegistration_LifetimeManager)