diff --git a/src/NugetPackage/UnityAutoMoqPlus.3.0.0.nupkg b/src/NugetPackage/UnityAutoMoqPlus.3.0.0.nupkg new file mode 100644 index 0000000..791ad3d Binary files /dev/null and b/src/NugetPackage/UnityAutoMoqPlus.3.0.0.nupkg differ diff --git a/src/UnityAutoMoq.Tests/Properties/AssemblyInfo.cs b/src/UnityAutoMoq.Tests/Properties/AssemblyInfo.cs index a0017a3..b89de9f 100644 --- a/src/UnityAutoMoq.Tests/Properties/AssemblyInfo.cs +++ b/src/UnityAutoMoq.Tests/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Infodoc AS")] [assembly: AssemblyProduct("UnityAutoMoq.Test")] -[assembly: AssemblyCopyright("Copyright © Infodoc AS 2009")] +[assembly: AssemblyCopyright("Copyright (C) Thomas Pedersen, Raj Aththanayake")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/UnityAutoMoq.Tests/UnityAutoMoq.Tests.csproj b/src/UnityAutoMoq.Tests/UnityAutoMoq.Tests.csproj index 52e3a2b..684c4cd 100644 --- a/src/UnityAutoMoq.Tests/UnityAutoMoq.Tests.csproj +++ b/src/UnityAutoMoq.Tests/UnityAutoMoq.Tests.csproj @@ -10,7 +10,7 @@ Properties UnityAutoMoq.Tests UnityAutoMoq.Tests - v4.0 + v4.5 512 @@ -49,6 +49,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -57,18 +58,19 @@ TRACE prompt 4 + false - - ..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll - - + False - ..\packages\Unity.2.1.505.0\lib\NET35\Microsoft.Practices.Unity.dll + ..\packages\Unity.3.5.1404.0\lib\net45\Microsoft.Practices.Unity.dll - + False - ..\packages\Unity.2.1.505.0\lib\NET35\Microsoft.Practices.Unity.Configuration.dll + ..\packages\Unity.3.5.1404.0\lib\net45\Microsoft.Practices.Unity.Configuration.dll + + + ..\packages\Unity.3.5.1404.0\lib\net45\Microsoft.Practices.Unity.RegistrationByConvention.dll False diff --git a/src/UnityAutoMoq.Tests/UnityAutoMoqContainerFixture.cs b/src/UnityAutoMoq.Tests/UnityAutoMoqContainerFixture.cs index 8041ce9..ec8f279 100644 --- a/src/UnityAutoMoq.Tests/UnityAutoMoqContainerFixture.cs +++ b/src/UnityAutoMoq.Tests/UnityAutoMoqContainerFixture.cs @@ -1,150 +1,161 @@ -using System; -using System.Web; -using NUnit.Framework; -using Moq; -using Microsoft.Practices.Unity; - -namespace UnityAutoMoq.Tests -{ - [TestFixture] - public class UnityAutoMoqContainerFixture - { - private UnityAutoMoqContainer container; - - [SetUp] - public void SetUp() - { - container = new UnityAutoMoqContainer(); - } - - [Test] - public void Can_get_instance_without_registering_it_first() - { - var mocked = container.Resolve(); - - mocked.ShouldNotBeNull(); - } - - [Test] - public void Can_get_mock() - { - Mock mock = container.GetMock(); - - mock.ShouldNotBeNull(); - } - - [Test] - public void Mocked_object_and_resolved_instance_should_be_the_same() - { - Mock mock = container.GetMock(); - var mocked = container.Resolve(); - - mock.Object.ShouldBeSameAs(mocked); - } - - [Test] - public void Mocked_object_and_resolved_instance_should_be_the_same_order_independent() - { - var mocked = container.Resolve(); - Mock mock = container.GetMock(); - - mock.Object.ShouldBeSameAs(mocked); - } - - [Test] - public void Should_apply_default_default_value_when_none_specified() - { - container = new UnityAutoMoqContainer(); - var mocked = container.GetMock(); - - mocked.DefaultValue.ShouldEqual(DefaultValue.Mock); - } - - [Test] - public void Should_apply_specified_default_value_when_specified() - { - container = new UnityAutoMoqContainer(DefaultValue.Empty); - var mocked = container.GetMock(); - - mocked.DefaultValue.ShouldEqual(DefaultValue.Empty); - } - - [Test] - public void Should_apply_specified_default_value_when_specified_2() - { - container = new UnityAutoMoqContainer{DefaultValue = DefaultValue.Empty}; - var mocked = container.GetMock(); - - mocked.DefaultValue.ShouldEqual(DefaultValue.Empty); - } - - [Test] - public void Can_resolve_concrete_type_with_dependency() - { - var concrete = container.Resolve(); - - concrete.ShouldNotBeNull(); - concrete.AnotherService.ShouldNotBeNull(); - } - - [Test] - public void Getting_mock_after_resolving_concrete_type_should_return_the_same_mock_as_passed_as_argument_to_the_concrete() - { - var concrete = container.Resolve(); - Mock mock = container.GetMock(); - - concrete.AnotherService.ShouldBeSameAs(mock.Object); - } - - [Test] - public void Can_configure_mock_as_several_interfaces() - { - container.ConfigureMock().As(); - - container.GetMock().As(); - } - - [Test] - public void Can_configure_mock_as_several_interfaces_2() - { - container.ConfigureMock().As().As(); - - container.GetMock().As(); - container.GetMock().As(); - } - - [Test] - public void Can_lazy_load_dependencies() - { - var service = container.Resolve(); - - Assert.That(service.ServiceFunc(), Is.InstanceOf()); - } - - [Test] - public void Can_mock_abstract_classes() - { - var mock = container.GetMock(); - - mock.ShouldBeOfType>(); - } - - [Test] - public void Can_inject_mocked_abstract_class() - { - var concrete = container.Resolve(); - var mock = container.GetMock(); - - concrete.HttpContextBase.ShouldBeSameAs(mock.Object); - } - - [Test] - public void Can_get_registered_implementation() - { - container.RegisterType(); - var real = container.Resolve(); - - real.ShouldBeOfType(); - } - } +using System; +using System.Web; +using NUnit.Framework; +using Moq; +using Microsoft.Practices.Unity; + +namespace UnityAutoMoq.Tests +{ + [TestFixture] + public class UnityAutoMoqContainerFixture + { + private UnityAutoMoqContainer container; + + [SetUp] + public void SetUp() + { + container = new UnityAutoMoqContainer(); + } + + [Test] + public void Can_get_instance_without_registering_it_first() + { + var mocked = container.Resolve(); + + mocked.ShouldNotBeNull(); + } + + [Test] + public void Can_get_mock() + { + Mock mock = container.GetMock(); + + mock.ShouldNotBeNull(); + } + + [Test] + public void Mocked_object_and_resolved_instance_should_be_the_same() + { + Mock mock = container.GetMock(); + var mocked = container.Resolve(); + + mock.Object.ShouldBeSameAs(mocked); + } + + [Test] + public void Mocked_object_and_resolved_instance_should_be_the_same_order_independent() + { + var mocked = container.Resolve(); + Mock mock = container.GetMock(); + + mock.Object.ShouldBeSameAs(mocked); + } + + [Test] + public void Should_apply_default_default_value_when_none_specified() + { + container = new UnityAutoMoqContainer(); + var mocked = container.GetMock(); + + mocked.DefaultValue.ShouldEqual(DefaultValue.Mock); + } + + [Test] + public void Should_apply_specified_default_value_when_specified() + { + container = new UnityAutoMoqContainer(DefaultValue.Empty); + var mocked = container.GetMock(); + + mocked.DefaultValue.ShouldEqual(DefaultValue.Empty); + } + + [Test] + public void Should_apply_specified_default_value_when_specified_2() + { + container = new UnityAutoMoqContainer{DefaultValue = DefaultValue.Empty}; + var mocked = container.GetMock(); + + mocked.DefaultValue.ShouldEqual(DefaultValue.Empty); + } + + [Test] + public void Can_resolve_concrete_type_with_dependency() + { + var concrete = container.Resolve(); + + concrete.ShouldNotBeNull(); + concrete.AnotherService.ShouldNotBeNull(); + } + + [Test] + public void Getting_mock_after_resolving_concrete_type_should_return_the_same_mock_as_passed_as_argument_to_the_concrete() + { + var concrete = container.Resolve(); + Mock mock = container.GetMock(); + + concrete.AnotherService.ShouldBeSameAs(mock.Object); + } + + [Test] + public void Can_configure_mock_as_several_interfaces() + { + container.ConfigureMock().As(); + + container.GetMock().As(); + } + + [Test] + public void Can_configure_mock_as_several_interfaces_2() + { + container.ConfigureMock().As().As(); + + container.GetMock().As(); + container.GetMock().As(); + } + + [Test] + public void Can_lazy_load_dependencies() + { + var service = container.Resolve(); + + Assert.That(service.ServiceFunc(), Is.InstanceOf()); + } + + [Test] + public void Can_mock_abstract_classes() + { + var mock = container.GetMock(); + + mock.ShouldBeOfType>(); + } + + [Test] + public void Can_inject_mocked_abstract_class() + { + var concrete = container.Resolve(); + var mock = container.GetMock(); + + concrete.HttpContextBase.ShouldBeSameAs(mock.Object); + } + + [Test] + public void Can_get_registered_implementation() + { + container.RegisterType(); + var real = container.Resolve(); + + real.ShouldBeOfType(); + } + + [Test] + public void GetStubMethod_ShouldReturn_TheSameMockedInstance() + { + container = new UnityAutoMoqContainer(DefaultValue.Empty); + var mocked = container.GetMock(); + + var stub = container.GetStub(); + + mocked.Object.ShouldBeSameAs(stub.Object); + } + } } \ No newline at end of file diff --git a/src/UnityAutoMoq.Tests/packages.config b/src/UnityAutoMoq.Tests/packages.config index 9c93bd6..22a1754 100644 --- a/src/UnityAutoMoq.Tests/packages.config +++ b/src/UnityAutoMoq.Tests/packages.config @@ -1,7 +1,6 @@  - - + - + \ No newline at end of file diff --git a/src/UnityAutoMoq.ncrunchsolution b/src/UnityAutoMoq.ncrunchsolution new file mode 100644 index 0000000..0f0716f --- /dev/null +++ b/src/UnityAutoMoq.ncrunchsolution @@ -0,0 +1,13 @@ + + 0 + Default + false + true + UseDynamicAnalysis + UseStaticAnalysis + UseStaticAnalysis + UseStaticAnalysis + Run all tests automatically:BFRydWU=;Run all tests manually:BUZhbHNl;Run impacted tests automatically, others manually (experimental!):CklzSW1wYWN0ZWQ=;Run pinned tests automatically, others manually:CElzUGlubmVk + + + \ No newline at end of file diff --git a/src/UnityAutoMoq.sln b/src/UnityAutoMoq.sln index 7fc4de7..393cf55 100644 --- a/src/UnityAutoMoq.sln +++ b/src/UnityAutoMoq.sln @@ -1,6 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityAutoMoq.Tests", "UnityAutoMoq.Tests\UnityAutoMoq.Tests.csproj", "{72D98508-6E3B-4ADF-95F1-B03A0CA81F87}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityAutoMoq", "UnityAutoMoq\UnityAutoMoq.csproj", "{3FF285B9-7D50-4192-BE06-C3C64EF484FD}" @@ -11,12 +11,13 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {72D98508-6E3B-4ADF-95F1-B03A0CA81F87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {72D98508-6E3B-4ADF-95F1-B03A0CA81F87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {72D98508-6E3B-4ADF-95F1-B03A0CA81F87}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {72D98508-6E3B-4ADF-95F1-B03A0CA81F87}.Debug|Any CPU.Build.0 = Release|Any CPU {72D98508-6E3B-4ADF-95F1-B03A0CA81F87}.Release|Any CPU.ActiveCfg = Release|Any CPU {72D98508-6E3B-4ADF-95F1-B03A0CA81F87}.Release|Any CPU.Build.0 = Release|Any CPU - {3FF285B9-7D50-4192-BE06-C3C64EF484FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3FF285B9-7D50-4192-BE06-C3C64EF484FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3FF285B9-7D50-4192-BE06-C3C64EF484FD}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {3FF285B9-7D50-4192-BE06-C3C64EF484FD}.Debug|Any CPU.Build.0 = Release|Any CPU + {3FF285B9-7D50-4192-BE06-C3C64EF484FD}.Debug|Any CPU.Deploy.0 = Release|Any CPU {3FF285B9-7D50-4192-BE06-C3C64EF484FD}.Release|Any CPU.ActiveCfg = Release|Any CPU {3FF285B9-7D50-4192-BE06-C3C64EF484FD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/src/UnityAutoMoq/AsExpression.cs b/src/UnityAutoMoq/AsExpression.cs index 4bd3176..040eba7 100644 --- a/src/UnityAutoMoq/AsExpression.cs +++ b/src/UnityAutoMoq/AsExpression.cs @@ -3,21 +3,37 @@ namespace UnityAutoMoq { + /// + /// Provide AsExpression spefied by the type paramter T + /// public class AsExpression { private readonly List implements = new List(); + /// + /// Initializes a new instance of the class. + /// + /// The implements. public AsExpression(Type implements) { this.implements.Add(implements); } + /// + /// Ases this instance. + /// + /// + /// AsExpression public AsExpression As() where T : class { implements.Add(typeof(T)); return this; } + /// + /// Gets the implementations. + /// + /// enumerable types internal IEnumerable GetImplementations() { return implements; diff --git a/src/UnityAutoMoq/NuGet.exe b/src/UnityAutoMoq/NuGet.exe new file mode 100644 index 0000000..c41a0d0 Binary files /dev/null and b/src/UnityAutoMoq/NuGet.exe differ diff --git a/src/UnityAutoMoq/Properties/AssemblyInfo.cs b/src/UnityAutoMoq/Properties/AssemblyInfo.cs index 48417a3..2cbdf55 100644 --- a/src/UnityAutoMoq/Properties/AssemblyInfo.cs +++ b/src/UnityAutoMoq/Properties/AssemblyInfo.cs @@ -4,6 +4,6 @@ [assembly: AssemblyDescription("Automocking container using Microsoft Unity and Moq")] [assembly: AssemblyCompany("UnityAutoMoq")] [assembly: AssemblyProduct("UnityAutoMoq")] -[assembly: AssemblyCopyright("Copyright (C) Thomas Pedersen")] -[assembly: AssemblyVersion("2.1.1")] +[assembly: AssemblyCopyright("Copyright (C) Thomas Pedersen, Raj Aththanayake")] +[assembly: AssemblyVersion("3.0.0")] diff --git a/src/UnityAutoMoq/UnityAutoMoq.csproj b/src/UnityAutoMoq/UnityAutoMoq.csproj index b3affb2..10367b2 100644 --- a/src/UnityAutoMoq/UnityAutoMoq.csproj +++ b/src/UnityAutoMoq/UnityAutoMoq.csproj @@ -1,7 +1,7 @@  - Debug + Release AnyCPU 9.0.30729 2.0 @@ -10,7 +10,7 @@ Properties UnityAutoMoq UnityAutoMoq - v3.5 + v4.5 512 @@ -39,6 +39,7 @@ + true @@ -48,6 +49,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -56,22 +58,23 @@ TRACE prompt 4 + false - - ..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll - - + False - ..\packages\Unity.2.1.505.0\lib\NET35\Microsoft.Practices.Unity.dll + ..\packages\Unity.3.5.1404.0\lib\net45\Microsoft.Practices.Unity.dll - + False - ..\packages\Unity.2.1.505.0\lib\NET35\Microsoft.Practices.Unity.Configuration.dll + ..\packages\Unity.3.5.1404.0\lib\net45\Microsoft.Practices.Unity.Configuration.dll + + + ..\packages\Unity.3.5.1404.0\lib\net45\Microsoft.Practices.Unity.RegistrationByConvention.dll False - ..\packages\Moq.4.0.10827\lib\NET35\Moq.dll + ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll 3.5 @@ -109,6 +112,8 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/packages/Unity.2.1.505.0/lib/NET35/Microsoft.Practices.Unity.Configuration.xml b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.Configuration.XML similarity index 89% rename from src/packages/Unity.2.1.505.0/lib/NET35/Microsoft.Practices.Unity.Configuration.xml rename to src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.Configuration.XML index 5623914..1c47ea1 100644 --- a/src/packages/Unity.2.1.505.0/lib/NET35/Microsoft.Practices.Unity.Configuration.xml +++ b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.Configuration.XML @@ -70,7 +70,7 @@ Specialization of - that provides a canned implmentation of . + that provides a canned implementation of . Type of configuration element in the collection. @@ -160,11 +160,10 @@ true if the unrecognized element was deserialized successfully; otherwise, false. The default is false. - The name of the unrecognized element. - An input stream that reads XML from the configuration file. - The element specified in is the <clear> element. - starts with the reserved prefix "config" or "lock". - + The name of the unrecognized element. + An input stream that reads XML from the configuration file. + The element specified in is the <clear> element. + starts with the reserved prefix "config" or "lock". @@ -173,8 +172,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -295,8 +293,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -478,16 +475,14 @@ Adds an item to the . - The object to add to the . - The is read-only. - + The object to add to the . + The is read-only. Removes all items from the . - The is read-only. - + The is read-only. @@ -496,23 +491,22 @@ true if is found in the ; otherwise, false. - The object to locate in the . - + The object to locate in the . Copies the elements of the sequence to an , starting at a particular index. - The one-dimensional that is the destination of the elements copied from this sequence. The must have zero-based indexing. - The zero-based index in at which copying begins. - is null. - is less than 0. - is multidimensional. - -or- - is equal to or greater than the length of . - -or- - The number of elements in the source is greater than the available space from to the end of the destination . - + The one-dimensional that is the destination of the elements copied from this sequence. The must have zero-based indexing. + The zero-based index in at which copying begins. + is null. + is less than 0. + is multidimensional. + -or- + is equal to or greater than the length of . + -or- + The number of elements in the source is greater than the available space from to the end of the destination . + @@ -521,9 +515,8 @@ true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . - The object to remove from the . - The is read-only. - + The object to remove from the . + The is read-only. @@ -532,27 +525,24 @@ The index of if found in the list; otherwise, -1. - The object to locate in the . - + The object to locate in the . Inserts an item to the at the specified index. - The zero-based index at which should be inserted. - The object to insert into the . - is not a valid index in the . - The is read-only. - + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. Removes the item at the specified index. - The zero-based index of the item to remove. - is not a valid index in the . - The is read-only. - + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. @@ -577,10 +567,9 @@ The element at the specified index. - The zero-based index of the element to get or set. - is not a valid index in the . - The property is set and the is read-only. - + The zero-based index of the element to get or set. + is not a valid index in the . + The property is set and the is read-only. @@ -610,7 +599,7 @@ A helper method to make it more foolproof to write elements. This takes care of writing the - start and end elment tags, and takes a nested closure with the code to write the content of + start and end element tags, and takes a nested closure with the code to write the content of the tag. That way the caller doesn't need to worry about the details of getting the start and end tags correct. @@ -895,8 +884,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -924,22 +912,22 @@ true when an unknown element is encountered while deserializing; otherwise, false. - The name of the unknown subelement. - The being used for deserialization. - The element identified by is locked. - - or - - One or more of the element's attributes is locked. - - or - - is unrecognized, or the element has an unrecognized attribute. - - or - - The element has a Boolean attribute with an invalid value. - - or - - An attempt was made to deserialize a property more than once. - - or - - An attempt was made to deserialize a property that is not a valid member of the element. - - or - - The element cannot contain a CDATA or text element. - + The name of the unknown subelement. + The being used for deserialization. + The element identified by is locked. + - or - + One or more of the element's attributes is locked. + - or - + is unrecognized, or the element has an unrecognized attribute. + - or - + The element has a Boolean attribute with an invalid value. + - or - + An attempt was made to deserialize a property more than once. + - or - + An attempt was made to deserialize a property that is not a valid member of the element. + - or - + The element cannot contain a CDATA or text element. + @@ -1016,8 +1004,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -1050,9 +1037,9 @@ - Write the contents of this element to the given . This - method always outputs an explicit <dependency> tag, instead of providing - attributes to the parent method. + Write the contents of this element to the given . This + method always outputs an explicit <dependency> tag, instead of providing + attributes to the parent method. Writer to send XML content to. @@ -1122,8 +1109,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -1209,11 +1195,11 @@ true if the unrecognized element was deserialized successfully; otherwise, false. The default is false. - The name of the unrecognized element. - An input stream that reads XML from the configuration file. - The element specified in is the <clear> element. - starts with the reserved prefix "config" or "lock". - + The name of the unrecognized element. + An input stream that reads XML from the configuration file. + The element specified in is the <clear> element. + starts with the reserved prefix "config" or "lock". + @@ -1230,8 +1216,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -1298,8 +1283,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -1424,8 +1408,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for @@ -1496,14 +1479,14 @@ Reads XML from the configuration file. - The that reads from the configuration file. - true to serialize only the collection key properties; otherwise, false. - The element to read is locked. - - or - - An attribute of the current node is not recognized. - - or - - The lock status of the current node cannot be determined. - + The that reads from the configuration file. + true to serialize only the collection key properties; otherwise, false. + The element to read is locked. + - or - + An attribute of the current node is not recognized. + - or - + The lock status of the current node cannot be determined. + @@ -1512,9 +1495,8 @@ true when an unknown attribute is encountered while deserializing; otherwise, false. - The name of the unrecognized attribute. - The value of the unrecognized attribute. - + The name of the unrecognized attribute. + The value of the unrecognized attribute. @@ -1523,22 +1505,22 @@ true when an unknown element is encountered while deserializing; otherwise, false. - The name of the unknown subelement. - The being used for deserialization. - The element identified by is locked. - - or - - One or more of the element's attributes is locked. - - or - - is unrecognized, or the element has an unrecognized attribute. - - or - - The element has a Boolean attribute with an invalid value. - - or - - An attempt was made to deserialize a property more than once. - - or - - An attempt was made to deserialize a property that is not a valid member of the element. - - or - - The element cannot contain a CDATA or text element. - + The name of the unknown subelement. + The being used for deserialization. + The element identified by is locked. + - or - + One or more of the element's attributes is locked. + - or - + is unrecognized, or the element has an unrecognized attribute. + - or - + The element has a Boolean attribute with an invalid value. + - or - + An attempt was made to deserialize a property more than once. + - or - + An attempt was made to deserialize a property that is not a valid member of the element. + - or - + The element cannot contain a CDATA or text element. + @@ -1592,8 +1574,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -1607,11 +1588,10 @@ true if the unrecognized element was deserialized successfully; otherwise, false. The default is false. - The name of the unrecognized element. - An input stream that reads XML from the configuration file. - The element specified in is the <clear> element. - starts with the reserved prefix "config" or "lock". - + The name of the unrecognized element. + An input stream that reads XML from the configuration file. + The element specified in is the <clear> element. + starts with the reserved prefix "config" or "lock". @@ -1628,8 +1608,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -1803,14 +1782,14 @@ Reads XML from the configuration file. - The that reads from the configuration file. - true to serialize only the collection key properties; otherwise, false. - The element to read is locked. - - or - - An attribute of the current node is not recognized. - - or - - The lock status of the current node cannot be determined. - + The that reads from the configuration file. + true to serialize only the collection key properties; otherwise, false. + The element to read is locked. + - or - + An attribute of the current node is not recognized. + - or - + The lock status of the current node cannot be determined. + @@ -1819,9 +1798,8 @@ true when an unknown attribute is encountered while deserializing; otherwise, false. - The name of the unrecognized attribute. - The value of the unrecognized attribute. - + The name of the unrecognized attribute. + The value of the unrecognized attribute. @@ -1830,22 +1808,22 @@ true when an unknown element is encountered while deserializing; otherwise, false. - The name of the unknown subelement. - The being used for deserialization. - The element identified by is locked. - - or - - One or more of the element's attributes is locked. - - or - - is unrecognized, or the element has an unrecognized attribute. - - or - - The element has a Boolean attribute with an invalid value. - - or - - An attempt was made to deserialize a property more than once. - - or - - An attempt was made to deserialize a property that is not a valid member of the element. - - or - - The element cannot contain a CDATA or text element. - + The name of the unknown subelement. + The being used for deserialization. + The element identified by is locked. + - or - + One or more of the element's attributes is locked. + - or - + is unrecognized, or the element has an unrecognized attribute. + - or - + The element has a Boolean attribute with an invalid value. + - or - + An attempt was made to deserialize a property more than once. + - or - + An attempt was made to deserialize a property that is not a valid member of the element. + - or - + The element cannot contain a CDATA or text element. + @@ -1953,11 +1931,10 @@ true if the unrecognized element was deserialized successfully; otherwise, false. The default is false. - The name of the unrecognized element. - An input stream that reads XML from the configuration file. - The element specified in is the <clear> element. - starts with the reserved prefix "config" or "lock". - + The name of the unrecognized element. + An input stream that reads XML from the configuration file. + The element specified in is the <clear> element. + starts with the reserved prefix "config" or "lock". @@ -1966,13 +1943,12 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. Base class for Unity configuration section extensions. - Derived classes are used to add custom elments and aliases + Derived classes are used to add custom elements and aliases into the configuration section being loaded. @@ -2030,14 +2006,14 @@ Reads XML from the configuration file. - The that reads from the configuration file. - true to serialize only the collection key properties; otherwise, false. - The element to read is locked. - - or - - An attribute of the current node is not recognized. - - or - - The lock status of the current node cannot be determined. - + The that reads from the configuration file. + true to serialize only the collection key properties; otherwise, false. + The element to read is locked. + - or - + An attribute of the current node is not recognized. + - or - + The lock status of the current node cannot be determined. + @@ -2076,8 +2052,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -2094,15 +2069,15 @@ - Resolves a type alias or type fullname to a concrete type. + Resolves a type alias or type FullName to a concrete type. - Type alias or type fullname + Type alias or type FullName Type object or null if resolve fails. Thrown if alias lookup fails. - Resolves a type alias or type fullname to a concrete type. + Resolves a type alias or type FullName to a concrete type. Alias or name to resolve. if true and the alias does not @@ -2146,7 +2121,7 @@ Construct a new that uses the given - sequence of alias, typename pairs to resolve types. + sequence of alias, type name pairs to resolve types. Type aliases from the configuration file. Assembly names to search. @@ -2154,7 +2129,7 @@ - Resolves a type alias or type fullname to a concrete type. + Resolves a type alias or type FullName to a concrete type. Alias or name to resolve. if true and the alias does not @@ -2215,9 +2190,8 @@ Reads XML from the configuration file. - The object, which reads from the configuration file. - found no elements in the configuration file. - + The object, which reads from the configuration file. + found no elements in the configuration file. @@ -2226,9 +2200,10 @@ true when an unknown element is encountered while deserializing; otherwise, false. - The name of the unknown subelement. - The being used for deserialization. - The element identified by is locked. + The name of the unknown subelement. + The being used for deserialization. + + The element identified by is locked. - or - One or more of the element's attributes is locked. - or - @@ -2241,7 +2216,7 @@ An attempt was made to deserialize a property that is not a valid member of the element. - or - The element cannot contain a CDATA or text element. - + @@ -2250,10 +2225,9 @@ An XML string containing an unmerged view of the object. - The instance to use as the parent when performing the un-merge. - The name of the section to create. - The instance to use when writing to a string. - + The instance to use as the parent when performing the un-merge. + The name of the section to create. + The instance to use when writing to a string. @@ -2334,8 +2308,7 @@ An that acts as the key for the specified . - The to return the key for. - + The to return the key for. @@ -2420,9 +2393,9 @@ - Write the contents of this element to the given . This - method always outputs an explicit <dependency> tag, instead of providing - attributes to the parent method. + Write the contents of this element to the given . This + method always outputs an explicit <dependency> tag, instead of providing + attributes to the parent method. Writer to send XML content to. diff --git a/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.Configuration.dll b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.Configuration.dll new file mode 100644 index 0000000..b1a8258 Binary files /dev/null and b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.Configuration.dll differ diff --git a/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.XML b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.XML new file mode 100644 index 0000000..50d092d --- /dev/null +++ b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.XML @@ -0,0 +1,328 @@ + + + + Microsoft.Practices.Unity.RegistrationByConvention + + + + + Provides helper methods to retrieve classes from assemblies. + + + + + Returns all visible, non-abstract classes from . + + The assemblies. + All visible, non-abstract classes found in the assemblies. + is . + contains elements. + All exceptions thrown while getting types from the assemblies are ignored, and the types that can be retrieved are returned. + + + + Returns all visible, non-abstract classes from , and optionally skips errors. + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from . + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from all assemblies that are loaded in the current application domain. + + to include system assemblies; otherwise, . Defaults to . + to include the Unity assemblies; otherwise, . Defaults to . + to include dynamic assemblies; otherwise, . Defaults to . + to skip errors; otherwise, . + + All visible, non-abstract classes in the loaded assemblies. + + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from all assemblies that are located in the base folder of the current application domain. + + to include system assemblies; otherwise, . Defaults to . + to include the Unity assemblies; otherwise, . Defaults to . + to skip errors; otherwise, . + + All visible, non-abstract classes. + + + If is , all exceptions thrown while loading assemblies or getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + The exception that is thrown when registering multiple types would result in an type mapping being overwritten. + + + + + Initializes a new instance of the class. + + The name for the mapping. + The source type for the mapping. + The type currently mapped. + The new type to map. + + + + Gets the name for the mapping. + + + + + Gets the source type for the mapping. + + + + + Gets the type currently mapped. + + + + + Gets the new type to map. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to An attempt to override an existing mapping was detected for type {1} with name "{0}", currently mapped to type {2}, to type {3}.. + + + + + Looks up a localized string similar to The set of assemblies contains a null element.. + + + + + Represents a set of types to register and their registration settings. + + + + + Gets types to register. + + + + + Gets a function to get the types that will be requested for each type to configure. + + + + + Gets a function to get the name to use for the registration of each type. + + + + + Gets a function to get the for the registration of each type. Defaults to no lifetime management. + + + + + + Gets a function to get the additional objects for the registration of each type. Defaults to no injection members. + + + + + + Provides a set of convenience overloads to the + interface to support registration of multiple types. + + + + + Registers the supplied types by using the specified rules for name, lifetime manager, injection members, and registration types. + + The container to configure. + The types to register. The methods in the class can be used to scan assemblies to get types, and further filtering can be performed using LINQ queries. + A function that gets the types that will be requested for each type to configure. It can be a method from the class or a custom function. Defaults to no registration types, and registers only the supplied types. + A function that gets the name to use for the registration of each type. It can be a method from the or a custom function. Defaults to no name. + A function that gets the for the registration of each type. It can be a method from the class or a custom function. Defaults to no lifetime management. + A function that gets the additional objects for the registration of each type. Defaults to no injection members. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + A new registration would overwrite an existing mapping and is . + + + + Registers the types according to the . + + The container to configure. + The convention to determine which types will be registered and how. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + + + + Provides helper methods to specify the lifetime for a type with registration by convention. + + + + + Returns a . + + The type. + A lifetime manager + + + + Returns a . + + The type. + A container controlled lifetime manager. + + + + Returns a . + + The type. + An externally controlled lifetime manager. + + + + Returns a . + + The type. + A hierarchical lifetime manager. + + + + Returns a . + + The type. + A per resolve lifetime manager. + + + + Returns a . + + The type. + A transient lifetime manager. + + + + Returns a . + + The custom type. + The type. + + A lifetime manager. + + + + + Returns a . + + The type. + A per thread lifetime manager. + + + + Provides helper methods to map types to the types interfaces to which register them. + + + + + Returns no types. + + The type to register. + An empty enumeration. + + + + Returns an enumeration with the interface that matches the name of . + + The type to register. + An enumeration with the first interface matching the name of (for example, if type is MyType, a matching interface is IMyType), + or an empty enumeration if no such interface is found. + + + + Returns an enumeration with all the interfaces implemented by . + + The type to register. + An enumeration with all the interfaces implemented by the implementation type except . + + + + Returns an enumeration with all the interfaces implemented by that belong to the same assembly as implementationType. + + The type to register. + An enumeration with all the interfaces implemented by the implementation type that belong to the same assembly. + + + + Provides helper methods to get type names. + + + + + Returns the type name. + + The type. + The type name. + + + + Returns null for the registration name. + + The type. + + + + diff --git a/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.dll b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.dll new file mode 100644 index 0000000..9622e65 Binary files /dev/null and b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.RegistrationByConvention.dll differ diff --git a/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.dll b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.dll new file mode 100644 index 0000000..a122e13 Binary files /dev/null and b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.dll differ diff --git a/src/packages/Unity.2.1.505.0/lib/NET35/Microsoft.Practices.Unity.xml b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.xml similarity index 94% rename from src/packages/Unity.2.1.505.0/lib/NET35/Microsoft.Practices.Unity.xml rename to src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.xml index 2e0af9b..fbd47c0 100644 --- a/src/packages/Unity.2.1.505.0/lib/NET35/Microsoft.Practices.Unity.xml +++ b/src/packages/Unity.3.5.1404.0/lib/net45/Microsoft.Practices.Unity.xml @@ -4,6 +4,100 @@ Microsoft.Practices.Unity + + + Provides access to the names registered for a container. + + + + + Represents a builder policy interface. Since there are no fixed requirements + for policies, it acts as a marker interface from which to derive all other + policy interfaces. + + + + + Gets the names registered for a type. + + The type. + The names registered for . + + + + An implementation + that constructs a build plan for creating objects. + + + + + A that can create and return an + for the given build key. + + + + + Create a build plan using the given context and build key. + + Current build context. + Current build key. + The build plan. + + + + Creates a build plan using the given context and build key. + + Current build context. + Current build key. + + The build plan. + + + + + Provides extension methods to the class due to the introduction + of class in the .NET for Windows Store apps. + + + + + Returns the constructor in that matches the specified constructor parameter types. + + The type to inspect + The constructor parameter types. + The constructor that matches the specified parameter types. + + + + Returns the non-static declared methods of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Returns the non-static method of a type or its based type. + + The type to inspect + The name of the method to seek. + The (closed) parameter type signature of the method. + The discovered + + + + Returns the declared properties of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Determines if the types in a parameter set ordinally matches the set of supplied types. + + + + + Base class for attributes that can be placed on parameters @@ -151,7 +245,7 @@ - Add a setof s to the collection. + Add a set of s to the collection. items to add. @@ -668,13 +762,6 @@ things like singletons and per-http-request lifetime. - - - Represents a builder policy interface. Since there are no fixed requirements - for policies, it acts as a marker interface from which to derive all other - policy interfaces. - - Retrieve a value from the backing store associated with this Lifetime policy. @@ -801,7 +888,6 @@ Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - 2 @@ -952,7 +1038,7 @@ - A that is used at build plan execution time + A strategy that is used at build plan execution time to resolve a dependent value. @@ -1061,7 +1147,7 @@ The interface the policy is registered under. to search. The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. + true if the policy searches local only; otherwise false to search up the parent chain. The policy in the list, if present; returns null otherwise. @@ -1071,7 +1157,7 @@ The interface the policy is registered under. to search. The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. + true if the policy searches local only; otherwise false to search up the parent chain. The policy list that actually contains the returned policy. The policy in the list, if present; returns null otherwise. @@ -1082,7 +1168,7 @@ to search. The interface the policy is registered under. The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. + true if the policy searches local only; otherwise false to search up the parent chain. The policy in the list, if present; returns null otherwise. @@ -1092,7 +1178,7 @@ The interface the policy is registered under. to search. The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. + true if the policy searches local only; otherwise false to search up the parent chain. The policy in the list, if present; returns null otherwise. @@ -1102,7 +1188,7 @@ The interface the policy is registered under. to search. The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. + true if the policy searches local only; otherwise false to search up the parent chain. The policy list that actually contains the returned policy. The policy in the list, if present; returns null otherwise. @@ -1113,7 +1199,7 @@ to search. The interface the policy is registered under. The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. + true if the policy searches local only; otherwise false to search up the parent chain. The policy in the list, if present; returns null otherwise. @@ -1147,13 +1233,12 @@ - The type that's currently being built. + The type that's currently being built. - Build plan for that will - return a func that will resolve the requested type + Build plan for that will return a Func that will resolve the requested type through this container later. @@ -1182,7 +1267,7 @@ The almost inevitable collection of extra helper methods on to augment the rich set of what - Linq already gives us. + LINQ already gives us. @@ -1195,7 +1280,7 @@ - Create a single string from a sequenc of items, separated by the provided , + Create a single string from a sequence of items, separated by the provided , and with the conversion to string done by the given . This method does basically the same thing as , @@ -1208,7 +1293,7 @@ - Create a single string from a sequenc of items, separated by the provided , + Create a single string from a sequence of items, separated by the provided , and with the conversion to string done by the item's method. This method does basically the same thing as , @@ -1266,7 +1351,7 @@ - Create an instance of . + Create an instance of . The property name. Value to use for the property. @@ -1485,6 +1570,20 @@ Build key for this context. Existing object to build up. + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + The resolver overrides. + Add a new set of resolver override objects to the current build operation. @@ -1604,9 +1703,6 @@ Represents that a dependency could not be resolved. - - Represents that a dependency could not be resolved. - @@ -1633,22 +1729,11 @@ The build key of the object begin built. - - - Initializes a new instance of the class with serialized data. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The exception thrown when injection is attempted on a method that is an open generic or has out or ref params. - - The exception thrown when injection is attempted on a method - that is an open generic or has out or ref params. - @@ -1670,13 +1755,6 @@ Message to return. Inner exception - - - Used for serialization. - - Serialization info. - Serialization context. - Extension methods to provide convenience overloads over the @@ -1813,7 +1891,7 @@ - Releases the managed resources used by the DbDataReader and optionally releases the unmanaged resources. + Releases the resources used by the . true to release managed and unmanaged resources; false to release only unmanaged resources. @@ -1879,7 +1957,7 @@ The interface the policy is registered under. The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. + true if the policy searches local only; otherwise false to search up the parent chain. The policy list in the chain that the searched for policy was found in, null if the policy was not found. The policy in the list, if present; returns null otherwise. @@ -1951,7 +2029,7 @@ The interface the policy is registered under. The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. + true if the policy searches local only; otherwise false to search up the parent chain. The policy list in the chain that the searched for policy was found in, null if the policy was not found. The policy in the list, if present; returns null otherwise. @@ -2229,13 +2307,11 @@ Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. - - - Value Condition Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y. - - The second object to compare. The first object to compare. + + Value Condition Less than zero is less than y. Zero equals y. Greater than zero is greater than y. + @@ -2256,27 +2332,28 @@ Base class for return values from selector policies that - return a memberinfo of some sort plus a list of parameter + return a MemberInfo of some sort plus a list of parameter keys to look up the parameter resolvers. Base class for return of selector policies that need - to keep track of a set of parameter keys. + to keep track of a set of parameter resolvers. - + - Add a new parameter key to this object. Keys are assumed - to be in the order of the parameters to the constructor. + Adds the parameter resolver. Resolvers are assumed + to be in the order of the parameters to the member. - Key for the next parameter to look up. + The new resolver. - + - The set of keys for the constructor parameters. + Gets the parameter resolvers. + An array with the parameter resolvers. @@ -2346,48 +2423,74 @@ Existing object is an instance of . The context for the operation. - + - A helper method used by the generated IL to throw an exception if - a dependency cannot be resolved. + A helper method used by the generated IL to set up a PerResolveLifetimeManager lifetime manager + if the current object is such. - The currently being - used for the build of this object. + Current build context. - + + + Build up the string that will represent the constructor signature + in any exception message. + + + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + A helper method used by the generated IL to throw an exception if - a dependency cannot be resolved because of an invalid constructor. + no existing object is present, but the user is attempting to build + an interface (usually due to the lack of a type mapping). The currently being used for the build of this object. - The signature of the invalid constructor. - + A helper method used by the generated IL to throw an exception if no existing object is present, but the user is attempting to build - an interface (usually due to the lack of a type mapping). + an abstract class (usually due to the lack of a type mapping). The currently being used for the build of this object. - + - A helper method used by the generated IL to store the current operation in the build context. + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an delegate other than Func{T} or Func{IEnumerable{T}}. + The currently being + used for the build of this object. - + - A helper method used by the generated IL to store the current operation in the build context. + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved. + The currently being + used for the build of this object. - + - A helper method used by the generated IL to set up a PerResolveLifetimeManager lifetime manager - if the current object is such. + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved because of an invalid constructor. - Current build context. + The currently being + used for the build of this object. + The signature of the invalid constructor. @@ -2412,114 +2515,31 @@ Constructor we're trying to call. - - - An implementation of that will - check for full trust and if we're building a class or an interface. If in full - trust, attach to the class or module of the interface respectively. If in partial - trust, attach to the OB2 module instead. - - - - - This interface defines a policy that manages creation of the dynamic methods - used by the ObjectBuilder code generation. This way, we can replace the details - of how the dynamic method is created to handle differences in CLR (like Silverlight - vs desktop) or security policies. - - - - - Create a builder method for the given type, using the given name. - - Type that will be built by the generated method. - Name to give to the method. - A object with the proper signature to use - as part of a build plan. - - - - Create a builder method for the given type, using the given name. - - Type that will be built by the generated method. - Name to give to the method. - A object with the proper signature to use - as part of a build plan. - - This object tracks the current state of the build plan generation, - accumulates the IL, provides the preamble & postamble for the dynamic - method, and tracks things like local variables in the generated IL - so that they can be reused across IL generation strategies. - - - - - Create a that is initialized - to handle creation of a dynamic method to build the given type. - - Type that we're trying to create a build plan for. - An object that actually - creates our object. - - - - Completes generation of the dynamic method and returns the - generated dynamic method delegate. - - The created - - - - Emit the IL to put the build context on top of the IL stack. - - - - - Emit the IL to put the current build key on top of the IL stack. - - - - - Emit the IL to put the current "existing" object on the top of the IL stack. - - - - - Emit the IL to make the top of the IL stack our current "existing" object. - - - - - Emit the IL to load the given object onto the top of the IL stack. - - Type to load on the stack. - - - - Emit the IL needed to look up an and - call it to get a value. + - Type of the dependency to resolve. - Key to look up the policy by. - + - Emit the IL needed to clear the . + + - + - Emit the IL needed to either cast the top of the stack to the target type - or unbox it, if it's a value type. + - Type to convert the top of the stack to. + - + - A helper method used by the generated IL to clear the current operation in the build context. + + + + + @@ -2530,69 +2550,53 @@ Key the resolver was stored under. The found dependency resolver. - + - A reflection helper method to make it easier to grab a property getter - for the given property. - - Type that implements the property we want. - Type of the property. - Name of the property. - The property getter's . - - - - A reflection helper method that makes it easier to grab a - for a method. + Helper method used by generated IL to look up a dependency resolver based on the given key. - Type that implements the method we want. - Name of the method. - Types of arguments to the method. - The method's . + Current build context. + Type of the dependency being resolved. + The configured resolver. + The found dependency resolver. - + - The underlying that can be used to - emit IL into the generated dynamic method. + The type that is to be built with the dynamic build plan. - + - The type we're currently creating the method to build. + The context parameter representing the used when the build plan is executed. - A delegate type that defines the signature of the - dynamic method created by the build plans. + - used to build up the object. + - An implementation of that runs the - given delegate to execute the plan. + - + - An implementation - that constructs a build plan via dynamic IL emission. + + - + - A that can create and return an - for the given build key. + + - + - Create a build plan using the given context and build key. + An implementation + that constructs a build plan via dynamic IL emission. - Current build context. - Current build key. - The build plan. @@ -2931,22 +2935,22 @@ for this property's value. - + Create an instance of with the given and key. The property. - Key to use to look up the resolver. + PropertyInfo for this property. - + - Key to look up this property's resolver. + IDependencyResolverPolicy for this property @@ -3031,8 +3035,7 @@ - This interface defines a standard method to convert any - regardless + This interface defines a standard method to convert any regardless of the stage enum into a regular, flat strategy chain. @@ -3147,7 +3150,7 @@ Clear the current strategy chain list. - This will not clear the inner strategy chain if this instane was created with one. + This will not clear the inner strategy chain if this instance was created with one. @@ -3163,12 +3166,12 @@ - Initialzie a new instance of the class. + Initialize a new instance of the class. - Initialzie a new instance of the class with a colleciton of strategies. + Initialize a new instance of the class with a collection of strategies. A collection of strategies to initialize the chain. @@ -3205,24 +3208,22 @@ Context for the teardown process. - - Returns an enumerator that iterates through the collection. - + + Returns an enumerator that iterates through the collection. + - - A that can be used to iterate through the collection. - - 1 + + A that can be used to iterate through the collection. + - - Returns an enumerator that iterates through a collection. - + + Returns an enumerator that iterates through a collection. + - - An object that can be used to iterate through the collection. - - 2 + + An object that can be used to iterate through the collection. + @@ -3363,50 +3364,6 @@ Second sequence of items. New sequence of pairs. This sequence ends when the shorter of sequence1 and sequence2 does. - - - The exception thrown by the Unity container when - an attempt to resolve a dependency fails. - - - The exception thrown by the Unity container when - an attempt to resolve a dependency fails. - - - - - Constructor to create a from serialized state. - - Serialization info - Serialization context - - - - Serialize this object into the given context. - - Serialization info - Streaming context - - - - Create a new that records - the exception for the given type and name. - - Type requested from the container. - Name requested from the container. - The actual exception that caused the failure of the build. - The build context representing the failed operation. - - - - The type that was being requested from the container at the time of failure. - - - - - The name that was being requested from the container at the time of failure. - - A that lets you register a @@ -3945,7 +3902,7 @@ but you still want properties and other injection performed. of object to perform injection on. - Conatiner to resolve through. + Container to resolve through. Instance to build up. name to use when looking up the typemappings and other configurations. Any overrides for the Buildup. @@ -3998,8 +3955,8 @@ - Check if a particular type has been registered with the container with - the default name. + Check if a particular type has been registered with the container with + the default name. Container to inspect. Type to check registration for. @@ -4031,27 +3988,6 @@ Name to check registration for. True if this type/name pair has been registered, false if not. - - - This extension installs the default strategies and policies into the container - to implement the standard behavior of the Unity container. - - - This extension installs the default strategies and policies into the container - to implement the standard behavior of the Unity container. - - - - - Add the correct to the policy - set. This version adds the appropriate policy for running on the desktop CLR. - - - - - Add the default ObjectBuilder strategies & policies to the container. - - The class provides the means for extension objects @@ -4069,7 +4005,7 @@ method is called, that name is included in the list that is returned. to register. - Name assocated with that type. + Name associated with that type. @@ -4140,7 +4076,7 @@ The name. - Name used for this event arg object. + Name used for this EventArg object. @@ -4475,7 +4411,7 @@ Add policies to the to configure the container to call this constructor with the appropriate parameter values. - Interface being registered, ignored in this implemenation. + Interface being registered, ignored in this implementation. Type to register. Name used to resolve the type object. Policy list to add policies to. @@ -4604,7 +4540,7 @@ of object to perform injection on. Instance to build up. - name to use when looking up the typemappings and other configurations. + name to use when looking up the TypeMappings and other configurations. Any overrides for the resolve calls. The resulting object. By default, this will be , but container extensions may add things like automatic proxy creation which would @@ -4642,7 +4578,7 @@ This method removes all extensions from the container, including the default ones that implement the out-of-the-box behavior. After this method, if you want to use - the container again you will need to either readd the default extensions or replace + the container again you will need to either read the default extensions or replace them with your own. @@ -4914,7 +4850,7 @@ Resolve the value for a dependency. Current build context. - An array pupulated with the results of resolving the resolver policies. + An array populated with the results of resolving the resolver policies. @@ -4984,7 +4920,7 @@ - An implemnetation of which returns + An implementation of which returns the set of specific properties that the selector was configured with. @@ -5008,6 +4944,32 @@ Sequence of objects that contain the properties to set. + + + The exception thrown by the Unity container when + an attempt to resolve a dependency fails. + + + + + Create a new that records + the exception for the given type and name. + + Type requested from the container. + Name requested from the container. + The actual exception that caused the failure of the build. + The build context representing the failed operation. + + + + The type that was being requested from the container at the time of failure. + + + + + The name that was being requested from the container at the time of failure. + + A class that stores a name and type, and generates a @@ -5138,6 +5100,11 @@ The instance that will be assigned. Argument name. + + + A helper class to manage the names that get registered in the container + + The build stages we use in the Unity container @@ -5212,6 +5179,16 @@ Looks up a localized string similar to The current build operation (build key {2}) failed: {3} (Strategy type {0}, index {1}). + + + Looks up a localized string similar to The current type, {0}, is an abstract class and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to The current type, {0}, is delegate and cannot be constructed. Unity only supports resolving Func<T> and Func<IEnumerable<T>> by default.. + + Looks up a localized string similar to The current type, {0}, is an interface and cannot be constructed. Are you missing a type mapping?. @@ -5495,7 +5472,7 @@ If true, the container will take over the lifetime of the instance, calling Dispose on it (if it's ) when the container is Disposed. - If false, container will not maintain a strong reference to . User is reponsible + If false, container will not maintain a strong reference to . User is responsible for disposing instance, and for keeping the instance from being garbage collected. The object that this method was called on (this in C#, Me in Visual Basic). @@ -5575,7 +5552,7 @@ This method removes all extensions from the container, including the default ones that implement the out-of-the-box behavior. After this method, if you want to use - the container again you will need to either readd the default extensions or replace + the container again you will need to either read the default extensions or replace them with your own. @@ -5666,6 +5643,17 @@ Remove the default behavior from the container. + + + This extension installs the default strategies and policies into the container + to implement the standard behavior of the Unity container. + + + + + Add the default ObjectBuilder strategies & policies to the container. + + Helper class to wrap common reflection stuff dealing with @@ -5770,7 +5758,7 @@ Another reflection helper class that has extra methods - for dealing with ParameterInfos. + for dealing with ParameterInfo. @@ -5848,6 +5836,15 @@ The type of the elements in this type (if it's an array). + + + Returns all the public constructors defined for the current reflected . + + + An enumeration of ConstructorInfo objects representing all the public instance constructors defined for the + current reflected , but not including the type initializer (static constructor). + + Create a new instance of that @@ -5898,6 +5895,15 @@ Expression describing the property for which the set method is to be extracted. Corresponding . + + + + + + + + + Pull out a object from an expression of the form () => new SomeType() diff --git a/src/packages/Unity.3.5.1404.0/lib/portable-net45+wp80+win8+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.dll b/src/packages/Unity.3.5.1404.0/lib/portable-net45+wp80+win8+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.dll new file mode 100644 index 0000000..a122e13 Binary files /dev/null and b/src/packages/Unity.3.5.1404.0/lib/portable-net45+wp80+win8+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.dll differ diff --git a/src/packages/Unity.2.1.505.0/lib/SL30/Microsoft.Practices.Unity.Silverlight.xml b/src/packages/Unity.3.5.1404.0/lib/portable-net45+wp80+win8+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.xml similarity index 94% rename from src/packages/Unity.2.1.505.0/lib/SL30/Microsoft.Practices.Unity.Silverlight.xml rename to src/packages/Unity.3.5.1404.0/lib/portable-net45+wp80+win8+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.xml index e77de84..fbd47c0 100644 --- a/src/packages/Unity.2.1.505.0/lib/SL30/Microsoft.Practices.Unity.Silverlight.xml +++ b/src/packages/Unity.3.5.1404.0/lib/portable-net45+wp80+win8+MonoAndroid10+MonoTouch10/Microsoft.Practices.Unity.xml @@ -1,18 +1,102 @@ - Microsoft.Practices.Unity.Silverlight + Microsoft.Practices.Unity - + - This attribute is used to mark properties and parameters as targets for injection. + Provides access to the names registered for a container. - - For properties, this attribute is necessary for injection to happen. For parameters, - it's not needed unless you want to specify additional information to control how - the parameter is resolved. - + + + + Represents a builder policy interface. Since there are no fixed requirements + for policies, it acts as a marker interface from which to derive all other + policy interfaces. + + + + + Gets the names registered for a type. + + The type. + The names registered for . + + + + An implementation + that constructs a build plan for creating objects. + + + + + A that can create and return an + for the given build key. + + + + + Create a build plan using the given context and build key. + + Current build context. + Current build key. + The build plan. + + + + Creates a build plan using the given context and build key. + + Current build context. + Current build key. + + The build plan. + + + + + Provides extension methods to the class due to the introduction + of class in the .NET for Windows Store apps. + + + + + Returns the constructor in that matches the specified constructor parameter types. + + The type to inspect + The constructor parameter types. + The constructor that matches the specified parameter types. + + + + Returns the non-static declared methods of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Returns the non-static method of a type or its based type. + + The type to inspect + The name of the method to seek. + The (closed) parameter type signature of the method. + The discovered + + + + Returns the declared properties of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Determines if the types in a parameter set ordinally matches the set of supplied types. + + + + @@ -31,6 +115,28 @@ this attribute is decoration. The resolver object. + + + This attribute is used to indicate which constructor to choose when + the container attempts to build a type. + + + + + This attribute is used to mark methods that should be called when + the container is building an object. + + + + + This attribute is used to mark properties and parameters as targets for injection. + + + For properties, this attribute is necessary for injection to happen. For parameters, + it's not needed unless you want to specify additional information to control how + the parameter is resolved. + + Create an instance of with no name. @@ -57,18 +163,6 @@ The name specified in the constructor. - - - This attribute is used to indicate which constructor to choose when - the container attempts to build a type. - - - - - This attribute is used to mark methods that should be called when - the container is building an object. - - An used to mark a dependency @@ -151,7 +245,7 @@ - Add a setof s to the collection. + Add a set of s to the collection. items to add. @@ -349,5044 +443,5020 @@ An extension context for the created child container. - + - The class provides the means for extension objects - to manipulate the internal state of the . + Base class for subclasses that let you specify that + an instance of a generic type parameter should be resolved. - + - Store a type/name pair for later resolution. + Base type for objects that are used to configure parameters for + constructor or method injection, or for getting the value to + be injected into a property. - - - When users register type mappings (or other things) with a named key, this method - allows you to register that name with the container so that when the - method is called, that name is included in the list that is returned. - - to register. - Name assocated with that type. - + - The container that this context is associated with. + Test to see if this parameter value has a matching type for the given type. - The object. + Type to check. + True if this parameter value is compatible with type , + false if not. - + - The strategies this container uses. + Return a instance that will + return this types value for the parameter. - The that the container uses to build objects. + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . - + - The strategies this container uses to construct build plans. + Convert the given set of arbitrary values to a sequence of InjectionParameterValue + objects. The rules are: If it's already an InjectionParameterValue, return it. If + it's a Type, return a ResolvedParameter object for that type. Otherwise return + an InjectionParameter object for that value. - The that this container uses when creating - build plans. + The values to build the sequence from. + The resulting converted sequence. - + - The policies this container uses. + Convert an arbitrary value to an InjectionParameterValue object. The rules are: + If it's already an InjectionParameterValue, return it. If it's a Type, return a + ResolvedParameter object for that type. Otherwise return an InjectionParameter + object for that value. - The the that container uses to build objects. + The value to convert. + The resulting . - + - The that this container uses. + Name for the type represented by this . + This may be an actual type name or a generic argument name. - The is used to manage objects that the container is managing. - + - This event is raised when the method, - or one of its overloads, is called. + Create a new instance that specifies + that the given named generic parameter should be resolved. + The generic parameter name to resolve. - + - This event is raised when the method, - or one of its overloads, is called. + Create a new instance that specifies + that the given named generic parameter should be resolved. + The generic parameter name to resolve. + name to use when looking up in the container. - + - This event is raised when the method is called, providing - the newly created child container to extensions to act on as they see fit. + Test to see if this parameter value has a matching type for the given type. + Type to check. + True if this parameter value is compatible with type , + false if not. - + - Base interface for all extension configuration interfaces. + Return a instance that will + return this types value for the parameter. + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . - + - Retrieve the container instance that we are currently configuring. + Return a instance that will + return this types value for the parameter. + The actual type to resolve. + The resolution key. + The . - + - An EventArgs class that holds a string Name. + Name for the type represented by this . + This may be an actual type name or a generic argument name. - + - Create a new with a null name. + A that lets you specify that + an instance of a generic type parameter should be resolved, providing the + value if resolving fails. - + - Create a new with the given name. + Create a new instance that specifies + that the given named generic parameter should be resolved. - Name to store. + The generic parameter name to resolve. - + - The name. + Create a new instance that specifies + that the given named generic parameter should be resolved. - Name used for this event arg object. + The generic parameter name to resolve. + name to use when looking up in the container. - + - Event argument class for the event. + Return a instance that will + return this types value for the parameter. + The actual type to resolve. + The resolution key. + The . - + - Create a new instance of . + A class that lets you specify a factory method the container + will use to create the object. - Type to map from. - Type to map to. - Name for the registration. - to manage instances. + This is a significantly easier way to do the same + thing the old static factory extension was used for. - + - Type to map from. + Base class for objects that can be used to configure what + class members get injected by the container. - + - Type to map to. + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + Type to register. + Policy list to add policies to. - + - to manage instances. + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + Type of interface being registered. If no interface, + this will be null. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. - + - Event argument class for the event. + Create a new instance of with + the given factory function. + Factory function. - + - Create a default instance. + Create a new instance of with + the given factory function. + Factory function. - + - Create a instance initialized with the given arguments. + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. - Type of instance being registered. - The instance object itself. - Name to register under, null if default registration. - object that handles how - the instance will be owned. + Type of interface being registered. If no interface, + this will be null. This parameter is ignored in this implementation. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. - + - Type of instance being registered. + A that can be passed to + to configure a + parameter or property as an optional dependency. - - Type of instance being registered. - - + - Instance object being registered. + A base class for implementing classes + that deal in explicit types. - Instance object being registered - + - that controls ownership of - this instance. + Create a new that exposes + information about the given . + Type of the parameter. - + - Base class for all extension objects. + Test to see if this parameter value has a matching type for the given type. + Type to check. + True if this parameter value is compatible with type , + false if not. - + - The container calls this method when the extension is added. + The type of parameter this object represents. - A instance that gives the - extension access to the internals of the container. - + - Initial the container with this extension's functionality. + Name for the type represented by this . + This may be an actual type name or a generic argument name. - - When overridden in a derived class, this method will modify the given - by adding strategies, policies, etc. to - install it's functions into the container. - + - Removes the extension's functions from the container. + Construct a new object that + specifies the given . - - - This method is called when extensions are being removed from the container. It can be - used to do things like disconnect event handlers or clean up member state. You do not - need to remove strategies or policies here; the container will do that automatically. - - - The default implementation of this method does nothing. - + Type of the dependency. - + - The container this extension has been added to. + Construct a new object that + specifies the given and . - The that this extension has been added to. + Type of the dependency. + Name for the dependency. - + - The object used to manipulate - the inner state of the container. + Return a instance that will + return this types value for the parameter. + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . - + - A that lets you specify that - an instance of a generic type parameter should be resolved. + A generic version of that lets you + specify the type of the dependency using generics syntax. + Type of the dependency. - + - Base class for subclasses that let you specify that - an instance of a generic type parameter should be resolved. + Construct a new . - + - Base type for objects that are used to configure parameters for - constructor or method injection, or for getting the value to - be injected into a property. + Construct a new with the given + . + Name of the dependency. - + - Test to see if this parameter value has a matching type for the given type. + A special lifetime manager which works like , + except that in the presence of child containers, each child gets it's own instance + of the object, instead of sharing one in the common parent. - Type to check. - True if this parameter value is compatible with type , - false if not. - + - Return a instance that will - return this types value for the parameter. + A that holds onto the instance given to it. + When the is disposed, + the instance is disposed with it. - Type that contains the member that needs this parameter. Used - to resolve open generic parameters. - The . - + - Convert the given set of arbitrary values to a sequence of InjectionParameterValue - objects. The rules are: If it's already an InjectionParameterValue, return it. If - it's a Type, return a ResolvedParameter object for that type. Otherwise return - an InjectionParameter object for that value. + Base class for Lifetime managers which need to synchronize calls to + . - The values to build the sequence from. - The resulting converted sequence. + + + The purpose of this class is to provide a basic implementation of the lifetime manager synchronization pattern. + + + Calls to the method of a + instance acquire a lock, and if the instance has not been initialized with a value yet the lock will only be released + when such an initialization takes place by calling the method or if + the build request which resulted in the call to the GetValue method fails. + + + - + - Convert an arbitrary value to an InjectionParameterValue object. The rules are: - If it's already an InjectionParameterValue, return it. If it's a Type, return a - ResolvedParameter object for that type. Otherwise return an InjectionParameter - object for that value. + Base class for Lifetime managers - classes that control how + and when instances are created by the Unity container. - The value to convert. - The resulting . - + - Name for the type represented by this . - This may be an actual type name or a generic argument name. + A that controls how instances are + persisted and recovered from an external store. Used to implement + things like singletons and per-http-request lifetime. - + - Create a new instance that specifies - that the given named generic parameter should be resolved. + Retrieve a value from the backing store associated with this Lifetime policy. - The generic parameter name to resolve. + the object desired, or null if no such object is currently stored. - + - Create a new instance that specifies - that the given named generic parameter should be resolved. + Stores the given value into backing store for retrieval later. - The generic parameter name to resolve. - name to use when looking up in the container. + The object to store. - + - Test to see if this parameter value has a matching type for the given type. + Remove the value this lifetime policy is managing from backing store. - Type to check. - True if this parameter value is compatible with type , - false if not. - + - Return a instance that will - return this types value for the parameter. + Retrieve a value from the backing store associated with this Lifetime policy. - Type that contains the member that needs this parameter. Used - to resolve open generic parameters. - The . + the object desired, or null if no such object is currently stored. - + - Return a instance that will - return this types value for the parameter. + Stores the given value into backing store for retrieval later. - The actual type to resolve. - The resolution key. - The . + The object being stored. - + - Name for the type represented by this . - This may be an actual type name or a generic argument name. + Remove the given object from backing store. - + - Create a new instance that specifies - that the given named generic parameter should be resolved. + This interface provides a hook for the builder context to + implement error recovery when a builder strategy throws + an exception. Since we can't get try/finally blocks onto + the call stack for later stages in the chain, we instead + add these objects to the context. If there's an exception, + all the current IRequiresRecovery instances will have + their Recover methods called. - The generic parameter name to resolve. - + - Create a new instance that specifies - that the given named generic parameter should be resolved. + A method that does whatever is needed to clean up + as part of cleaning up after an exception. - The generic parameter name to resolve. - name to use when looking up in the container. - - - - Return a instance that will - return this types value for the parameter. - - The actual type to resolve. - The resolution key. - The . + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + - + - A that lets you specify that - an array containing the registered instances of a generic type parameter - should be resolved. + Retrieve a value from the backing store associated with this Lifetime policy. + the object desired, or null if no such object is currently stored. + Calls to this method acquire a lock which is released only if a non-null value + has been set for the lifetime manager. - + - Create a new instance that specifies - that the given named generic parameter should be resolved. + Performs the actual retrieval of a value from the backing store associated + with this Lifetime policy. - The generic parameter name to resolve. - The values for the elements, that will - be converted to objects. + the object desired, or null if no such object is currently stored. + This method is invoked by + after it has acquired its lock. - + - Test to see if this parameter value has a matching type for the given type. + Stores the given value into backing store for retrieval later. - Type to check. - True if this parameter value is compatible with type , - false if not. - A type is considered compatible if it is an array type of rank one - and its element type is a generic type parameter with a name matching this generic - parameter name configured for the receiver. + The object being stored. + Setting a value will attempt to release the lock acquired by + . - + - Return a instance that will - return this types value for the parameter. + Performs the actual storage of the given value into backing store for retrieval later. - Type that contains the member that needs this parameter. Used - to resolve open generic parameters. - The . + The object being stored. + This method is invoked by + before releasing its lock. - + - Name for the type represented by this . - This may be an actual type name or a generic argument name. + Remove the given object from backing store. - + - A Unity container extension that allows you to configure - which constructors, properties, and methods get injected - via an API rather than through attributes. + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + - + - Initial the container with this extension's functionality. + Retrieve a value from the backing store associated with this Lifetime policy. - - When overridden in a derived class, this method will modify the given - by adding strategies, policies, etc. to - install it's functions into the container. + the object desired, or null if no such object is currently stored. - + - API to configure the injection settings for a particular type. + Stores the given value into backing store for retrieval later. - Type the injection is being configured for. - Objects containing the details on which members to inject and how. - This extension object. + The object being stored. - + - API to configure the injection settings for a particular type/name pair. + Remove the given object from backing store. - Type the injection is being configured for. - Name of registration - Objects containing the details on which members to inject and how. - This extension object. - + - API to configure the injection settings for a particular type. + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - Type to configure. - Objects containing the details on which members to inject and how. - This extension object. - + - API to configure the injection settings for a particular type/name pair. + Standard Dispose pattern implementation. Not needed, but it keeps FxCop happy. - Type to configure. - Name of registration. - Objects containing the details on which members to inject and how. - This extension object. + Always true, since we don't have a finalizer. - + - API to configure the injection settings for a particular type/name pair. + This is a custom lifetime manager that acts like , + but also provides a signal to the default build plan, marking the type so that + instances are reused across the build up object graph. - Type of interface/base class being registered (may be null). - Type of actual implementation class being registered. - Name of registration. - Objects containing the details on which members to inject and how. - This extension object. - + - A class that holds the collection of information - for a constructor, so that the container can - be configured to call this constructor. + Construct a new object that does not + itself manage an instance. - + - Base class for objects that can be used to configure what - class members get injected by the container. + Construct a new object that stores the + give value. This value will be returned by + but is not stored in the lifetime manager, nor is the value disposed. + This Lifetime manager is intended only for internal use, which is why the + normal method is not used here. + Value to store. - + - Add policies to the to configure the - container to call this constructor with the appropriate parameter values. + Retrieve a value from the backing store associated with this Lifetime policy. - Type to register. - Policy list to add policies to. + the object desired, or null if no such object is currently stored. - + - Add policies to the to configure the - container to call this constructor with the appropriate parameter values. + Stores the given value into backing store for retrieval later. In this class, + this is a noop, since it has special hooks down in the guts. - Type of interface being registered. If no interface, - this will be null. - Type of concrete type being registered. - Name used to resolve the type object. - Policy list to add policies to. + The object being stored. - + - Create a new instance of that looks - for a constructor with the given set of parameters. + Remove the given object from backing store. Noop in this class. - The values for the parameters, that will - be converted to objects. - + - Add policies to the to configure the - container to call this constructor with the appropriate parameter values. + A strategy that handles Hierarchical lifetimes across a set of parent/child + containers. - Interface registered, ignored in this implementation. - Type to register. - Name used to resolve the type object. - Policy list to add policies to. - + - A class that lets you specify a factory method the container - will use to create the object. + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. - This is a significantly easier way to do the same - thing the old static factory extension was used for. - + - Create a new instance of with - the given factory function. + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. Although you + can implement this interface directly, you may also choose to use + as the base class for your strategies, as + this class provides useful helper methods and makes support BuildUp and TearDown + optional. - Factory function. - + - Create a new instance of with - the given factory function. + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. - Factory function. + Context of the build operation. - + - Add policies to the to configure the - container to call this constructor with the appropriate parameter values. + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. - Type of interface being registered. If no interface, - this will be null. This parameter is ignored in this implementation. - Type of concrete type being registered. - Name used to resolve the type object. - Policy list to add policies to. + Context of the build operation. - + - An that configures the - container to call a method as part of buildup. + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + Context of the teardown operation. - + - Create a new instance which will configure - the container to call the given methods with the given parameters. + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. - Name of the method to call. - Parameter values for the method. + Context of the teardown operation. - + - Add policies to the to configure the - container to call this constructor with the appropriate parameter values. + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. - Type of interface registered, ignored in this implementation. - Type to register. - Name used to resolve the type object. - Policy list to add policies to. + Context of the build operation. - + - A small function to handle name matching. You can override this - to do things like case insensitive comparisons. - - MethodInfo for the method you're checking. - Name of the method you're looking for. - True if a match, false if not. + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. - + - A class that holds on to the given value and provides - the required - when the container is configured. + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + Context of the teardown operation. - + - A base class for implementing classes - that deal in explicit types. + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + Context of the teardown operation. - + - Create a new that exposes - information about the given . + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. - Type of the parameter. + Context of the build operation. - + - Test to see if this parameter value has a matching type for the given type. + A that will attempt to + resolve a value, and return null if it cannot rather than throwing. - Type to check. - True if this parameter value is compatible with type , - false if not. - + - The type of parameter this object represents. + A strategy that is used at build plan execution time + to resolve a dependent value. - + - Name for the type represented by this . - This may be an actual type name or a generic argument name. + Get the value for a dependency. + Current build context. + The value for the dependency. - + - Create an instance of that stores - the given value, using the runtime type of that value as the - type of the parameter. + Construct a new object + that will attempt to resolve the given name and type from the container. - Value to be injected for this parameter. + Type to resolve. Must be a reference type. + Name to resolve with. - + - Create an instance of that stores - the given value, associated with the given type. + Construct a new object + that will attempt to resolve the given type from the container. - Type of the parameter. - Value of the parameter + Type to resolve. Must be a reference type. - + - Return a instance that will - return this types value for the parameter. + Get the value for a dependency. - Type that contains the member that needs this parameter. Used - to resolve open generic parameters. - The . + Current build context. + The value for the dependency. - + - A generic version of that makes it a - little easier to specify the type of the parameter. + Type this resolver will resolve. - Type of parameter. - + - Create a new . + Name this resolver will resolve. - Value for the parameter. - + - This class stores information about which properties to inject, - and will configure the container accordingly. + Extension methods on to provide convenience + overloads (generic versions, mostly). - + - Configure the container to inject the given property name, - resolving the value via the container. + Removes an individual policy type for a build key. - Name of the property to inject. + The type the policy was registered as. + to remove the policy from. + The key the policy applies. - + - Configure the container to inject the given property name, - using the value supplied. This value is converted to an - object using the - rules defined by the - method. + Removes a default policy. - Name of property to inject. - Value for property. + The type the policy was registered as. + to remove the policy from. - + - Add policies to the to configure the - container to call this constructor with the appropriate parameter values. + Gets an individual policy. - Interface being registered, ignored in this implemenation. - Type to register. - Name used to resolve the type object. - Policy list to add policies to. + The interface the policy is registered under. + to search. + The key the policy applies. + The policy in the list, if present; returns null otherwise. - + - A that lets you specify that - an instance of a generic type parameter should be resolved, providing the - value if resolving fails. + Gets an individual policy. + The interface the policy is registered under. + to search. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. - + - Create a new instance that specifies - that the given named generic parameter should be resolved. + Gets an individual policy. - The generic parameter name to resolve. + to search. + The interface the policy is registered under. + The key the policy applies. + The policy in the list, if present; returns null otherwise. - + - Create a new instance that specifies - that the given named generic parameter should be resolved. + Gets an individual policy. - The generic parameter name to resolve. - name to use when looking up in the container. + to search. + The interface the policy is registered under. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. - + - Return a instance that will - return this types value for the parameter. + Gets an individual policy. - The actual type to resolve. - The resolution key. - The . + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. - + - A that can be passed to - to configure a - parameter or property as an optional dependency. + Gets an individual policy. + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. - + - Construct a new object that - specifies the given . + Gets an individual policy. - Type of the dependency. + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. - + - Construct a new object that - specifies the given and . + Get the non default policy. - Type of the dependency. - Name for the dependency. + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. - + - Return a instance that will - return this types value for the parameter. + Get the non default policy. - Type that contains the member that needs this parameter. Used - to resolve open generic parameters. - The . + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. - + - A generic version of that lets you - specify the type of the dependency using generics syntax. + Get the non default policy. - Type of the dependency. + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. - + - Construct a new . + Sets an individual policy. + The interface the policy is registered under. + to add the policy to. + The policy to be registered. + The key the policy applies. - + - Construct a new with the given - . + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. - Name of the dependency. + The interface to register the policy under. + to add the policy to. + The default policy to be registered. - + - A class that stores a type, and generates a - resolver object that resolves all the named instances or the - type registered in a container. + Base class for the current operation stored in the build context. - + - Construct a new that - resolves to the given element type and collection of element values. + Create a new . - The type of elements to resolve. - The values for the elements, that will - be converted to objects. + Type currently being built. - + - Construct a new that - resolves to the given array and element types and collection of element values. + The type that's currently being built. - The type for the array of elements to resolve. - The type of elements to resolve. - The values for the elements, that will - be converted to objects. - + - Return a instance that will - return this types value for the parameter. + Build plan for that will return a Func that will resolve the requested type + through this container later. - Type that contains the member that needs this parameter. Used - to resolve open generic parameters. - The . - + - A generic version of for convenience - when creating them by hand. + A build plan is an object that, when invoked, will create a new object + or fill in a given existing one. It encapsulates all the information + gathered by the strategies to construct a particular object. - Type of the elements for the array of the parameter. - + - Construct a new that - resolves to the given element generic type with the given element values. + Creates an instance of this build plan's type, or fills + in the existing type if passed in. - The values for the elements, that will - be converted to objects. + Context used to build up the object. - + - A class that stores a name and type, and generates a - resolver object that resolves the parameter via the - container. + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + Context used to build up the object. - + - Construct a new that - resolves to the given type. + The almost inevitable collection of extra helper methods on + to augment the rich set of what + LINQ already gives us. - Type of this parameter. - + - Construct a new that - resolves the given type and name. + Execute the provided on every item in . - Type of this parameter. - Name to use when resolving parameter. + Type of the items stored in + Sequence of items to process. + Code to run over each item. - + - Return a instance that will - return this types value for the parameter. + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the given . - Type that contains the member that needs this parameter. Used - to resolve open generic parameters. - The . + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The conversion function to change TItem -> string. + The resulting string. - + - A generic version of for convenience - when creating them by hand. + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the item's method. - Type of the parameter + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The resulting string. - + - Create a new for the given - generic type and the default name. + A class that lets you + override a named parameter passed to a constructor. - + - Create a new for the given - generic type and name. + Construct a new object that will + override the given named constructor parameter, and pass the given + value. - Name to use to resolve this parameter. + Name of the constructor parameter. + Value to pass for the constructor. - + - Interface defining the behavior of the Unity dependency injection container. + Return a that can be used to give a value + for the given desired dependency. + Current build context. + Type of dependency desired. + a object if this override applies, null if not. - + - Register a type mapping with the container, where the created instances will use - the given . + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. - that will be requested. - that will actually be returned. - Name to use for registration, null if a default registration. - The that controls the lifetime - of the returned instance. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register an instance with the container. + When implemented in derived classes, this method is called from the + method to create the actual objects. - - - Instance registration is much like setting a type as a singleton, except that instead - of the container creating the instance the first time it is requested, the user - creates the instance ahead of type and adds that instance to the container. - - - Type of instance to register (may be an implemented interface instead of the full type). - Object to returned. - Name for registration. - - object that controls how this instance will be managed by the container. - The object that this method was called on (this in C#, Me in Visual Basic). + Key value to create the resolver. + Value to store in the resolver. + The created . - + - Resolve an instance of the requested type with the given name from the container. + A that lets you override + the value for a specified property. - of object to get from the container. - Name of the object to retrieve. - Any overrides for the resolve call. - The retrieved object. - + - Return instances of all registered types requested. + Create an instance of . - - - This method is useful if you've registered multiple types with the same - but different names. - - - Be aware that this method does NOT return an instance for the default (unnamed) registration. - - - The type requested. - Any overrides for the resolve calls. - Set of objects of type . + The property name. + Value to use for the property. - + - Run an existing object through the container and perform injection on it. + Return a that can be used to give a value + for the given desired dependency. - - - This method is useful when you don't control the construction of an - instance (ASP.NET pages or objects created via XAML, for instance) - but you still want properties and other injection performed. - - of object to perform injection on. - Instance to build up. - name to use when looking up the typemappings and other configurations. - Any overrides for the resolve calls. - The resulting object. By default, this will be , but - container extensions may add things like automatic proxy creation which would - cause this to return a different object (but still type compatible with ). + Current build context. + Type of dependency desired. + a object if this override applies, null if not. - + - Run an existing object through the container, and clean it up. + A convenience form of that lets you + specify multiple property overrides in one shot rather than having + to construct multiple objects. - The object to tear down. - + - Add an extension object to the container. + When implemented in derived classes, this method is called from the + method to create the actual objects. - to add. - The object that this method was called on (this in C#, Me in Visual Basic). + Key value to create the resolver. + Value to store in the resolver. + The created . - + - Resolve access to a configuration interface exposed by an extension. + Interface defining the configuration interface exposed by the + Static Factory extension. - Extensions can expose configuration interfaces as well as adding - strategies and policies to the container. This method walks the list of - added extensions and returns the first one that implements the requested type. - - of configuration interface required. - The requested extension's configuration interface, or null if not found. - + - Remove all installed extensions from this container. + Base interface for all extension configuration interfaces. - - - This method removes all extensions from the container, including the default ones - that implement the out-of-the-box behavior. After this method, if you want to use - the container again you will need to either readd the default extensions or replace - them with your own. - - - The registered instances and singletons that have already been set up in this container - do not get removed. - - - The object that this method was called on (this in C#, Me in Visual Basic). - + - Create a child container. + Retrieve the container instance that we are currently configuring. - - A child container shares the parent's configuration, but can be configured with different - settings or lifetime. - The new child container. - + - The parent of this container. + Register the given factory delegate to be called when the container is + asked to resolve . - The parent container, or null if this container doesn't have one. + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. - + - Get a sequence of that describe the current state - of the container. + Register the given factory delegate to be called when the container is + asked to resolve and . + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. - + - A that holds onto the instance given to it. - When the is disposed, - the instance is disposed with it. + Represents the context in which a build-up or tear-down operation runs. - + - Base class for Lifetime managers which need to synchronize calls to - . + Represents the context in which a build-up or tear-down operation runs. - - - The purpose of this class is to provide a basic implementation of the lifetime manager synchronization pattern. - - - Calls to the method of a - instance acquire a lock, and if the instance has not been initialized with a value yet the lock will only be released - when such an initialization takes place by calling the method or if - the build request which resulted in the call to the GetValue method fails. - - - - + - Base class for Lifetime managers - classes that control how - and when instances are created by the Unity container. + Add a new set of resolver override objects to the current build operation. + objects to add. - + - A that controls how instances are - persisted and recovered from an external store. Used to implement - things like singletons and per-http-request lifetime. + Get a object for the given + or null if that dependency hasn't been overridden. + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. - + - Represents a builder policy interface. Since there are no fixed requirements - for policies, it acts as a marker interface from which to derive all other - policy interfaces. + A convenience method to do a new buildup operation on an existing context. + Key to use to build up. + Created object. - + - Retrieve a value from the backing store associated with this Lifetime policy. + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. - the object desired, or null if no such object is currently stored. + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. - + - Stores the given value into backing store for retrieval later. + Gets the head of the strategy chain. - The object to store. + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + - + - Remove the value this lifetime policy is managing from backing store. + Gets the associated with the build. + + The associated with the build. + - + - Retrieve a value from the backing store associated with this Lifetime policy. + Gets the original build key for the build operation. - the object desired, or null if no such object is currently stored. + + The original build key for the build operation. + - + - Stores the given value into backing store for retrieval later. + Get the current build key for the current build operation. - The object being stored. - + - Remove the given object from backing store. + The set of policies that were passed into this context. + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. - + - This interface provides a hook for the builder context to - implement error recovery when a builder strategy throws - an exception. Since we can't get try/finally blocks onto - the call stack for later stages in the chain, we instead - add these objects to the context. If there's an exception, - all the current IRequiresRecovery instances will have - their Recover methods called. + Gets the policies for the current context. + Any policies added to this object are transient + and will be erased at the end of the buildup. + + The policies for the current context. + - + - A method that does whatever is needed to clean up - as part of cleaning up after an exception. + Gets the collection of objects + that need to execute in event of an exception. - - Don't do anything that could throw in this method, - it will cause later recover operations to get skipped - and play real havoc with the stack trace. - - + - Retrieve a value from the backing store associated with this Lifetime policy. + The current object being built up or torn down. - the object desired, or null if no such object is currently stored. - Calls to this method acquire a lock which is released only if a non-null value - has been set for the lifetime manager. + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. - + - Performs the actual retrieval of a value from the backing store associated - with this Lifetime policy. + Flag indicating if the build operation should continue. - the object desired, or null if no such object is currently stored. - This method is invoked by - after it has acquired its lock. + true means that building should not call any more + strategies, false means continue to the next strategy. - + - Stores the given value into backing store for retrieval later. + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. - The object being stored. - Setting a value will attempt to release the lock acquired by - . - + - Performs the actual storage of the given value into backing store for retrieval later. + The build context used to resolve a dependency during the build operation represented by this context. - The object being stored. - This method is invoked by - before releasing its lock. - + - Remove the given object from backing store. + Initialize a new instance of the class. - + - A method that does whatever is needed to clean up - as part of cleaning up after an exception. + Initialize a new instance of the class with a , + , and the + build key used to start this build operation. - - Don't do anything that could throw in this method, - it will cause later recover operations to get skipped - and play real havoc with the stack trace. - + The to use for this context. + The to use for this context. + The to use for this context. + Build key to start building. + The existing object to build up. - + - Retrieve a value from the backing store associated with this Lifetime policy. + Create a new using the explicitly provided + values. - the object desired, or null if no such object is currently stored. + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + Existing object to build up. - + - Stores the given value into backing store for retrieval later. + Create a new using the explicitly provided + values. - The object being stored. + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + The resolver overrides. - + - Remove the given object from backing store. + Add a new set of resolver override objects to the current build operation. + objects to add. - + - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + Get a object for the given + or null if that dependency hasn't been overridden. - 2 + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. - + - Standard Dispose pattern implementation. Not needed, but it keeps FxCop happy. + A convenience method to do a new buildup operation on an existing context. - Always true, since we don't have a finalizer. + Key to use to build up. + Created object. - + - A that holds a weak reference to - it's managed instance. + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. - + - Retrieve a value from the backing store associated with this Lifetime policy. + Gets the head of the strategy chain. - the object desired, or null if no such object is currently stored. - - - - Stores the given value into backing store for retrieval later. - - The object being stored. + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + - + - Remove the given object from backing store. + Get the current build key for the current build operation. - + - A special lifetime manager which works like , - except that in the presence of child containers, each child gets it's own instance - of the object, instead of sharing one in the common parent. + The current object being built up or torn down. + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. - + - An implementation of that - creates instances of the type of the given Lifetime Manager - by resolving them through the container. + Gets the associated with the build. + + The associated with the build. + - + - A builder policy used to create lifetime policy instances. - Used by the LifetimeStrategy when instantiating open - generic types. + Gets the original build key for the build operation. + + The original build key for the build operation. + - + - Create a new instance of . + The set of policies that were passed into this context. - The new instance. + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. - + - The type of Lifetime manager that will be created by this factory. + Gets the policies for the current context. + + Any modifications will be transient (meaning, they will be forgotten when + the outer BuildUp for this context is finished executing). + + + The policies for the current context. + - + - Create a new that will - return instances of the given type, creating them by - resolving through the container. + Gets the collection of objects + that need to execute in event of an exception. - Container to resolve with. - Type of LifetimeManager to create. - + - Create a new instance of . + Flag indicating if the build operation should continue. - The new instance. + true means that building should not call any more + strategies, false means continue to the next strategy. - + - The type of Lifetime manager that will be created by this factory. + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. - + - This is a custom lifetime manager that acts like , - but also provides a signal to the default build plan, marking the type so that - instances are reused across the build up object graph. + The build context used to resolve a dependency during the build operation represented by this context. - + - Construct a new object that does not - itself manage an instance. + Represents that a dependency could not be resolved. - + - Construct a new object that stores the - give value. This value will be returned by - but is not stored in the lifetime manager, nor is the value disposed. - This Lifetime manager is intended only for internal use, which is why the - normal method is not used here. + Initializes a new instance of the class with no extra information. - Value to store. - + - Retrieve a value from the backing store associated with this Lifetime policy. + Initializes a new instance of the class with the given message. - the object desired, or null if no such object is currently stored. + Some random message. - + - Stores the given value into backing store for retrieval later. In this class, - this is a noop, since it has special hooks down in the guts. + Initialize a new instance of the class with the given + message and inner exception. - The object being stored. + Some random message + Inner exception. - + - Remove the given object from backing store. Noop in this class. + Initializes a new instance of the class with the build key of the object begin built. + The build key of the object begin built. - + - A that holds the instances given to it, - keeping one instance per thread. + The exception thrown when injection is attempted on a method + that is an open generic or has out or ref params. - - - This LifetimeManager does not dispose the instances it holds. - - - + - Initializes a new instance of the class. + Construct a new with no + message. - + - Retrieve a value from the backing store associated with this Lifetime policy for the - current thread. + Construct a with the given message - the object desired, or if no such object is currently - stored for the current thread. + Message to return. - + - Stores the given value into backing store for retrieval later when requested - in the current thread. + Construct a with the given message + and inner exception. - The object being stored. + Message to return. + Inner exception - + - Remove the given object from backing store. + Extension methods to provide convenience overloads over the + interface. - Not implemented for this lifetime manager. - + - An implementation that does nothing, - thus ensuring that instances are created new every time. + Start a recursive build up operation to retrieve the default + value for the given type. + Type of object to build. + Parent context. + Resulting object. - + - Retrieve a value from the backing store associated with this Lifetime policy. + Start a recursive build up operation to retrieve the named + implementation for the given type. - the object desired, or null if no such object is currently stored. + Type to resolve. + Parent context. + Name to resolve with. + The resulting object. - + - Stores the given value into backing store for retrieval later. + Add a set of s to the context, specified as a + variable argument list. - The object being stored. + Context to add overrides to. + The overrides. - + - Remove the given object from backing store. + Data structure that stores the set of + objects and executes them when requested. - + - This strategy implements the logic that will call container.ResolveAll - when an array parameter is detected. + Add a new object to this + list. + Object to add. - + - Represents a strategy in the chain of responsibility. - Strategies are required to support both BuildUp and TearDown. + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. - + - Represents a strategy in the chain of responsibility. - Strategies are required to support both BuildUp and TearDown. Although you - can implement this interface directly, you may also choose to use - as the base class for your strategies, as - this class provides useful helper methods and makes support BuildUp and TearDown - optional. + Return the number of recovery objects currently in the stack. - + - Called during the chain of responsibility for a build operation. The - PreBuildUp method is called when the chain is being executed in the - forward direction. + Represents a lifetime container. - Context of the build operation. + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + - + - Called during the chain of responsibility for a build operation. The - PostBuildUp method is called when the chain has finished the PreBuildUp - phase and executes in reverse order from the PreBuildUp calls. + Adds an object to the lifetime container. - Context of the build operation. + The item to be added to the lifetime container. - + - Called during the chain of responsibility for a teardown operation. The - PreTearDown method is called when the chain is being executed in the - forward direction. + Determine if a given object is in the lifetime container. - Context of the teardown operation. + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + - + - Called during the chain of responsibility for a teardown operation. The - PostTearDown method is called when the chain has finished the PreTearDown - phase and executes in reverse order from the PreTearDown calls. + Removes an item from the lifetime container. The item is + not disposed. - Context of the teardown operation. + The item to be removed. - + - Called during the chain of responsibility for a build operation. The - PreBuildUp method is called when the chain is being executed in the - forward direction. + Gets the number of references in the lifetime container - Context of the build operation. + + The number of references in the lifetime container + - + - Called during the chain of responsibility for a build operation. The - PostBuildUp method is called when the chain has finished the PreBuildUp - phase and executes in reverse order from the PreBuildUp calls. + Represents a lifetime container. - Context of the build operation. + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + - + - Called during the chain of responsibility for a teardown operation. The - PreTearDown method is called when the chain is being executed in the - forward direction. + Adds an object to the lifetime container. - Context of the teardown operation. + The item to be added to the lifetime container. - + - Called during the chain of responsibility for a teardown operation. The - PostTearDown method is called when the chain has finished the PreTearDown - phase and executes in reverse order from the PreTearDown calls. + Determine if a given object is in the lifetime container. - Context of the teardown operation. + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + - + - Do the PreBuildUp stage of construction. This is where the actual work is performed. + Releases the resources used by the . - Current build context. - + - An implementation of that is - aware of the build keys used by the Unity container. + Releases the resources used by the . + + true to release managed and unmanaged resources; false to release only unmanaged resources. + - + - Base class that provides an implementation of - which lets you override how the parameter resolvers are created. + Returns an enumerator that iterates through the lifetime container. + + An object that can be used to iterate through the life time container. + - + - A that, when implemented, - will determine which constructor to call from the build plan. + Returns an enumerator that iterates through the lifetime container. + + An object that can be used to iterate through the life time container. + - + - Choose the constructor to call for the given type. + Removes an item from the lifetime container. The item is + not disposed. - Current build context - The to add any - generated resolver objects into. - The chosen constructor. + The item to be removed. - + - Choose the constructor to call for the given type. + Gets the number of references in the lifetime container - Current build context - The to add any - generated resolver objects into. - The chosen constructor. + + The number of references in the lifetime container + - + - Create a instance for the given - . + A custom collection over objects. - Parameter to create the resolver for. - The resolver object. - + - Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + Removes an individual policy type for a build key. - - - Value Condition Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y. - - - The second object to compare. - The first object to compare. + The type of policy to remove. + The key the policy applies. - + - Create a instance for the given - . + Removes all policies from the list. - - This implementation looks for the Unity on the - parameter and uses it to create an instance of - for this parameter. - Parameter to create the resolver for. - The resolver object. - + - An implementation of that is aware - of the build keys used by the Unity container. + Removes a default policy. + The type the policy was registered as. - + - Base class that provides an implementation of - which lets you override how the parameter resolvers are created. + Gets an individual policy. - Attribute that marks methods that should - be called. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. - + - An that will examine the given - types and return a sequence of objects - that should be called as part of building the object. + Get the non default policy. + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. - + - Return the sequence of methods to call while building the target object. + Sets an individual policy. - Current build context. - The to add any - generated resolver objects into. - Sequence of methods to call. + The of the policy. + The policy to be registered. + The key the policy applies. - + - Return the sequence of methods to call while building the target object. + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. - Current build context. - The to add any - generated resolver objects into. - Sequence of methods to call. + The interface to register the policy under. + The default policy to be registered. - + - Create a instance for the given - . + A custom collection wrapper over objects. - Parameter to create the resolver for. - The resolver object. - + - Create a instance for the given - . + Initialize a new instance of a class. - Parameter to create the resolver for. - The resolver object. - + - An implementation of that is aware of - the build keys used by the unity container. + Initialize a new instance of a class with another policy list. + An inner policy list to search. - + - Base class that provides an implementation of - which lets you override how the parameter resolvers are created. + Removes an individual policy type for a build key. + The type of policy to remove. + The key the policy applies. - + - An that returns a sequence - of properties that should be injected for the given type. + Removes all policies from the list. - + - Returns sequence of properties on the given type that - should be set as part of building that object. + Removes a default policy. - Current build context. - The to add any - generated resolver objects into. - Sequence of objects - that contain the properties to set. + The type the policy was registered as. - + - Returns sequence of properties on the given type that - should be set as part of building that object. + Gets an individual policy. - Current build context. - The to add any - generated resolver objects into. - Sequence of objects - that contain the properties to set. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. - + - Create a for the given - property. + Get the non default policy. - Property to create resolver for. - The resolver object. + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. - + - Create a for the given - property. + Sets an individual policy. - Property to create resolver for. - The resolver object. + The of the policy. + The policy to be registered. + The key the policy applies. - + - A strategy that handles Hierarchical lifetimes across a set of parent/child - containers. + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + The interface to register the policy under. + The default policy to be registered. - + - Called during the chain of responsibility for a build operation. The - PreBuildUp method is called when the chain is being executed in the - forward direction. + Gets the number of items in the locator. - Context of the build operation. + + The number of items in the locator. + - + - A implementation that returns - the value set in the constructor. + An implementation of . - + - A that is used at build plan execution time - to resolve a dependent value. + Add a new object to this + list. + Object to add. - + - Get the value for a dependency. + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. - Current build context. - The value for the dependency. - + - Create a new instance of - which will return the given value when resolved. + Return the number of recovery objects currently in the stack. - The value to return. - + - Get the value for a dependency. + Implementation of which will notify an object about + the completion of a BuildUp operation, or start of a TearDown operation. - Current build context. - The value for the dependency. + + This strategy checks the object that is passing through the builder chain to see if it + implements IBuilderAware and if it does, it will call + and . This strategy is meant to be used from the + stage. + - + - An implementation of that stores a - type and name, and at resolution time puts them together into a - . + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + Context of the build operation. - + - Create an instance of - with the given type and name. + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. - The type. - The name (may be null). + Context of the teardown operation. - + - Resolve the value for a dependency. + Implemented on a class when it wants to receive notifications + about the build process. - Current build context. - The value for the dependency. - + - The type that this resolver resolves. + Called by the when the object is being built up. + The key of the object that was just built up. - + - The name that this resolver resolves. + Called by the when the object is being torn down. - + - A that will attempt to - resolve a value, and return null if it cannot rather than throwing. + Enumeration to represent the object builder stages. + + The order of the values in the enumeration is the order in which the stages are run. + - + - Construct a new object - that will attempt to resolve the given name and type from the container. + Strategies in this stage run before creation. Typical work done in this stage might + include strategies that use reflection to set policies into the context that other + strategies would later use. - Type to resolve. Must be a reference type. - Name to resolve with. - + - Construct a new object - that will attempt to resolve the given type from the container. + Strategies in this stage create objects. Typically you will only have a single policy-driven + creation strategy in this stage. - Type to resolve. Must be a reference type. - + - Get the value for a dependency. + Strategies in this stage work on created objects. Typical work done in this stage might + include setter injection and method calls. - Current build context. - The value for the dependency. - + - Type this resolver will resolve. + Strategies in this stage work on objects that are already initialized. Typical work done in + this stage might include looking to see if the object implements some notification interface + to discover when its initialization stage has been completed. - + - Name this resolver will resolve. + Represents a builder policy for mapping build keys. - + - An implementation of that resolves to - to an array populated with the values that result from resolving other instances - of . + Represents a builder policy for mapping build keys. - + - Create an instance of - with the given type and a collection of - instances to use when populating the result. + Maps the build key. - The type. - The resolver policies to use when populating an array. + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. This parameter can be null + (called when getting container registrations). + The new build key. - + - Resolve the value for a dependency. + Initialize a new instance of the with the new build key. - Current build context. - An array pupulated with the results of resolving the resolver policies. + The new build key. - + - An implementation of that selects - the given constructor and creates the appropriate resolvers to call it with - the specified parameters. + Maps the build key. + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping, unused in this implementation. + The new build key. - + - Create an instance of that - will return the given constructor, being passed the given injection values - as parameters. + Represents a strategy for mapping build keys in the build up operation. - The constructor to call. - Set of objects - that describes how to obtain the values for the constructor parameters. - + - Choose the constructor to call for the given type. + Called during the chain of responsibility for a build operation. Looks for the + and if found maps the build key for the current operation. - Current build context - The to add any - generated resolver objects into. - The chosen constructor. + The context for the operation. - + - Helper class for implementing selector policies that need to - set up dependency resolver policies. + An implementation of that can map + generic types. - + - Add dependency resolvers to the parameter set. + Create a new instance + that will map generic types. - Type that's currently being built (used to resolve open generics). - PolicyList to add the resolvers to. - Objects supplying the dependency resolvers. - Result object to store the keys in. + Build key to map to. This must be or contain an open generic type. - + - A implementation that calls the specific - methods with the given parameters. + Maps the build key. + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. + The new build key. - + - Add the given method and parameter collection to the list of methods - that will be returned when the selector's - method is called. + A that will look for a build plan + in the current context. If it exists, it invokes it, otherwise + it creates one and stores it for later, and invokes it. - Method to call. - sequence of objects - that describe how to create the method parameter values. - + - Return the sequence of methods to call while building the target object. + Called during the chain of responsibility for a build operation. - Current build context. - The to add any - generated resolver objects into. - Sequence of methods to call. + The context for the operation. - + - An implemnetation of which returns - the set of specific properties that the selector was configured with. + An implementation of that chooses + constructors based on these criteria: first, pick a constructor marked with the + attribute. If there + isn't one, then choose the constructor with the longest parameter list. If that is ambiguous, + then throw. + Thrown when the constructor to choose is ambiguous. + Attribute used to mark the constructor to call. - + - Add a property that will be par of the set returned when the - is called. + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. - The property to set. - object describing - how to create the value to inject. - + - Returns sequence of properties on the given type that - should be set as part of building that object. + A that, when implemented, + will determine which constructor to call from the build plan. - Current build context. + + + + Choose the constructor to call for the given type. + + Current build context The to add any generated resolver objects into. - Sequence of objects - that contain the properties to set. + The chosen constructor. - + - The build stages we use in the Unity container - strategy pipeline. + Choose the constructor to call for the given type. + Current build context + The to add any + generated resolver objects into. + The chosen constructor. - + - First stage. By default, nothing happens here. + Create a instance for the given + . + Parameter to create the resolver for. + The resolver object. - + - Second stage. Type mapping occurs here. + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + The second object to compare. + The first object to compare. + + Value Condition Less than zero is less than y. Zero equals y. Greater than zero is greater than y. + - + - Third stage. lifetime managers are checked here, - and if they're available the rest of the pipeline is skipped. + Create a instance for the given + . + Parameter to create the resolver for. + The resolver object. - + - Fourth stage. Reflection over constructors, properties, etc. is - performed here. + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. - + - Fifth stage. Instance creation happens here. + Base class for return values from selector policies that + return a MemberInfo of some sort plus a list of parameter + keys to look up the parameter resolvers. - + - Sixth stage. Property sets and method injection happens here. + Base class for return of selector policies that need + to keep track of a set of parameter resolvers. - + - Seventh and final stage. By default, nothing happens here. + Adds the parameter resolver. Resolvers are assumed + to be in the order of the parameters to the member. + The new resolver. - + - Represents the context in which a build-up or tear-down operation runs. + Gets the parameter resolvers. + An array with the parameter resolvers. - + - Represents the context in which a build-up or tear-down operation runs. + Construct a new , storing + the given member info. + Member info to store. - + - Add a new set of resolver override objects to the current build operation. + The member info stored. - objects to add. - + - Get a object for the given - or null if that dependency hasn't been overridden. + Create a new instance which + contains the given constructor. - Type of the dependency. - Resolver to use, or null if no override matches for the current operation. + The constructor to wrap. - + - A convenience method to do a new buildup operation on an existing context. + The constructor this object wraps. - Key to use to build up. - Created object. - + - A convenience method to do a new buildup operation on an existing context. This - overload allows you to specify extra policies which will be in effect for the duration - of the build. + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. - Key defining what to build up. - A delegate that takes a . This - is invoked with the new child context before the build up process starts. This gives callers - the opportunity to customize the context for the build process. - Created object. - + - Gets the head of the strategy chain. + Initializes a new instance of the class. - - The strategy that's first in the chain; returns null if there are no - strategies in the chain. - + The type that is being constructed. + A string representing the constructor being called. + Parameter being resolved. - + - Gets the associated with the build. + Generate the string describing what parameter was being resolved. - - The associated with the build. - + The description string. - + - Gets the original build key for the build operation. + String describing the constructor being set up. - - The original build key for the build operation. - - + - Get the current build key for the current build operation. + Parameter that's being resolved. - + - The set of policies that were passed into this context. + A that emits IL to call constructors + as part of creating a build plan. - This returns the policies passed into the context. - Policies added here will remain after buildup completes. - The persistent policies for the current context. - + - Gets the policies for the current context. + Called during the chain of responsibility for a build operation. - Any policies added to this object are transient - and will be erased at the end of the buildup. - - The policies for the current context. - + Existing object is an instance of . + The context for the operation. - + - Gets the collection of objects - that need to execute in event of an exception. + A helper method used by the generated IL to set up a PerResolveLifetimeManager lifetime manager + if the current object is such. + Current build context. - + - The current object being built up or torn down. + Build up the string that will represent the constructor signature + in any exception message. - - The current object being manipulated by the build operation. May - be null if the object hasn't been created yet. + + - + - Flag indicating if the build operation should continue. + A helper method used by the generated IL to store the current operation in the build context. - true means that building should not call any more - strategies, false means continue to the next strategy. - + - An object representing what is currently being done in the - build chain. Used to report back errors if there's a failure. + A helper method used by the generated IL to store the current operation in the build context. - + - The build context used to resolve a dependency during the build operation represented by this context. + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an interface (usually due to the lack of a type mapping). + The currently being + used for the build of this object. - + - Initialize a new instance of the class. + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an abstract class (usually due to the lack of a type mapping). + The currently being + used for the build of this object. - + - Initialize a new instance of the class with a , - , and the - build key used to start this build operation. + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an delegate other than Func{T} or Func{IEnumerable{T}}. - The to use for this context. - The to use for this context. - The to use for this context. - Build key to start building. - The existing object to build up. + The currently being + used for the build of this object. - + - Create a new using the explicitly provided - values. + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved. - The to use for this context. - The to use for this context. - The set of persistent policies to use for this context. - The set of transient policies to use for this context. It is - the caller's responsibility to ensure that the transient and persistent policies are properly - combined. - Build key for this context. - Existing object to build up. + The currently being + used for the build of this object. - + - Add a new set of resolver override objects to the current build operation. + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved because of an invalid constructor. - objects to add. + The currently being + used for the build of this object. + The signature of the invalid constructor. - + - Get a object for the given - or null if that dependency hasn't been overridden. + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. - Type of the dependency. - Resolver to use, or null if no override matches for the current operation. - + - A convenience method to do a new buildup operation on an existing context. + Initializes a new instance of the class. - Key to use to build up. - Created object. - + - A convenience method to do a new buildup operation on an existing context. This - overload allows you to specify extra policies which will be in effect for the duration - of the build. + Generate the description string. - Key defining what to build up. - A delegate that takes a . This - is invoked with the new child context before the build up process starts. This gives callers - the opportunity to customize the context for the build process. - Created object. + The string. - + - Gets the head of the strategy chain. + Constructor we're trying to call. - - The strategy that's first in the chain; returns null if there are no - strategies in the chain. - - + - Get the current build key for the current build operation. + - + - The current object being built up or torn down. + - - The current object being manipulated by the build operation. May - be null if the object hasn't been created yet. + - + - Gets the associated with the build. + - - The associated with the build. - + - + - Gets the original build key for the build operation. + - - The original build key for the build operation. - + + + + - + - The set of policies that were passed into this context. + Helper method used by generated IL to look up a dependency resolver based on the given key. - This returns the policies passed into the context. - Policies added here will remain after buildup completes. - The persistent policies for the current context. + Current build context. + Type of the dependency being resolved. + Key the resolver was stored under. + The found dependency resolver. - + - Gets the policies for the current context. + Helper method used by generated IL to look up a dependency resolver based on the given key. - - Any modifications will be transient (meaning, they will be forgotten when - the outer BuildUp for this context is finished executing). - - - The policies for the current context. - + Current build context. + Type of the dependency being resolved. + The configured resolver. + The found dependency resolver. - + - Gets the collection of objects - that need to execute in event of an exception. + The type that is to be built with the dynamic build plan. - + - Flag indicating if the build operation should continue. + The context parameter representing the used when the build plan is executed. - true means that building should not call any more - strategies, false means continue to the next strategy. - + - An object representing what is currently being done in the - build chain. Used to report back errors if there's a failure. + + - + - The build context used to resolve a dependency during the build operation represented by this context. + - + - Represents that a dependency could not be resolved. + + - + - Initializes a new instance of the class with no extra information. + + - + - Initializes a new instance of the class with the given message. + An implementation + that constructs a build plan via dynamic IL emission. - Some random message. - + - Initialize a new instance of the class with the given - message and inner exception. + Construct a that + uses the given strategy chain to construct the build plan. - Some random message - Inner exception. + The strategy chain. - + - Initializes a new instance of the class with the build key of the object begin built. + Construct a build plan. - The build key of the object begin built. + The current build context. + The current build key. + The created build plan. - + - The exception thrown when injection is attempted on a method - that is an open generic or has out or ref params. + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. - + - Construct a new with no - message. + Initializes a new instance of the class. - + - Construct a with the given message + Generate the description string. - Message to return. + The string. - + - Construct a with the given message - and inner exception. + Method we're trying to call. - Message to return. - Inner exception - + - Extension methods to provide convenience overloads over the - interface. + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. - + - Start a recursive build up operation to retrieve the default - value for the given type. + Initializes a new instance of the class. - Type of object to build. - Parent context. - Resulting object. + The type that is being constructed. + A string representing the method being called. + Parameter being resolved. - + - Start a recursive build up operation to retrieve the named - implementation for the given type. + Generate the string describing what parameter was being resolved. - Type to resolve. - Parent context. - Name to resolve with. - The resulting object. + The description string. - + - Add a set of s to the context, specified as a - variable argument list. + String describing the method being set up. - Context to add overrides to. - The overrides. - + - Data structure that stores the set of - objects and executes them when requested. + Parameter that's being resolved. - + - Add a new object to this - list. + A that generates IL to call + chosen methods (as specified by the current ) + as part of object build up. - Object to add. - + - Execute the method - of everything in the recovery list. Recoveries will execute - in the opposite order of add - it's a stack. + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + Context of the build operation. - + - Return the number of recovery objects currently in the stack. + A helper method used by the generated IL to store the current operation in the build context. - + - Represents a lifetime container. + A helper method used by the generated IL to store the current operation in the build context. - - A lifetime container tracks the lifetime of an object, and implements - IDisposable. When the container is disposed, any objects in the - container which implement IDisposable are also disposed. - - + - Adds an object to the lifetime container. + A base class that holds the information shared by all operations + performed by the container while setting properties. - The item to be added to the lifetime container. - + - Determine if a given object is in the lifetime container. + Initializes a new instance of the class. - - The item to locate in the lifetime container. - - - Returns true if the object is contained in the lifetime - container; returns false otherwise. - - + - Removes an item from the lifetime container. The item is - not disposed. + Generate the description of this operation. - The item to be removed. + The string. - + - Gets the number of references in the lifetime container + Get a format string used to create the description. Called by + the base method. - - The number of references in the lifetime container - + The format string. - + - Represents a lifetime container. + The property value currently being resolved. - - A lifetime container tracks the lifetime of an object, and implements - IDisposable. When the container is disposed, any objects in the - container which implement IDisposable are also disposed. - - + - Adds an object to the lifetime container. + This class records the information about which property value is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. - The item to be added to the lifetime container. - + - Determine if a given object is in the lifetime container. + Initializes a new instance of the class. - - The item to locate in the lifetime container. - - - Returns true if the object is contained in the lifetime - container; returns false otherwise. - - + - Releases the resources used by the . - + Get a format string used to create the description. Called by + the base method. + + The format string. - + - Releases the managed resources used by the DbDataReader and optionally releases the unmanaged resources. + A that generates IL to resolve properties + on an object being built. - - true to release managed and unmanaged resources; false to release only unmanaged resources. - - + - Returns an enumerator that iterates through the lifetime container. + Called during the chain of responsibility for a build operation. - - An object that can be used to iterate through the life time container. - + The context for the operation. - + - Returns an enumerator that iterates through the lifetime container. + A helper method used by the generated IL to store the current operation in the build context. - - An object that can be used to iterate through the life time container. - - + - Removes an item from the lifetime container. The item is - not disposed. + A helper method used by the generated IL to store the current operation in the build context. - The item to be removed. - + - Gets the number of references in the lifetime container + This class records the information about which property value is currently + being set, and is responsible for generating the error string required when + an error has occurred. - - The number of references in the lifetime container - - + - A custom collection over objects. + Initializes a new instance of the class. + Type property is on. + Name of property being set. - + - Removes an individual policy type for a build key. + Get a format string used to create the description. Called by + the base method. - The type of policy to remove. - The key the policy applies. + The format string. - + - Removes all policies from the list. + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + Context used to build up the object. - + - Removes a default policy. + An that will examine the given + types and return a sequence of objects + that should be called as part of building the object. - The type the policy was registered as. - + - Gets an individual policy. + Return the sequence of methods to call while building the target object. - The interface the policy is registered under. - The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. - The policy list in the chain that the searched for policy was found in, null if the policy was - not found. - The policy in the list, if present; returns null otherwise. + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. - + - Get the non default policy. + An implementation of that selects + methods by looking for the given + attribute on those methods. - The interface the policy is registered under. - The key the policy applies to. - True if the search should be in the local policy list only; otherwise false to search up the parent chain. - The policy list in the chain that the searched for policy was found in, null if the policy was - not found. - The policy in the list if present; returns null otherwise. + Type of attribute used to mark methods + to inject. - + - Sets an individual policy. + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. - The of the policy. - The policy to be registered. - The key the policy applies. + Attribute that marks methods that should + be called. - + - Sets a default policy. When checking for a policy, if no specific individual policy - is available, the default will be used. + Return the sequence of methods to call while building the target object. - The interface to register the policy under. - The default policy to be registered. + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. - + - A custom collection wrapper over objects. + Create a instance for the given + . + Parameter to create the resolver for. + The resolver object. - + - Initialize a new instance of a class. + Create a instance for the given + . + Parameter to create the resolver for. + The resolver object. - + - Initialize a new instance of a class with another policy list. + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. - An inner policy list to search. - + - Removes an individual policy type for a build key. + Create a new instance which + contains the given method. - The type of policy to remove. - The key the policy applies. + The method - + - Removes all policies from the list. + The constructor this object wraps. - + - Removes a default policy. + An that returns a sequence + of properties that should be injected for the given type. - The type the policy was registered as. - + - Gets an individual policy. + Returns sequence of properties on the given type that + should be set as part of building that object. - The interface the policy is registered under. - The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. - The policy list in the chain that the searched for policy was found in, null if the policy was - not found. - The policy in the list, if present; returns null otherwise. + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. - + - Get the non default policy. + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. - The interface the policy is registered under. - The key the policy applies to. - True if the search should be in the local policy list only; otherwise false to search up the parent chain. - The policy list in the chain that the searched for policy was found in, null if the policy was - not found. - The policy in the list if present; returns null otherwise. - + - Sets an individual policy. + Returns sequence of properties on the given type that + should be set as part of building that object. - The of the policy. - The policy to be registered. - The key the policy applies. + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. - + - Sets a default policy. When checking for a policy, if no specific individual policy - is available, the default will be used. + Create a for the given + property. - The interface to register the policy under. - The default policy to be registered. + Property to create resolver for. + The resolver object. - + - Gets the number of items in the locator. + An implementation of that looks + for properties marked with the + attribute that are also settable and not indexers. - - The number of items in the locator. - + - + - Extension methods on to provide convenience - overloads (generic versions, mostly). + Create a for the given + property. + Property to create resolver for. + The resolver object. - + - Removes an individual policy type for a build key. + Objects of this type are returned from + . + This class combines the about + the property with the string key used to look up the resolver + for this property's value. - The type the policy was registered as. - to remove the policy from. - The key the policy applies. - + - Removes a default policy. + Create an instance of + with the given and key. - The type the policy was registered as. - to remove the policy from. + The property. + - + - Gets an individual policy. + PropertyInfo for this property. - The interface the policy is registered under. - to search. - The key the policy applies. - The policy in the list, if present; returns null otherwise. - + - Gets an individual policy. + IDependencyResolverPolicy for this property - The interface the policy is registered under. - to search. - The key the policy applies. - The policy list that actually contains the returned policy. - The policy in the list, if present; returns null otherwise. - + - Gets an individual policy. + Implementation of . - to search. - The interface the policy is registered under. - The key the policy applies. - The policy in the list, if present; returns null otherwise. - + - Gets an individual policy. + A builder policy that lets you keep track of the current + resolvers and will remove them from the given policy set. - to search. - The interface the policy is registered under. - The key the policy applies. - The policy list that actually contains the returned policy. - The policy in the list, if present; returns null otherwise. - + - Gets an individual policy. + Add a new resolver to track by key. - The interface the policy is registered under. - to search. - The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. - The policy in the list, if present; returns null otherwise. + Key that was used to add the resolver to the policy set. - + - Gets an individual policy. + Remove the currently tracked resolvers from the given policy list. - The interface the policy is registered under. - to search. - The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. - The policy list that actually contains the returned policy. - The policy in the list, if present; returns null otherwise. + Policy list to remove the resolvers from. - + - Gets an individual policy. + Add a new resolver to track by key. - to search. - The interface the policy is registered under. - The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. - The policy in the list, if present; returns null otherwise. + Key that was used to add the resolver to the policy set. - + - Get the non default policy. + Remove the currently tracked resolvers from the given policy list. - The interface the policy is registered under. - to search. - The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. - The policy in the list, if present; returns null otherwise. + Policy list to remove the resolvers from. - + - Get the non default policy. + Get an instance that implements , + either the current one in the policy set or creating a new one if it doesn't + exist. - The interface the policy is registered under. - to search. - The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. - The policy list that actually contains the returned policy. - The policy in the list, if present; returns null otherwise. + Policy list to look up from. + Build key to track. + The resolver tracker. - + - Get the non default policy. + Add a key to be tracked to the current tracker. - to search. - The interface the policy is registered under. - The key the policy applies. - true if the policy searches local only; otherwise false to seach up the parent chain. - The policy in the list, if present; returns null otherwise. + Policy list containing the resolvers and trackers. + Build key for the resolvers being tracked. + Key for the resolver. - + - Sets an individual policy. + Remove the resolvers for the given build key. - The interface the policy is registered under. - to add the policy to. - The policy to be registered. - The key the policy applies. + Policy list containing the build key. + Build key. - + - Sets a default policy. When checking for a policy, if no specific individual policy - is available, the default will be used. + An implementation of that + calls back into the build chain to build up the dependency, passing + a type given at compile time as its build key. - The interface to register the policy under. - to add the policy to. - The default policy to be registered. - + - An implementation of . + Create a new instance storing the given type. + Type to resolve. - + - Add a new object to this - list. + Get the value for a dependency. - Object to add. + Current build context. + The value for the dependency. - + - Execute the method - of everything in the recovery list. Recoveries will execute - in the opposite order of add - it's a stack. + This interface defines a standard method to convert any regardless + of the stage enum into a regular, flat strategy chain. - + - Return the number of recovery objects currently in the stack. + Convert this into + a flat . + The flattened . - + - Implementation of which will notify an object about - the completion of a BuildUp operation, or start of a TearDown operation. + Represents a chain of responsibility for builder strategies. - - This strategy checks the object that is passing through the builder chain to see if it - implements IBuilderAware and if it does, it will call - and . This strategy is meant to be used from the - stage. - - + - Called during the chain of responsibility for a build operation. The - PreBuildUp method is called when the chain is being executed in the - forward direction. + Reverse the order of the strategy chain. - Context of the build operation. + The reversed strategy chain. - + - Called during the chain of responsibility for a teardown operation. The - PreTearDown method is called when the chain is being executed in the - forward direction. + Execute this strategy chain against the given context, + calling the Buildup methods on the strategies. - Context of the teardown operation. + Context for the build process. + The build up object - + - Implemented on a class when it wants to receive notifications - about the build process. + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + Context for the teardown process. - + - Called by the when the object is being built up. + A builder policy used to create lifetime policy instances. + Used by the LifetimeStrategy when instantiating open + generic types. - The key of the object that was just built up. - + - Called by the when the object is being torn down. + Create a new instance of . + The new instance. - + - Enumeration to represent the object builder stages. + The type of Lifetime manager that will be created by this factory. - - The order of the values in the enumeration is the order in which the stages are run. - - + - Strategies in this stage run before creation. Typical work done in this stage might - include strategies that use reflection to set policies into the context that other - strategies would later use. + An implementation that uses + a to figure out if an object + has already been created and to update or remove that + object from some backing store. - + - Strategies in this stage create objects. Typically you will only have a single policy-driven - creation strategy in this stage. + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + Context of the build operation. - + - Strategies in this stage work on created objects. Typical work done in this stage might - include setter injection and method calls. + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + Context of the build operation. - + - Strategies in this stage work on objects that are already initialized. Typical work done in - this stage might include looking to see if the object implements some notification interface - to discover when its initialization stage has been completed. + Represents a chain of responsibility for builder strategies partitioned by stages. + The stage enumeration to partition the strategies. - + - Represents a builder policy for mapping build keys. + Initialize a new instance of the class. - + - Represents a builder policy for mapping build keys. + Initialize a new instance of the class with an inner strategy chain to use when building. + The inner strategy chain to use first when finding strategies in the build operation. - + - Maps the build key. + Adds a strategy to the chain at a particular stage. - The build key to map. - Current build context. Used for contextual information - if writing a more sophisticated mapping. This parameter can be null - (called when getting container registrations). - The new build key. + The strategy to add to the chain. + The stage to add the strategy. - + - Initialize a new instance of the with the new build key. + Add a new strategy for the . - The new build key. + The of + The stage to add the strategy. - + - Maps the build key. + Clear the current strategy chain list. - The build key to map. - Current build context. Used for contextual information - if writing a more sophisticated mapping, unused in this implementation. - The new build key. + + This will not clear the inner strategy chain if this instance was created with one. + - + - Represents a strategy for mapping build keys in the build up operation. + Makes a strategy chain based on this instance. + A new . - + - Called during the chain of responsibility for a build operation. Looks for the - and if found maps the build key for the current operation. + Represents a chain of responsibility for builder strategies. - The context for the operation. - + - An implementation of that can map - generic types. + Initialize a new instance of the class. - + - Create a new instance - that will map generic types. + Initialize a new instance of the class with a collection of strategies. - Build key to map to. This must be or contain an open generic type. + A collection of strategies to initialize the chain. - + - Maps the build key. + Adds a strategy to the chain. - The build key to map. - Current build context. Used for contextual information - if writing a more sophisticated mapping. - The new build key. + The strategy to add to the chain. - + - Base class for the current operation stored in the build context. + Adds strategies to the chain. + The strategies to add to the chain. - + - Create a new . + Reverse the order of the strategy chain. - Type currently being built. + The reversed strategy chain. - + - The type that's currently being built. + Execute this strategy chain against the given context to build up. + Context for the build processes. + The build up object - + - A that will look for a build plan - in the current context. If it exists, it invokes it, otherwise - it creates one and stores it for later, and invokes it. + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + Context for the teardown process. - + + + Returns an enumerator that iterates through the collection. + + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + + An object that can be used to iterate through the collection. + + + - Called during the chain of responsibility for a build operation. + Build key used to combine a type object with a string name. Used by + ObjectBuilder to indicate exactly what is being built. - The context for the operation. - + - An implementation of that chooses - constructors based on these criteria: first, pick a constructor marked with the - attribute. If there - isn't one, then choose the constructor with the longest parameter list. If that is ambiguous, - then throw. + Create a new instance with the given + type and name. - Thrown when the constructor to choose is ambiguous. - Attribute used to mark the constructor to call. + to build. + Key to use to look up type mappings and singletons. - + - Create a instance for the given - . + Create a new instance for the default + buildup of the given type. - Parameter to create the resolver for. - The resolver object. + to build. - + - Objects of this type are the return value from . - It encapsulates the desired with the string keys - needed to look up the for each - parameter. + This helper method creates a new instance. It is + initialized for the default key for the given type. + Type to build. + A new instance. - + - Base class for return values from selector policies that - return a memberinfo of some sort plus a list of parameter - keys to look up the parameter resolvers. + This helper method creates a new instance for + the given type and key. + Type to build + Key to use to look up type mappings and singletons. + A new instance initialized with the given type and name. - + - Base class for return of selector policies that need - to keep track of a set of parameter keys. + Compare two instances. + Two instances compare equal + if they contain the same name and the same type. Also, comparing + against a different type will also return false. + Object to compare to. + True if the two keys are equal, false if not. - + - Add a new parameter key to this object. Keys are assumed - to be in the order of the parameters to the constructor. + Calculate a hash code for this instance. - Key for the next parameter to look up. + A hash code. - + - The set of keys for the constructor parameters. + Compare two instances for equality. + Two instances compare equal + if they contain the same name and the same type. + First of the two keys to compare. + Second of the two keys to compare. + True if the values of the keys are the same, else false. - + - Construct a new , storing - the given member info. + Compare two instances for inequality. - Member info to store. + Two instances compare equal + if they contain the same name and the same type. If either field differs + the keys are not equal. + First of the two keys to compare. + Second of the two keys to compare. + false if the values of the keys are the same, else true. - + - The member info stored. + Formats the build key as a string (primarily for debugging). + A readable string representation of the build key. - + - Create a new instance which - contains the given constructor. + Return the stored in this build key. - The constructor to wrap. + The type to build. - + - The constructor this object wraps. + Returns the name stored in this build key. + The name to use when building. - + - Create a object used to host the - dynamically generated build plan. This class creates the - dynamic method in the anonymous hosting assembly provided by - the Silverlight runtime. + A generic version of so that + you can new up a key using generic syntax. + Type for the key. - + - This interface defines a policy that manages creation of the dynamic methods - used by the ObjectBuilder code generation. This way, we can replace the details - of how the dynamic method is created to handle differences in CLR (like Silverlight - vs desktop) or security policies. + Construct a new that + specifies the given type. - + - Create a builder method for the given type, using the given name. + Construct a new that + specifies the given type and name. - Type that will be built by the generated method. - Name to give to the method. - A object with the proper signature to use - as part of a build plan. + Name for the key. - + - Create a builder method for the given type, using the given name. + A series of helper methods to deal with sequences - + objects that implement . - Type that will be built by the generated method. - Name to give to the method. - A object with the proper signature to use - as part of a build plan. - + - This class records the information about which constructor argument is currently - being resolved, and is responsible for generating the error string required when - an error has occurred. + A function that turns an arbitrary parameter list into an + . + Type of arguments. + The items to put into the collection. + An array that contains the values of the . - + - Initializes a new instance of the class. + Given two sequences, return a new sequence containing the corresponding values + from each one. - The type that is being constructed. - A string representing the constructor being called. - Parameter being resolved. + Type of first sequence. + Type of second sequence. + First sequence of items. + Second sequence of items. + New sequence of pairs. This sequence ends when the shorter of sequence1 and sequence2 does. - + - Generate the string describing what parameter was being resolved. + A that lets you register a + delegate with the container to create an object, rather than calling + the object's constructor. - The description string. - + - String describing the constructor being set up. + Base class for all extension objects. - + - Parameter that's being resolved. + The container calls this method when the extension is added. + A instance that gives the + extension access to the internals of the container. - + - A that emits IL to call constructors - as part of creating a build plan. + Initial the container with this extension's functionality. + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. - + - Called during the chain of responsibility for a build operation. + Removes the extension's functions from the container. - Existing object is an instance of . - The context for the operation. + + + This method is called when extensions are being removed from the container. It can be + used to do things like disconnect event handlers or clean up member state. You do not + need to remove strategies or policies here; the container will do that automatically. + + + The default implementation of this method does nothing. + - + - A helper method used by the generated IL to throw an exception if - a dependency cannot be resolved. + The container this extension has been added to. - The currently being - used for the build of this object. + The that this extension has been added to. - + - A helper method used by the generated IL to throw an exception if - a dependency cannot be resolved because of an invalid constructor. + The object used to manipulate + the inner state of the container. - The currently being - used for the build of this object. - The signature of the invalid constructor. - + - A helper method used by the generated IL to throw an exception if - no existing object is present, but the user is attempting to build - an interface (usually due to the lack of a type mapping). + Initialize this extension. This particular extension requires no + initialization work. - The currently being - used for the build of this object. - + - A helper method used by the generated IL to store the current operation in the build context. + Register the given factory delegate to be called when the container is + asked to resolve and . + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. - + - A helper method used by the generated IL to store the current operation in the build context. + Register the given factory delegate to be called when the container is + asked to resolve . + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. - + - A helper method used by the generated IL to set up a PerResolveLifetimeManager lifetime manager - if the current object is such. + An implementation of that + acts as a decorator over another . + This checks to see if the current type being built is the + right one before checking the inner . - Current build context. - + - A class that records that a constructor is about to be call, and is - responsible for generating the error string required when - an error has occurred. + Create an instance of + Type to check for. + Inner override to check after type matches. - + - Initializes a new instance of the class. + Return a that can be used to give a value + for the given desired dependency. + Current build context. + Type of dependency desired. + a object if this override applies, null if not. - + - Generate the description string. + A convenience version of that lets you + specify the type to construct via generics syntax. - The string. + Type to check for. - + - Constructor we're trying to call. + Create an instance of . + Inner override to check after type matches. - + - This object tracks the current state of the build plan generation, - accumulates the IL, provides the preamble & postamble for the dynamic - method, and tracks things like local variables in the generated IL - so that they can be reused across IL generation strategies. + Extension class that adds a set of convenience overloads to the + interface. - + - Create a that is initialized - to handle creation of a dynamic method to build the given type. + Register a type with specific members to be injected. - Type that we're trying to create a build plan for. - An object that actually - creates our object. + Type this registration is for. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Completes generation of the dynamic method and returns the - generated dynamic method delegate. + Register a type mapping with the container. - The created + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping and transient lifetime. + + + that will be requested. + that will actually be returned. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Emit the IL to put the build context on top of the IL stack. + Register a type mapping with the container, where the created instances will use + the given . + that will be requested. + that will actually be returned. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Emit the IL to put the current build key on top of the IL stack. + Register a type mapping with the container. + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + that will be requested. + that will actually be returned. + Container to configure. + Name of this mapping. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Emit the IL to put the current "existing" object on the top of the IL stack. + Register a type mapping with the container, where the created instances will use + the given . + that will be requested. + that will actually be returned. + Container to configure. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Emit the IL to make the top of the IL stack our current "existing" object. + Register a for the given type with the container. + No type mapping is performed for this type. + The type to apply the to. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Emit the IL to load the given object onto the top of the IL stack. + Register a for the given type with the container. + No type mapping is performed for this type. - Type to load on the stack. + The type to configure injection on. + Container to configure. + Name that will be used to request the type. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Emit the IL needed to look up an and - call it to get a value. + Register a for the given type and name with the container. + No type mapping is performed for this type. - Type of the dependency to resolve. - Key to look up the policy by. + The type to apply the to. + Container to configure. + Name that will be used to request the type. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Emit the IL needed to clear the . + Register a type with specific members to be injected. + Container to configure. + Type this registration is for. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Emit the IL needed to either cast the top of the stack to the target type - or unbox it, if it's a value type. + Register a type mapping with the container. - Type to convert the top of the stack to. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping. + + + Container to configure. + that will be requested. + that will actually be returned. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - A helper method used by the generated IL to clear the current operation in the build context. + Register a type mapping with the container. + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + Container to configure. + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Helper method used by generated IL to look up a dependency resolver based on the given key. + Register a type mapping with the container, where the created instances will use + the given . - Current build context. - Type of the dependency being resolved. - Key the resolver was stored under. - The found dependency resolver. + Container to configure. + that will be requested. + that will actually be returned. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - A reflection helper method to make it easier to grab a property getter - for the given property. + Register a for the given type and name with the container. + No type mapping is performed for this type. - Type that implements the property we want. - Type of the property. - Name of the property. - The property getter's . + Container to configure. + The to apply the to. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - A reflection helper method that makes it easier to grab a - for a method. + Register a for the given type and name with the container. + No type mapping is performed for this type. - Type that implements the method we want. - Name of the method. - Types of arguments to the method. - The method's . + Container to configure. + The to configure in the container. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - The underlying that can be used to - emit IL into the generated dynamic method. + Register a for the given type and name with the container. + No type mapping is performed for this type. + Container to configure. + The to apply the to. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - The type we're currently creating the method to build. + Register an instance with the container. + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). - + - A delegate type that defines the signature of the - dynamic method created by the build plans. + Register an instance with the container. - used to build up the object. + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). - - - An implementation of that runs the - given delegate to execute the plan. - - - - - A build plan is an object that, when invoked, will create a new object - or fill in a given existing one. It encapsulates all the information - gathered by the strategies to construct a particular object. - - - - - Creates an instance of this build plan's type, or fills - in the existing type if passed in. - - Context used to build up the object. - - - - An implementation - that constructs a build plan via dynamic IL emission. - - - - - A that can create and return an - for the given build key. - - - - - Create a build plan using the given context and build key. - - Current build context. - Current build key. - The build plan. - - - - Construct a that - uses the given strategy chain to construct the build plan. - - The strategy chain. - - - - Construct a build plan. - - The current build context. - The current build key. - The created build plan. - - - - A that generates IL to call - chosen methods (as specified by the current ) - as part of object build up. - - - - - Called during the chain of responsibility for a build operation. The - PreBuildUp method is called when the chain is being executed in the - forward direction. - - Context of the build operation. - - - - A helper method used by the generated IL to store the current operation in the build context. - - - - - A helper method used by the generated IL to store the current operation in the build context. - - - - - A class that records that a constructor is about to be call, and is - responsible for generating the error string required when - an error has occurred. - - - + - Initializes a new instance of the class. + Register an instance with the container. + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Generate the description string. + Register an instance with the container. - The string. + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Method we're trying to call. + Register an instance with the container. + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). - + - This class records the information about which constructor argument is currently - being resolved, and is responsible for generating the error string required when - an error has occurred. + Register an instance with the container. + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Initializes a new instance of the class. + Register an instance with the container. - The type that is being constructed. - A string representing the method being called. - Parameter being resolved. + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Generate the string describing what parameter was being resolved. + Resolve an instance of the default requested type from the container. - The description string. + of object to get from the container. + Container to resolve from. + Any overrides for the resolve call. + The retrieved object. - + - String describing the method being set up. + Resolve an instance of the requested type with the given name from the container. + of object to get from the container. + Container to resolve from. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. - + - Parameter that's being resolved. + Resolve an instance of the default requested type from the container. + Container to resolve from. + of object to get from the container. + Any overrides for the resolve call. + The retrieved object. - + - A that generates IL to resolve properties - on an object being built. + Return instances of all registered types requested. + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Container to resolve from. + Any overrides for the resolve calls. + Set of objects of type . - + - Called during the chain of responsibility for a build operation. + Run an existing object through the container and perform injection on it. - The context for the operation. + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + of object to perform injection on. + Container to resolve through. + Instance to build up. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). - + - A helper method used by the generated IL to store the current operation in the build context. + Run an existing object through the container and perform injection on it. + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Container to resolve through. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). - + - A helper method used by the generated IL to store the current operation in the build context. + Run an existing object through the container and perform injection on it. + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + Container to resolve through. + of object to perform injection on. + Instance to build up. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). - + - A base class that holds the information shared by all operations - performed by the container while setting properties. + Creates a new extension object and adds it to the container. + Type of to add. The extension type + will be resolved from within the supplied . + Container to add the extension to. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Initializes a new instance of the class. + Resolve access to a configuration interface exposed by an extension. + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + The configuration interface required. + Container to configure. + The requested extension's configuration interface, or null if not found. - + - Generate the description of this operation. + Check if a particular type has been registered with the container with + the default name. - The string. + Container to inspect. + Type to check registration for. + True if this type has been registered, false if not. - + - Get a format string used to create the description. Called by - the base method. + Check if a particular type/name pair has been registered with the container. - The format string. + Container to inspect. + Type to check registration for. + Name to check registration for. + True if this type/name pair has been registered, false if not. - + - The property value currently being resolved. + Check if a particular type has been registered with the container with the default name. + Type to check registration for. + Container to inspect. + True if this type has been registered, false if not. - + - This class records the information about which property value is currently - being resolved, and is responsible for generating the error string required when - an error has occurred. + Check if a particular type/name pair has been registered with the container. + Type to check registration for. + Container to inspect. + Name to check registration for. + True if this type/name pair has been registered, false if not. - + - Initializes a new instance of the class. + The class provides the means for extension objects + to manipulate the internal state of the . - + - Get a format string used to create the description. Called by - the base method. + Store a type/name pair for later resolution. - The format string. + + + When users register type mappings (or other things) with a named key, this method + allows you to register that name with the container so that when the + method is called, that name is included in the list that is returned. + + to register. + Name associated with that type. - + - This class records the information about which property value is currently - being set, and is responsible for generating the error string required when - an error has occurred. + The container that this context is associated with. + The object. - + - Initializes a new instance of the class. + The strategies this container uses. - Type property is on. - Name of property being set. + The that the container uses to build objects. - + - Get a format string used to create the description. Called by - the base method. + The strategies this container uses to construct build plans. - The format string. + The that this container uses when creating + build plans. - + - Build plan for that will - return a func that will resolve the requested type - through this container later. + The policies this container uses. + The the that container uses to build objects. - + - Creates an instance of this build plan's type, or fills - in the existing type if passed in. + The that this container uses. - Context used to build up the object. + The is used to manage objects that the container is managing. - + - An implementation of that selects - methods by looking for the given - attribute on those methods. + This event is raised when the method, + or one of its overloads, is called. - Type of attribute used to mark methods - to inject. - + - Create a instance for the given - . + This event is raised when the method, + or one of its overloads, is called. - Parameter to create the resolver for. - The resolver object. - + - Objects of this type are the return value from . - It encapsulates the desired with the string keys - needed to look up the for each - parameter. + This event is raised when the method is called, providing + the newly created child container to extensions to act on as they see fit. - + - Create a new instance which - contains the given method. + An EventArgs class that holds a string Name. - The method - + - The constructor this object wraps. + Create a new with a null name. - + - Creates an instance of this build plan's type, or fills - in the existing type if passed in. + Create a new with the given name. - Context used to build up the object. + Name to store. - + - An implementation of that looks - for properties marked with the - attribute that are also settable and not indexers. + The name. - + Name used for this EventArg object. - + - Create a for the given - property. + Event argument class for the event. - Property to create resolver for. - The resolver object. - + - Objects of this type are returned from - . - This class combines the about - the property with the string key used to look up the resolver - for this property's value. + Create a new instance of . + Type to map from. + Type to map to. + Name for the registration. + to manage instances. - + - Create an instance of - with the given and key. + Type to map from. - The property. - Key to use to look up the resolver. - + - PropertyInfo for this property. + Type to map to. - + - Key to look up this property's resolver. + to manage instances. - + - Implementation of . + Event argument class for the event. - + - A builder policy that lets you keep track of the current - resolvers and will remove them from the given policy set. + Create a default instance. - + - Add a new resolver to track by key. + Create a instance initialized with the given arguments. - Key that was used to add the resolver to the policy set. + Type of instance being registered. + The instance object itself. + Name to register under, null if default registration. + object that handles how + the instance will be owned. - + - Remove the currently tracked resolvers from the given policy list. + Type of instance being registered. - Policy list to remove the resolvers from. + + Type of instance being registered. + - + - Add a new resolver to track by key. + Instance object being registered. - Key that was used to add the resolver to the policy set. + Instance object being registered - + - Remove the currently tracked resolvers from the given policy list. + that controls ownership of + this instance. - Policy list to remove the resolvers from. - + - Get an instance that implements , - either the current one in the policy set or creating a new one if it doesn't - exist. + A that lets you specify that + an instance of a generic type parameter should be resolved. - Policy list to look up from. - Build key to track. - The resolver tracker. - + - Add a key to be tracked to the current tracker. + Create a new instance that specifies + that the given named generic parameter should be resolved. - Policy list containing the resolvers and trackers. - Build key for the resolvers being tracked. - Key for the resolver. + The generic parameter name to resolve. - + - Remove the resolvers for the given build key. + Create a new instance that specifies + that the given named generic parameter should be resolved. - Policy list containing the build key. - Build key. + The generic parameter name to resolve. + name to use when looking up in the container. - + - An implementation of that - calls back into the build chain to build up the dependency, passing - a type given at compile time as its build key. + Return a instance that will + return this types value for the parameter. + The actual type to resolve. + The resolution key. + The . - + - Create a new instance storing the given type. + A that lets you specify that + an array containing the registered instances of a generic type parameter + should be resolved. - Type to resolve. - + - Get the value for a dependency. + Create a new instance that specifies + that the given named generic parameter should be resolved. - Current build context. - The value for the dependency. + The generic parameter name to resolve. + The values for the elements, that will + be converted to objects. - + - This interface defines a standard method to convert any - regardless - of the stage enum into a regular, flat strategy chain. + Test to see if this parameter value has a matching type for the given type. + Type to check. + True if this parameter value is compatible with type , + false if not. + A type is considered compatible if it is an array type of rank one + and its element type is a generic type parameter with a name matching this generic + parameter name configured for the receiver. - + - Convert this into - a flat . + Return a instance that will + return this types value for the parameter. - The flattened . + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . - + - Represents a chain of responsibility for builder strategies. + Name for the type represented by this . + This may be an actual type name or a generic argument name. - + - Reverse the order of the strategy chain. + A Unity container extension that allows you to configure + which constructors, properties, and methods get injected + via an API rather than through attributes. - The reversed strategy chain. - + - Execute this strategy chain against the given context, - calling the Buildup methods on the strategies. + Initial the container with this extension's functionality. - Context for the build process. - The build up object + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. - + - Execute this strategy chain against the given context, - calling the TearDown methods on the strategies. + API to configure the injection settings for a particular type. - Context for the teardown process. + Type the injection is being configured for. + Objects containing the details on which members to inject and how. + This extension object. - + - An implementation that uses - a to figure out if an object - has already been created and to update or remove that - object from some backing store. + API to configure the injection settings for a particular type/name pair. + Type the injection is being configured for. + Name of registration + Objects containing the details on which members to inject and how. + This extension object. - + - Called during the chain of responsibility for a build operation. The - PreBuildUp method is called when the chain is being executed in the - forward direction. + API to configure the injection settings for a particular type. - Context of the build operation. + Type to configure. + Objects containing the details on which members to inject and how. + This extension object. - + - Called during the chain of responsibility for a build operation. The - PostBuildUp method is called when the chain has finished the PreBuildUp - phase and executes in reverse order from the PreBuildUp calls. + API to configure the injection settings for a particular type/name pair. - Context of the build operation. + Type to configure. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. - + - A that stores objects in the locator and - lifetime container provided by the context. + API to configure the injection settings for a particular type/name pair. + Type of interface/base class being registered (may be null). + Type of actual implementation class being registered. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. - + - Retrieve a value from the backing store associated with this Lifetime policy. + A class that holds the collection of information + for a constructor, so that the container can + be configured to call this constructor. - the object desired, or null if no such object is currently stored. - + - Stores the given value into backing store for retrieval later. + Create a new instance of that looks + for a constructor with the given set of parameters. - The object being stored. + The values for the parameters, that will + be converted to objects. - + - Remove the given object from backing store. + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + Interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. - + - A method that does whatever is needed to clean up - as part of cleaning up after an exception. + An that configures the + container to call a method as part of buildup. - - Don't do anything that could throw in this method, - it will cause later recover operations to get skipped - and play real havok with the stack trace. - - + - An implementation of that does nothing, - ensuring that a new object gets created every time. + Create a new instance which will configure + the container to call the given methods with the given parameters. + Name of the method to call. + Parameter values for the method. - + - Retrieve a value from the backing store associated with this Lifetime policy. + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. - the object desired, or null if no such object is currently stored. + Type of interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. - + - Stores the given value into backing store for retrieval later. + A small function to handle name matching. You can override this + to do things like case insensitive comparisons. - The object being stored. + MethodInfo for the method you're checking. + Name of the method you're looking for. + True if a match, false if not. - + - Remove the given object from backing store. + A class that holds on to the given value and provides + the required + when the container is configured. - + - Represents a chain of responsibility for builder strategies partitioned by stages. + Create an instance of that stores + the given value, using the runtime type of that value as the + type of the parameter. - The stage enumeration to partition the strategies. + Value to be injected for this parameter. - + - Initialize a new instance of the class. + Create an instance of that stores + the given value, associated with the given type. + Type of the parameter. + Value of the parameter - + - Initialize a new instance of the class with an inner strategy chain to use when building. + Return a instance that will + return this types value for the parameter. - The inner strategy chain to use first when finding strategies in the build operation. + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . - + - Adds a strategy to the chain at a particular stage. + A generic version of that makes it a + little easier to specify the type of the parameter. - The strategy to add to the chain. - The stage to add the strategy. + Type of parameter. - + - Add a new strategy for the . + Create a new . - The of - The stage to add the strategy. + Value for the parameter. - + - Clear the current strategy chain list. + This class stores information about which properties to inject, + and will configure the container accordingly. - - This will not clear the inner strategy chain if this instane was created with one. - - + - Makes a strategy chain based on this instance. + Configure the container to inject the given property name, + resolving the value via the container. - A new . + Name of the property to inject. - + - Represents a chain of responsibility for builder strategies. + Configure the container to inject the given property name, + using the value supplied. This value is converted to an + object using the + rules defined by the + method. + Name of property to inject. + Value for property. - + - Initialzie a new instance of the class. + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + Interface being registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. - + - Initialzie a new instance of the class with a colleciton of strategies. + A class that stores a type, and generates a + resolver object that resolves all the named instances or the + type registered in a container. - A collection of strategies to initialize the chain. - + - Adds a strategy to the chain. + Construct a new that + resolves to the given element type and collection of element values. - The strategy to add to the chain. + The type of elements to resolve. + The values for the elements, that will + be converted to objects. - + - Adds strategies to the chain. + Construct a new that + resolves to the given array and element types and collection of element values. - The strategies to add to the chain. + The type for the array of elements to resolve. + The type of elements to resolve. + The values for the elements, that will + be converted to objects. - + - Reverse the order of the strategy chain. + Return a instance that will + return this types value for the parameter. - The reversed strategy chain. + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . - + - Execute this strategy chain against the given context to build up. + A generic version of for convenience + when creating them by hand. - Context for the build processes. - The build up object + Type of the elements for the array of the parameter. - + - Execute this strategy chain against the given context, - calling the TearDown methods on the strategies. + Construct a new that + resolves to the given element generic type with the given element values. - Context for the teardown process. + The values for the elements, that will + be converted to objects. - + - Returns an enumerator that iterates through the collection. + Interface defining the behavior of the Unity dependency injection container. - - - A that can be used to iterate through the collection. - - 1 - + - Returns an enumerator that iterates through a collection. + Register a type mapping with the container, where the created instances will use + the given . - - - An object that can be used to iterate through the collection. - - 2 + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). - + - The almost inevitable collection of extra helper methods on - to augment the rich set of what - Linq already gives us. + Register an instance with the container. + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Execute the provided on every item in . + Resolve an instance of the requested type with the given name from the container. - Type of the items stored in - Sequence of items to process. - Code to run over each item. + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. - + - Create a single string from a sequenc of items, separated by the provided , - and with the conversion to string done by the given . + Return instances of all registered types requested. - This method does basically the same thing as , - but will work on any sequence of items, not just arrays. - Type of items in the sequence. - Sequence of items to convert. - Separator to place between the items in the string. - The conversion function to change TItem -> string. - The resulting string. + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . - + - Create a single string from a sequenc of items, separated by the provided , - and with the conversion to string done by the item's method. + Run an existing object through the container and perform injection on it. - This method does basically the same thing as , - but will work on any sequence of items, not just arrays. - Type of items in the sequence. - Sequence of items to convert. - Separator to place between the items in the string. - The resulting string. + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the TypeMappings and other configurations. + Any overrides for the resolve calls. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). - + - Build key used to combine a type object with a string name. Used by - ObjectBuilder to indicate exactly what is being built. + Run an existing object through the container, and clean it up. + The object to tear down. - + - Create a new instance with the given - type and name. + Add an extension object to the container. - to build. - Key to use to look up type mappings and singletons. + to add. + The object that this method was called on (this in C#, Me in Visual Basic). - + - Create a new instance for the default - buildup of the given type. + Resolve access to a configuration interface exposed by an extension. - to build. + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. - + - This helper method creates a new instance. It is - initialized for the default key for the given type. + Remove all installed extensions from this container. - Type to build. - A new instance. + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). - + - This helper method creates a new instance for - the given type and key. + Create a child container. - Type to build - Key to use to look up type mappings and singletons. - A new instance initialized with the given type and name. + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. - + - Compare two instances. + The parent of this container. - Two instances compare equal - if they contain the same name and the same type. Also, comparing - against a different type will also return false. - Object to compare to. - True if the two keys are equal, false if not. + The parent container, or null if this container doesn't have one. - + - Calculate a hash code for this instance. + Get a sequence of that describe the current state + of the container. - A hash code. - + - Compare two instances for equality. + A that holds a weak reference to + it's managed instance. - Two instances compare equal - if they contain the same name and the same type. - First of the two keys to compare. - Second of the two keys to compare. - True if the values of the keys are the same, else false. - + - Compare two instances for inequality. + Retrieve a value from the backing store associated with this Lifetime policy. - Two instances compare equal - if they contain the same name and the same type. If either field differs - the keys are not equal. - First of the two keys to compare. - Second of the two keys to compare. - false if the values of the keys are the same, else true. + the object desired, or null if no such object is currently stored. - + - Formats the build key as a string (primarily for debugging). + Stores the given value into backing store for retrieval later. - A readable string representation of the build key. + The object being stored. - + - Return the stored in this build key. + Remove the given object from backing store. - The type to build. - + - Returns the name stored in this build key. + An implementation of that + creates instances of the type of the given Lifetime Manager + by resolving them through the container. - The name to use when building. - + - A generic version of so that - you can new up a key using generic syntax. + Create a new that will + return instances of the given type, creating them by + resolving through the container. - Type for the key. + Container to resolve with. + Type of LifetimeManager to create. - + - Construct a new that - specifies the given type. + Create a new instance of . + The new instance. - + - Construct a new that - specifies the given type and name. + The type of Lifetime manager that will be created by this factory. - Name for the key. - + - A series of helper methods to deal with sequences - - objects that implement . + A that holds the instances given to it, + keeping one instance per thread. + + + This LifetimeManager does not dispose the instances it holds. + + - + - A function that turns an arbitrary parameter list into an - . + Initializes a new instance of the class. - Type of arguments. - The items to put into the collection. - An array that contains the values of the . - + - Given two sequences, return a new sequence containing the corresponding values - from each one. + Retrieve a value from the backing store associated with this Lifetime policy for the + current thread. - Type of first sequence. - Type of second sequence. - First sequence of items. - Second sequence of items. - New sequence of pairs. This sequence ends when the shorter of sequence1 and sequence2 does. + the object desired, or if no such object is currently + stored for the current thread. - + - A class that lets you - override a named parameter passed to a constructor. + Stores the given value into backing store for retrieval later when requested + in the current thread. + The object being stored. - + - Construct a new object that will - override the given named constructor parameter, and pass the given - value. + Remove the given object from backing store. - Name of the constructor parameter. - Value to pass for the constructor. + Not implemented for this lifetime manager. - + - Return a that can be used to give a value - for the given desired dependency. + An implementation that does nothing, + thus ensuring that instances are created new every time. - Current build context. - Type of dependency desired. - a object if this override applies, null if not. - + - A convenience form of that lets you - specify multiple parameter overrides in one shot rather than having - to construct multiple objects. + Retrieve a value from the backing store associated with this Lifetime policy. + the object desired, or null if no such object is currently stored. - + - When implemented in derived classes, this method is called from the - method to create the actual objects. + Stores the given value into backing store for retrieval later. - Key value to create the resolver. - Value to store in the resolver. - The created . + The object being stored. - + - A strongly-typed resource class, for looking up localized strings, etc. + Remove the given object from backing store. - + - Returns the cached ResourceManager instance used by this class. + This strategy implements the logic that will call container.ResolveAll + when an array parameter is detected. - + - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. + Do the PreBuildUp stage of construction. This is where the actual work is performed. + Current build context. - + - Looks up a localized string similar to The type {0} has multiple constructors of length {1}. Unable to disambiguate.. + An implementation of that is + aware of the build keys used by the Unity container. - + - Looks up a localized string similar to The provided string argument must not be empty.. + Create a instance for the given + . + + This implementation looks for the Unity on the + parameter and uses it to create an instance of + for this parameter. + Parameter to create the resolver for. + The resolver object. - + - Looks up a localized string similar to The current build operation (build key {2}) failed: {3} (Strategy type {0}, index {1}). + An implementation of that is aware + of the build keys used by the Unity container. - + - Looks up a localized string similar to The current type, {0}, is an interface and cannot be constructed. Are you missing a type mapping?. + Create a instance for the given + . + Parameter to create the resolver for. + The resolver object. - + - Looks up a localized string similar to Cannot extract type from build key {0}.. + An implementation of that is aware of + the build keys used by the unity container. - + - Looks up a localized string similar to The method {0}.{1}({2}) is an open generic method. Open generic methods cannot be injected.. + Create a for the given + property. + Property to create resolver for. + The resolver object. - + - Looks up a localized string similar to The property {0} on type {1} is an indexer. Indexed properties cannot be injected.. + A implementation that returns + the value set in the constructor. - + - Looks up a localized string similar to The method {1} on type {0} has an out parameter. Injection cannot be performed.. + Create a new instance of + which will return the given value when resolved. + The value to return. - + - Looks up a localized string similar to The method {0}.{1}({2}) has at least one out parameter. Methods with out parameters cannot be injected.. + Get the value for a dependency. + Current build context. + The value for the dependency. - + - Looks up a localized string similar to The method {0}.{1}({2}) has at least one ref parameter.Methods with ref parameters cannot be injected.. + An implementation of that stores a + type and name, and at resolution time puts them together into a + . - + - Looks up a localized string similar to The method {1} on type {0} is marked for injection, but it is an open generic method. Injection cannot be performed.. + Create an instance of + with the given type and name. + The type. + The name (may be null). - + - Looks up a localized string similar to The method {0}.{1}({2}) is static. Static methods cannot be injected.. + Resolve the value for a dependency. + Current build context. + The value for the dependency. - + - Looks up a localized string similar to The type {0} is an open generic type. An open generic type cannot be resolved.. + The type that this resolver resolves. - + - Looks up a localized string similar to Resolving parameter "{0}" of constructor {1}. + The name that this resolver resolves. - + - Looks up a localized string similar to The parameter {0} could not be resolved when attempting to call constructor {1}.. + An implementation of that resolves to + to an array populated with the values that result from resolving other instances + of . - + - Looks up a localized string similar to Parameter type inference does not work for null values. Indicate the parameter type explicitly using a properly configured instance of the InjectionParameter or InjectionParameter<T> classes.. + Create an instance of + with the given type and a collection of + instances to use when populating the result. + The type. + The resolver policies to use when populating an array. - + - Looks up a localized string similar to Calling constructor {0}. + Resolve the value for a dependency. + Current build context. + An array populated with the results of resolving the resolver policies. - + - Looks up a localized string similar to Calling method {0}.{1}. + An implementation of that selects + the given constructor and creates the appropriate resolvers to call it with + the specified parameters. - + - Looks up a localized string similar to An item with the given key is already present in the dictionary.. + Create an instance of that + will return the given constructor, being passed the given injection values + as parameters. + The constructor to call. + Set of objects + that describes how to obtain the values for the constructor parameters. - + - Looks up a localized string similar to The lifetime manager is already registered. Lifetime managers cannot be reused, please create a new one.. + Choose the constructor to call for the given type. + Current build context + The to add any + generated resolver objects into. + The chosen constructor. - + - Looks up a localized string similar to The override marker build plan policy has been invoked. This should never happen, looks like a bug in the container.. + Helper class for implementing selector policies that need to + set up dependency resolver policies. - + - Looks up a localized string similar to Resolving parameter "{0}" of method {1}.{2}. + Add dependency resolvers to the parameter set. + Type that's currently being built (used to resolve open generics). + PolicyList to add the resolvers to. + Objects supplying the dependency resolvers. + Result object to store the keys in. - + - Looks up a localized string similar to The value for parameter "{1}" of method {0} could not be resolved. . + A implementation that calls the specific + methods with the given parameters. - + - Looks up a localized string similar to Could not resolve dependency for build key {0}.. + Add the given method and parameter collection to the list of methods + that will be returned when the selector's + method is called. + Method to call. + sequence of objects + that describe how to create the method parameter values. - + - Looks up a localized string similar to The type {0} has multiple constructors marked with the InjectionConstructor attribute. Unable to disambiguate.. + Return the sequence of methods to call while building the target object. + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. - + - Looks up a localized string similar to The supplied type {0} must be an open generic type.. + An implementation of which returns + the set of specific properties that the selector was configured with. - + - Looks up a localized string similar to The supplied type {0} does not have the same number of generic arguments as the target type {1}.. + Add a property that will be par of the set returned when the + is called. + The property to set. + object describing + how to create the value to inject. - + - Looks up a localized string similar to The type {0} does not have an accessible constructor.. + Returns sequence of properties on the given type that + should be set as part of building that object. + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. - + - Looks up a localized string similar to The type {0} does not have a generic argument named "{1}". + The exception thrown by the Unity container when + an attempt to resolve a dependency fails. - + - Looks up a localized string similar to while resolving. + Create a new that records + the exception for the given type and name. + Type requested from the container. + Name requested from the container. + The actual exception that caused the failure of the build. + The build context representing the failed operation. - + - Looks up a localized string similar to The type {0} does not have a constructor that takes the parameters ({1}).. + The type that was being requested from the container at the time of failure. - + - Looks up a localized string similar to The type {0} does not have a public method named {1} that takes the parameters ({2}).. + The name that was being requested from the container at the time of failure. - + - Looks up a localized string similar to The type {0} does not contain an instance property named {1}.. + A class that stores a name and type, and generates a + resolver object that resolves the parameter via the + container. - + - Looks up a localized string similar to The type {0} is not a generic type, and you are attempting to inject a generic parameter named "{1}".. + Construct a new that + resolves to the given type. + Type of this parameter. - + - Looks up a localized string similar to The type {0} is not an array type with rank 1, and you are attempting to use a [DependencyArray] attribute on a parameter or property with this type.. + Construct a new that + resolves the given type and name. + Type of this parameter. + Name to use when resolving parameter. - + - Looks up a localized string similar to Optional dependencies must be reference types. The type {0} is a value type.. + Return a instance that will + return this types value for the parameter. + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . - + - Looks up a localized string similar to The property {0} on type {1} is not settable.. + A generic version of for convenience + when creating them by hand. + Type of the parameter - + - Looks up a localized string similar to The property {0} on type {1} is of type {2}, and cannot be injected with a value of type {3}.. + Create a new for the given + generic type and the default name. - + - Looks up a localized string similar to The value for the property "{0}" could not be resolved.. + Create a new for the given + generic type and name. + Name to use to resolve this parameter. - + - Looks up a localized string similar to The provided string argument must not be empty.. + An implementation of that wraps a Unity container. - - - Looks up a localized string similar to Resolution of the dependency failed, type = "{0}", name = "{1}". - Exception occurred while: {2}. - Exception is: {3} - {4} - ----------------------------------------------- - At the time of the exception, the container was: - . - - - + - Looks up a localized string similar to Resolving {0},{1}. + Initializes a new instance of the class for a container. + The to wrap with the + interface implementation. - + - Looks up a localized string similar to Resolving {0},{1} (mapped from {2}, {3}). + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + 2 - + - Looks up a localized string similar to Resolving value for property {0}.{1}. + When implemented by inheriting classes, this method will do the actual work of resolving + the requested service instance. + Type of instance requested.Name of registered service you want. May be null. + + The requested service instance. + - + - Looks up a localized string similar to The constructor {1} selected for type {0} has ref or out parameters. Such parameters are not supported for constructor injection.. + When implemented by inheriting classes, this method will do the actual work of + resolving all the requested service instances. + Type of service requested. + + Sequence of service instance objects. + - + - Looks up a localized string similar to Setting value for property {0}.{1}. + A static helper class that includes various parameter checking routines. - + - Looks up a localized string similar to The type {0} cannot be constructed. You must configure the container to supply this value.. + Throws if the given argument is null. + if tested value if null. + Argument value to test. + Name of the argument being tested. - + - Looks up a localized string similar to The type {1} cannot be assigned to variables of type {0}.. + Throws an exception if the tested string argument is null or the empty string. + Thrown if string value is null. + Thrown if the string is empty + Argument value to check. + Name of argument being checked. - + - Looks up a localized string similar to <unknown>. + Verifies that an argument type is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy). + The argument type that will be assigned to. + The type of the value being assigned. + Argument name. - + - A that lets you override - the value for a specified property. + Verifies that an argument instance is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy, or instance can be + assigned through a runtime wrapper, as is the case for COM Objects). + The argument type that will be assigned to. + The instance that will be assigned. + Argument name. - + - Create an instance of . + A helper class to manage the names that get registered in the container - The property name. - Value to use for the property. - + - Return a that can be used to give a value - for the given desired dependency. + The build stages we use in the Unity container + strategy pipeline. - Current build context. - Type of dependency desired. - a object if this override applies, null if not. - + - A convenience form of that lets you - specify multiple property overrides in one shot rather than having - to construct multiple objects. + First stage. By default, nothing happens here. - + - When implemented in derived classes, this method is called from the - method to create the actual objects. + Second stage. Type mapping occurs here. - Key value to create the resolver. - Value to store in the resolver. - The created . - + - The exception thrown by the Unity container when - an attempt to resolve a dependency fails. + Third stage. lifetime managers are checked here, + and if they're available the rest of the pipeline is skipped. - + - Create a new that records - the exception for the given type and name. + Fourth stage. Reflection over constructors, properties, etc. is + performed here. - Type requested from the container. - Name requested from the container. - The actual exception that caused the failure of the build. - The build context representing the failed operation. - + - The type that was being requested from the container at the time of failure. + Fifth stage. Instance creation happens here. - + - The name that was being requested from the container at the time of failure. + Sixth stage. Property sets and method injection happens here. - + - Interface defining the configuration interface exposed by the - Static Factory extension. + Seventh and final stage. By default, nothing happens here. - + - Register the given factory delegate to be called when the container is - asked to resolve . + A strongly-typed resource class, for looking up localized strings, etc. - Type that will be requested from the container. - Delegate to invoke to create the instance. - The container extension object this method was invoked on. - + - Register the given factory delegate to be called when the container is - asked to resolve and . + Returns the cached ResourceManager instance used by this class. - Type that will be requested from the container. - The name that will be used when requesting to resolve this type. - Delegate to invoke to create the instance. - The container extension object this method was invoked on. - + - A that lets you register a - delegate with the container to create an object, rather than calling - the object's constructor. + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. - + - Initialize this extension. This particular extension requires no - initialization work. + Looks up a localized string similar to The type {0} has multiple constructors of length {1}. Unable to disambiguate.. - + - Register the given factory delegate to be called when the container is - asked to resolve and . + Looks up a localized string similar to The provided string argument must not be empty.. - Type that will be requested from the container. - The name that will be used when requesting to resolve this type. - Delegate to invoke to create the instance. - The container extension object this method was invoked on. - + - Register the given factory delegate to be called when the container is - asked to resolve . + Looks up a localized string similar to The current build operation (build key {2}) failed: {3} (Strategy type {0}, index {1}). - Type that will be requested from the container. - Delegate to invoke to create the instance. - The container extension object this method was invoked on. - + - An implementation of that - acts as a decorator over another . - This checks to see if the current type being built is the - right one before checking the inner . + Looks up a localized string similar to The current type, {0}, is an abstract class and cannot be constructed. Are you missing a type mapping?. - + - Create an instance of + Looks up a localized string similar to The current type, {0}, is delegate and cannot be constructed. Unity only supports resolving Func<T> and Func<IEnumerable<T>> by default.. - Type to check for. - Inner override to check after type matches. - + - Return a that can be used to give a value - for the given desired dependency. + Looks up a localized string similar to The current type, {0}, is an interface and cannot be constructed. Are you missing a type mapping?. - Current build context. - Type of dependency desired. - a object if this override applies, null if not. - + - A convenience version of that lets you - specify the type to construct via generics syntax. + Looks up a localized string similar to Cannot extract type from build key {0}.. - Type to check for. - + - Create an instance of . + Looks up a localized string similar to The method {0}.{1}({2}) is an open generic method. Open generic methods cannot be injected.. - Inner override to check after type matches. - + - A simple, extensible dependency injection container. + Looks up a localized string similar to The property {0} on type {1} is an indexer. Indexed properties cannot be injected.. - + - Create a default . + Looks up a localized string similar to The method {1} on type {0} has an out parameter. Injection cannot be performed.. - + - Create a with the given parent container. + Looks up a localized string similar to The method {0}.{1}({2}) has at least one out parameter. Methods with out parameters cannot be injected.. - The parent . The current object - will apply its own settings first, and then check the parent for additional ones. - + - RegisterType a type mapping with the container, where the created instances will use - the given . + Looks up a localized string similar to The method {0}.{1}({2}) has at least one ref parameter.Methods with ref parameters cannot be injected.. - that will be requested. - that will actually be returned. - Name to use for registration, null if a default registration. - The that controls the lifetime - of the returned instance. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - RegisterType an instance with the container. + Looks up a localized string similar to The method {1} on type {0} is marked for injection, but it is an open generic method. Injection cannot be performed.. - - - Instance registration is much like setting a type as a singleton, except that instead - of the container creating the instance the first time it is requested, the user - creates the instance ahead of type and adds that instance to the container. - - - Type of instance to register (may be an implemented interface instead of the full type). - Object to returned. - Name for registration. - - If true, the container will take over the lifetime of the instance, - calling Dispose on it (if it's ) when the container is Disposed. - - If false, container will not maintain a strong reference to . User is reponsible - for disposing instance, and for keeping the instance from being garbage collected. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Get an instance of the requested type with the given name from the container. + Looks up a localized string similar to The method {0}.{1}({2}) is static. Static methods cannot be injected.. - of object to get from the container. - Name of the object to retrieve. - Any overrides for the resolve call. - The retrieved object. - + - Return instances of all registered types requested. + Looks up a localized string similar to The type {0} is an open generic type. An open generic type cannot be resolved.. - - - This method is useful if you've registered multiple types with the same - but different names. - - - Be aware that this method does NOT return an instance for the default (unnamed) registration. - - - The type requested. - Any overrides for the resolve calls. - Set of objects of type . - + - Run an existing object through the container and perform injection on it. + Looks up a localized string similar to Resolving parameter "{0}" of constructor {1}. - - - This method is useful when you don't control the construction of an - instance (ASP.NET pages or objects created via XAML, for instance) - but you still want properties and other injection performed. - - of object to perform injection on. - Instance to build up. - name to use when looking up the typemappings and other configurations. - Any overrides for the buildup. - The resulting object. By default, this will be , but - container extensions may add things like automatic proxy creation which would - cause this to return a different object (but still type compatible with ). - + - Run an existing object through the container, and clean it up. + Looks up a localized string similar to The parameter {0} could not be resolved when attempting to call constructor {1}.. - The object to tear down. - + - Add an extension object to the container. + Looks up a localized string similar to Parameter type inference does not work for null values. Indicate the parameter type explicitly using a properly configured instance of the InjectionParameter or InjectionParameter<T> classes.. - to add. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Get access to a configuration interface exposed by an extension. + Looks up a localized string similar to Calling constructor {0}. - Extensions can expose configuration interfaces as well as adding - strategies and policies to the container. This method walks the list of - added extensions and returns the first one that implements the requested type. - - of configuration interface required. - The requested extension's configuration interface, or null if not found. - + - Remove all installed extensions from this container. + Looks up a localized string similar to Calling method {0}.{1}. - - - This method removes all extensions from the container, including the default ones - that implement the out-of-the-box behavior. After this method, if you want to use - the container again you will need to either readd the default extensions or replace - them with your own. - - - The registered instances and singletons that have already been set up in this container - do not get removed. - - - The object that this method was called on (this in C#, Me in Visual Basic). - + - Create a child container. + Looks up a localized string similar to An item with the given key is already present in the dictionary.. - - A child container shares the parent's configuration, but can be configured with different - settings or lifetime. - The new child container. - + - Dispose this container instance. + Looks up a localized string similar to The lifetime manager is already registered. Lifetime managers cannot be reused, please create a new one.. - - Disposing the container also disposes any child containers, - and disposes any instances whose lifetimes are managed - by the container. - - + - Dispose this container instance. + Looks up a localized string similar to The override marker build plan policy has been invoked. This should never happen, looks like a bug in the container.. - - This class doesn't have a finalizer, so will always be true. - True if being called from the IDisposable.Dispose - method, false if being called from a finalizer. - + - Remove policies associated with building this type. This removes the - compiled build plan so that it can be rebuilt with the new settings - the next time this type is resolved. + Looks up a localized string similar to Resolving parameter "{0}" of method {1}.{2}. - Type of object to clear the plan for. - Name the object is being registered with. - + - The parent of this container. + Looks up a localized string similar to The value for parameter "{1}" of method {0} could not be resolved. . - The parent container, or null if this container doesn't have one. - + - Get a sequence of that describe the current state - of the container. + Looks up a localized string similar to Could not resolve dependency for build key {0}.. - + - Implementation of the ExtensionContext that is actually used - by the UnityContainer implementation. + Looks up a localized string similar to The type {0} has multiple constructors marked with the InjectionConstructor attribute. Unable to disambiguate.. - - This is a nested class so that it can access state in the - container that would otherwise be inaccessible. - - + - This event is raised when the method, - or one of its overloads, is called. + Looks up a localized string similar to The supplied type {0} must be an open generic type.. - + - Extension class that adds a set of convenience overloads to the - interface. + Looks up a localized string similar to The supplied type {0} does not have the same number of generic arguments as the target type {1}.. - + - Register a type with specific members to be injected. + Looks up a localized string similar to The type {0} does not have an accessible constructor.. - Type this registration is for. - Container to configure. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a type mapping with the container. + Looks up a localized string similar to The type {0} does not have a generic argument named "{1}". - - - This method is used to tell the container that when asked for type , - actually return an instance of type . This is very useful for - getting instances of interfaces. - - - This overload registers a default mapping and transient lifetime. - - - that will be requested. - that will actually be returned. - Container to configure. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a type mapping with the container, where the created instances will use - the given . + Looks up a localized string similar to while resolving. - that will be requested. - that will actually be returned. - Container to configure. - The that controls the lifetime - of the returned instance. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a type mapping with the container. + Looks up a localized string similar to The type {0} does not have a constructor that takes the parameters ({1}).. - - This method is used to tell the container that when asked for type , - actually return an instance of type . This is very useful for - getting instances of interfaces. - - that will be requested. - that will actually be returned. - Container to configure. - Name of this mapping. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a type mapping with the container, where the created instances will use - the given . + Looks up a localized string similar to The type {0} does not have a public method named {1} that takes the parameters ({2}).. - that will be requested. - that will actually be returned. - Container to configure. - Name to use for registration, null if a default registration. - The that controls the lifetime - of the returned instance. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a for the given type with the container. - No type mapping is performed for this type. + Looks up a localized string similar to The type {0} does not contain an instance property named {1}.. - The type to apply the to. - Container to configure. - The that controls the lifetime - of the returned instance. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a for the given type with the container. - No type mapping is performed for this type. + Looks up a localized string similar to The type {0} is not a generic type, and you are attempting to inject a generic parameter named "{1}".. - The type to configure injection on. - Container to configure. - Name that will be used to request the type. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a for the given type and name with the container. - No type mapping is performed for this type. + Looks up a localized string similar to The type {0} is not an array type with rank 1, and you are attempting to use a [DependencyArray] attribute on a parameter or property with this type.. + + + + + Looks up a localized string similar to Optional dependencies must be reference types. The type {0} is a value type.. + + + + + Looks up a localized string similar to The property {0} on type {1} is not settable.. + + + + + Looks up a localized string similar to The property {0} on type {1} is of type {2}, and cannot be injected with a value of type {3}.. + + + + + Looks up a localized string similar to The value for the property "{0}" could not be resolved.. - The type to apply the to. - Container to configure. - Name that will be used to request the type. - The that controls the lifetime - of the returned instance. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a type with specific members to be injected. + Looks up a localized string similar to The provided string argument must not be empty.. - Container to configure. - Type this registration is for. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + + + Looks up a localized string similar to Resolution of the dependency failed, type = "{0}", name = "{1}". + Exception occurred while: {2}. + Exception is: {3} - {4} + ----------------------------------------------- + At the time of the exception, the container was: + . + + + - Register a type mapping with the container. + Looks up a localized string similar to Resolving {0},{1}. - - - This method is used to tell the container that when asked for type , - actually return an instance of type . This is very useful for - getting instances of interfaces. - - - This overload registers a default mapping. - - - Container to configure. - that will be requested. - that will actually be returned. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a type mapping with the container. + Looks up a localized string similar to Resolving {0},{1} (mapped from {2}, {3}). - - This method is used to tell the container that when asked for type , - actually return an instance of type . This is very useful for - getting instances of interfaces. - - Container to configure. - that will be requested. - that will actually be returned. - Name to use for registration, null if a default registration. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a type mapping with the container, where the created instances will use - the given . + Looks up a localized string similar to Resolving value for property {0}.{1}. - Container to configure. - that will be requested. - that will actually be returned. - The that controls the lifetime - of the returned instance. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a for the given type and name with the container. - No type mapping is performed for this type. + Looks up a localized string similar to The constructor {1} selected for type {0} has ref or out parameters. Such parameters are not supported for constructor injection.. - Container to configure. - The to apply the to. - The that controls the lifetime - of the returned instance. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a for the given type and name with the container. - No type mapping is performed for this type. + Looks up a localized string similar to Setting value for property {0}.{1}. - Container to configure. - The to configure in the container. - Name to use for registration, null if a default registration. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register a for the given type and name with the container. - No type mapping is performed for this type. + Looks up a localized string similar to The type {0} cannot be constructed. You must configure the container to supply this value.. - Container to configure. - The to apply the to. - Name to use for registration, null if a default registration. - The that controls the lifetime - of the returned instance. - Injection configuration objects. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register an instance with the container. + Looks up a localized string similar to The type {1} cannot be assigned to variables of type {0}.. - - - Instance registration is much like setting a type as a singleton, except that instead - of the container creating the instance the first time it is requested, the user - creates the instance ahead of type and adds that instance to the container. - - - This overload does a default registration and has the container take over the lifetime of the instance. - - Type of instance to register (may be an implemented interface instead of the full type). - Container to configure. - Object to returned. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register an instance with the container. + Looks up a localized string similar to <unknown>. - - - Instance registration is much like setting a type as a singleton, except that instead - of the container creating the instance the first time it is requested, the user - creates the instance ahead of type and adds that instance to the container. - - - This overload does a default registration (name = null). - - - Type of instance to register (may be an implemented interface instead of the full type). - Container to configure. - Object to returned. - - object that controls how this instance will be managed by the container. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register an instance with the container. + A simple, extensible dependency injection container. - - - Instance registration is much like setting a type as a singleton, except that instead - of the container creating the instance the first time it is requested, the user - creates the instance ahead of type and adds that instance to the container. - - - This overload automatically has the container take ownership of the . - - Type of instance to register (may be an implemented interface instead of the full type). - Object to returned. - Container to configure. - Name for registration. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register an instance with the container. + Create a default . - - - Instance registration is much like setting a type as a singleton, except that instead - of the container creating the instance the first time it is requested, the user - creates the instance ahead of type and adds that instance to the container. - - - Type of instance to register (may be an implemented interface instead of the full type). - Object to returned. - Container to configure. - Name for registration. - - object that controls how this instance will be managed by the container. - The object that this method was called on (this in C#, Me in Visual Basic). - + - Register an instance with the container. + Create a with the given parent container. - - - Instance registration is much like setting a type as a singleton, except that instead - of the container creating the instance the first time it is requested, the user - creates the instance ahead of type and adds that instance to the container. - - - This overload does a default registration and has the container take over the lifetime of the instance. - - Container to configure. - Type of instance to register (may be an implemented interface instead of the full type). - Object to returned. - The object that this method was called on (this in C#, Me in Visual Basic). + The parent . The current object + will apply its own settings first, and then check the parent for additional ones. - + - Register an instance with the container. + RegisterType a type mapping with the container, where the created instances will use + the given . - - - Instance registration is much like setting a type as a singleton, except that instead - of the container creating the instance the first time it is requested, the user - creates the instance ahead of type and adds that instance to the container. - - - This overload does a default registration (name = null). - - - Container to configure. - Type of instance to register (may be an implemented interface instead of the full type). - Object to returned. - - object that controls how this instance will be managed by the container. + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. The object that this method was called on (this in C#, Me in Visual Basic). - + - Register an instance with the container. + RegisterType an instance with the container. @@ -5394,44 +5464,28 @@ of the container creating the instance the first time it is requested, the user creates the instance ahead of type and adds that instance to the container. - - This overload automatically has the container take ownership of the . - Container to configure. Type of instance to register (may be an implemented interface instead of the full type). Object to returned. Name for registration. + + If true, the container will take over the lifetime of the instance, + calling Dispose on it (if it's ) when the container is Disposed. + + If false, container will not maintain a strong reference to . User is responsible + for disposing instance, and for keeping the instance from being garbage collected. The object that this method was called on (this in C#, Me in Visual Basic). - - - Resolve an instance of the default requested type from the container. - - of object to get from the container. - Container to resolve from. - Any overrides for the resolve call. - The retrieved object. - - - - Resolve an instance of the requested type with the given name from the container. - - of object to get from the container. - Container to resolve from. - Name of the object to retrieve. - Any overrides for the resolve call. - The retrieved object. - - + - Resolve an instance of the default requested type from the container. + Get an instance of the requested type with the given name from the container. - Container to resolve from. of object to get from the container. - Any overrides for the resolve call. + Name of the object to retrieve. + Any overrides for the resolve call. The retrieved object. - + Return instances of all registered types requested. @@ -5444,34 +5498,11 @@ Be aware that this method does NOT return an instance for the default (unnamed) registration. - The type requested. - Container to resolve from. + The type requested. Any overrides for the resolve calls. - Set of objects of type . - - - - Run an existing object through the container and perform injection on it. - - - - This method is useful when you don't control the construction of an - instance (ASP.NET pages or objects created via XAML, for instance) - but you still want properties and other injection performed. - - - This overload uses the default registrations. - - - of object to perform injection on. - Container to resolve through. - Instance to build up. - Any overrides for the buildup. - The resulting object. By default, this will be , but - container extensions may add things like automatic proxy creation which would - cause this to return a different object (but still type compatible with ). + Set of objects of type . - + Run an existing object through the container and perform injection on it. @@ -5481,208 +5512,147 @@ instance (ASP.NET pages or objects created via XAML, for instance) but you still want properties and other injection performed. - of object to perform injection on. - Conatiner to resolve through. + of object to perform injection on. Instance to build up. name to use when looking up the typemappings and other configurations. - Any overrides for the Buildup. + Any overrides for the buildup. The resulting object. By default, this will be , but container extensions may add things like automatic proxy creation which would - cause this to return a different object (but still type compatible with ). + cause this to return a different object (but still type compatible with ). - + - Run an existing object through the container and perform injection on it. + Run an existing object through the container, and clean it up. - - - This method is useful when you don't control the construction of an - instance (ASP.NET pages or objects created via XAML, for instance) - but you still want properties and other injection performed. - - - This overload uses the default registrations. - - - Container to resolve through. - of object to perform injection on. - Instance to build up. - Any overrides for the Buildup. - The resulting object. By default, this will be , but - container extensions may add things like automatic proxy creation which would - cause this to return a different object (but still type compatible with ). + The object to tear down. - + - Creates a new extension object and adds it to the container. + Add an extension object to the container. - Type of to add. The extension type - will be resolved from within the supplied . - Container to add the extension to. + to add. The object that this method was called on (this in C#, Me in Visual Basic). - + - Resolve access to a configuration interface exposed by an extension. + Get access to a configuration interface exposed by an extension. Extensions can expose configuration interfaces as well as adding strategies and policies to the container. This method walks the list of added extensions and returns the first one that implements the requested type. - The configuration interface required. - Container to configure. + of configuration interface required. The requested extension's configuration interface, or null if not found. - - - Check if a particular type has been registered with the container with - the default name. - - Container to inspect. - Type to check registration for. - True if this type has been registered, false if not. - - - - Check if a particular type/name pair has been registered with the container. - - Container to inspect. - Type to check registration for. - Name to check registration for. - True if this type/name pair has been registered, false if not. - - - - Check if a particular type has been registered with the container with the default name. - - Type to check registration for. - Container to inspect. - True if this type has been registered, false if not. - - - - Check if a particular type/name pair has been registered with the container. - - Type to check registration for. - Container to inspect. - Name to check registration for. - True if this type/name pair has been registered, false if not. - - - - This extension supplies the default behavior of the UnityContainer API - by handling the context events and setting policies. - - - - - Install the default container behavior into the container. - - - + - Remove the default behavior from the container. + Remove all installed extensions from this container. + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). - - - This extension installs the default strategies and policies into the container - to implement the standard behavior of the Unity container. - + - This extension installs the default strategies and policies into the container - to implement the standard behavior of the Unity container. + Create a child container. + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. - + - Add the default ObjectBuilder strategies & policies to the container. + Dispose this container instance. + + Disposing the container also disposes any child containers, + and disposes any instances whose lifetimes are managed + by the container. + - + - Add the correct to the policy - set. This version adds the appropriate policy for running on the desktop CLR. + Dispose this container instance. + + This class doesn't have a finalizer, so will always be true. + True if being called from the IDisposable.Dispose + method, false if being called from a finalizer. - + - An implementation of that wraps a Unity container. + Remove policies associated with building this type. This removes the + compiled build plan so that it can be rebuilt with the new settings + the next time this type is resolved. + Type of object to clear the plan for. + Name the object is being registered with. - + - Initializes a new instance of the class for a container. + The parent of this container. - The to wrap with the - interface implementation. + The parent container, or null if this container doesn't have one. - + - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + Get a sequence of that describe the current state + of the container. - 2 - + - When implemented by inheriting classes, this method will do the actual work of resolving - the requested service instance. + Implementation of the ExtensionContext that is actually used + by the UnityContainer implementation. - Type of instance requested.Name of registered service you want. May be null. - - The requested service instance. - + + This is a nested class so that it can access state in the + container that would otherwise be inaccessible. + - + - When implemented by inheriting classes, this method will do the actual work of - resolving all the requested service instances. + This event is raised when the method, + or one of its overloads, is called. - Type of service requested. - - Sequence of service instance objects. - - + - A static helper class that includes various parameter checking routines. + This extension supplies the default behavior of the UnityContainer API + by handling the context events and setting policies. - + - Throws if the given argument is null. + Install the default container behavior into the container. - if tested value if null. - Argument value to test. - Name of the argument being tested. - + - Throws an exception if the tested string argument is null or the empty string. + Remove the default behavior from the container. - Thrown if string value is null. - Thrown if the string is empty - Argument value to check. - Name of argument being checked. - + - Verifies that an argument type is assignable from the provided type (meaning - interfaces are implemented, or classes exist in the base class hierarchy). + This extension installs the default strategies and policies into the container + to implement the standard behavior of the Unity container. - The argument type that will be assigned to. - The type of the value being assigned. - Argument name. - + - Verifies that an argument instance is assignable from the provided type (meaning - interfaces are implemented, or classes exist in the base class hierarchy, or instance can be - assigned through a runtime wrapper, as is the case for COM Objects). + Add the default ObjectBuilder strategies & policies to the container. - The argument type that will be assigned to. - The instance that will be assigned. - Argument name. @@ -5788,7 +5758,7 @@ Another reflection helper class that has extra methods - for dealing with ParameterInfos. + for dealing with ParameterInfo. @@ -5866,6 +5836,15 @@ The type of the elements in this type (if it's an array). + + + Returns all the public constructors defined for the current reflected . + + + An enumeration of ConstructorInfo objects representing all the public instance constructors defined for the + current reflected , but not including the type initializer (static constructor). + + Create a new instance of that @@ -5916,6 +5895,15 @@ Expression describing the property for which the set method is to be extracted. Corresponding . + + + + + + + + + Pull out a object from an expression of the form () => new SomeType() diff --git a/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.XML b/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.XML new file mode 100644 index 0000000..046709a --- /dev/null +++ b/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.XML @@ -0,0 +1,306 @@ + + + + Microsoft.Practices.Unity.RegistrationByConvention + + + + + Provides helper methods to retrieve classes from assemblies. + + + + + Returns all visible, non-abstract classes from . + + The assemblies. + All visible, non-abstract classes found in the assemblies. + is . + contains elements. + All exceptions thrown while getting types from the assemblies are ignored, and the types that can be retrieved are returned. + + + + Returns all visible, non-abstract classes from , and optionally skips errors. + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from . + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from all assemblies located where the application is installed. + + to include the Unity assemblies; otherwise, . Defaults to . + to skip errors; otherwise, . + + All visible, non-abstract classes. + + + If is , all exceptions thrown while loading assemblies or getting types from the assemblies + are ignored, and the types that can be retrieved are returned; otherwise, the original exception is thrown. These exceptions might be wrapped in a + . + + + + + The exception that is thrown when registering multiple types would result in an type mapping being overwritten. + + + + + Initializes a new instance of the class. + + The name for the mapping. + The source type for the mapping. + The type currently mapped. + The new type to map. + + + + Gets the name for the mapping. + + + + + Gets the source type for the mapping. + + + + + Gets the type currently mapped. + + + + + Gets the new type to map. + + + + + Represents a set of types to register and their registration settings. + + + + + Gets types to register. + + + + + Gets a function to get the types that will be requested for each type to configure. + + + + + Gets a function to get the name to use for the registration of each type. + + + + + Gets a function to get the for the registration of each type. Defaults to no lifetime management. + + + + + + Gets a function to get the additional objects for the registration of each type. Defaults to no injection members. + + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + An attempt to override an existing mapping was detected for type {1} wit... + + + + + The set of assemblies contains a null element. + + + + + Provides a set of convenience overloads to the + interface to support registration of multiple types. + + + + + Registers the supplied types by using the specified rules for name, lifetime manager, injection members, and registration types. + + The container to configure. + The types to register. The methods in the class can be used to scan assemblies to get types, and further filtering can be performed using LINQ queries. + A function that gets the types that will be requested for each type to configure. It can be a method from the class or a custom function. Defaults to no registration types, and registers only the supplied types. + A function that gets the name to use for the registration of each type. It can be a method from the or a custom function. Defaults to no name. + A function that gets the for the registration of each type. It can be a method from the class or a custom function. Defaults to no lifetime management. + A function that gets the additional objects for the registration of each type. Defaults to no injection members. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + A new registration would overwrite an existing mapping and is . + + + + Registers the types according to the . + + The container to configure. + The convention to determine which types will be registered and how. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + + + + Provides helper methods to specify the lifetime for a type with registration by convention. + + + + + Returns a . + + The type. + A lifetime manager + + + + Returns a . + + The type. + A container controlled lifetime manager. + + + + Returns a . + + The type. + An externally controlled lifetime manager. + + + + Returns a . + + The type. + A hierarchical lifetime manager. + + + + Returns a . + + The type. + A per resolve lifetime manager. + + + + Returns a . + + The type. + A transient lifetime manager. + + + + Returns a . + + The custom type. + The type. + + A lifetime manager. + + + + + Returns a . + + The type. + A per thread lifetime manager. + + + + Provides helper methods to map types to the types interfaces to which register them. + + + + + Returns no types. + + The type to register. + An empty enumeration. + + + + Returns an enumeration with the interface that matches the name of . + + The type to register. + An enumeration with the first interface matching the name of (for example, if type is MyType, a matching interface is IMyType), + or an empty enumeration if no such interface is found. + + + + Returns an enumeration with all the interfaces implemented by . + + The type to register. + An enumeration with all the interfaces implemented by the implementation type except . + + + + Returns an enumeration with all the interfaces implemented by that belong to the same assembly as implementationType. + + The type to register. + An enumeration with all the interfaces implemented by the implementation type that belong to the same assembly. + + + + Provides helper methods to get type names. + + + + + Returns the type name. + + The type. + The type name. + + + + Returns null for the registration name. + + The type. + + + + diff --git a/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.dll b/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.dll new file mode 100644 index 0000000..e1352b3 Binary files /dev/null and b/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.dll differ diff --git a/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.pri b/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.pri new file mode 100644 index 0000000..f374f27 Binary files /dev/null and b/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.pri differ diff --git a/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.dll b/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.dll new file mode 100644 index 0000000..a122e13 Binary files /dev/null and b/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.dll differ diff --git a/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.xml b/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.xml new file mode 100644 index 0000000..fbd47c0 --- /dev/null +++ b/src/packages/Unity.3.5.1404.0/lib/win8/Microsoft.Practices.Unity.xml @@ -0,0 +1,5916 @@ + + + + Microsoft.Practices.Unity + + + + + Provides access to the names registered for a container. + + + + + Represents a builder policy interface. Since there are no fixed requirements + for policies, it acts as a marker interface from which to derive all other + policy interfaces. + + + + + Gets the names registered for a type. + + The type. + The names registered for . + + + + An implementation + that constructs a build plan for creating objects. + + + + + A that can create and return an + for the given build key. + + + + + Create a build plan using the given context and build key. + + Current build context. + Current build key. + The build plan. + + + + Creates a build plan using the given context and build key. + + Current build context. + Current build key. + + The build plan. + + + + + Provides extension methods to the class due to the introduction + of class in the .NET for Windows Store apps. + + + + + Returns the constructor in that matches the specified constructor parameter types. + + The type to inspect + The constructor parameter types. + The constructor that matches the specified parameter types. + + + + Returns the non-static declared methods of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Returns the non-static method of a type or its based type. + + The type to inspect + The name of the method to seek. + The (closed) parameter type signature of the method. + The discovered + + + + Returns the declared properties of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Determines if the types in a parameter set ordinally matches the set of supplied types. + + + + + + + + Base class for attributes that can be placed on parameters + or properties to specify how to resolve the value for + that parameter or property. + + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + This attribute is used to indicate which constructor to choose when + the container attempts to build a type. + + + + + This attribute is used to mark methods that should be called when + the container is building an object. + + + + + This attribute is used to mark properties and parameters as targets for injection. + + + For properties, this attribute is necessary for injection to happen. For parameters, + it's not needed unless you want to specify additional information to control how + the parameter is resolved. + + + + + Create an instance of with no name. + + + + + Create an instance of with the given name. + + Name to use when resolving this dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + The name specified in the constructor. + + + + + An used to mark a dependency + as optional - the container will try to resolve it, and return null + if the resolution fails rather than throw. + + + + + Construct a new object. + + + + + Construct a new object that + specifies a named dependency. + + Name of the dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + Name of the dependency. + + + + + A that composites other + ResolverOverride objects. The GetResolver operation then + returns the resolver from the first child override that + matches the current context and request. + + + + + Base class for all override objects passed in the + method. + + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Add a new to the collection + that is checked. + + item to add. + + + + Add a set of s to the collection. + + items to add. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Class that returns information about the types registered in a container. + + + + + The type that was passed to the method + as the "from" type, or the only type if type mapping wasn't done. + + + + + The type that this registration is mapped to. If no type mapping was done, the + property and this one will have the same value. + + + + + Name the type was registered under. Null for default registration. + + + + + The registered lifetime manager instance. + + + + + The lifetime manager for this registration. + + + This property will be null if this registration is for an open generic. + + + + A class that overrides + the value injected whenever there is a dependency of the + given type, regardless of where it appears in the object graph. + + + + + Create an instance of to override + the given type with the given value. + + Type of the dependency. + Value to use. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the dependency type using generic syntax. + + Type of the dependency to override. + + + + Construct a new object that will + override the given dependency, and pass the given value. + + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + This class isn't really a collection, it just implements IEnumerable + so that we get use of the nice C# collection initializer syntax. + + + + + Base helper class for creating collections of objects + for use in passing a bunch of them to the resolve call. This base class provides + the mechanics needed to allow you to use the C# collection initializer syntax. + + Concrete type of the this class collects. + Key used to create the underlying override object. + Value that the override returns. + + + + Add a new override to the collection with the given key and value. + + Key - for example, a parameter or property name. + Value - the value to be returned by the override. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Event argument class for the event. + + + + + Construct a new object with the + given child container object. + + An for the newly created child + container. + + + + The newly created child container. + + + + + An extension context for the created child container. + + + + + Base class for subclasses that let you specify that + an instance of a generic type parameter should be resolved. + + + + + Base type for objects that are used to configure parameters for + constructor or method injection, or for getting the value to + be injected into a property. + + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Convert the given set of arbitrary values to a sequence of InjectionParameterValue + objects. The rules are: If it's already an InjectionParameterValue, return it. If + it's a Type, return a ResolvedParameter object for that type. Otherwise return + an InjectionParameter object for that value. + + The values to build the sequence from. + The resulting converted sequence. + + + + Convert an arbitrary value to an InjectionParameterValue object. The rules are: + If it's already an InjectionParameterValue, return it. If it's a Type, return a + ResolvedParameter object for that type. Otherwise return an InjectionParameter + object for that value. + + The value to convert. + The resulting . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved, providing the + value if resolving fails. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A class that lets you specify a factory method the container + will use to create the object. + + This is a significantly easier way to do the same + thing the old static factory extension was used for. + + + + Base class for objects that can be used to configure what + class members get injected by the container. + + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type to register. + Policy list to add policies to. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. This parameter is ignored in this implementation. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + A that can be passed to + to configure a + parameter or property as an optional dependency. + + + + + A base class for implementing classes + that deal in explicit types. + + + + + Create a new that exposes + information about the given . + + Type of the parameter. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + The type of parameter this object represents. + + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Construct a new object that + specifies the given . + + Type of the dependency. + + + + Construct a new object that + specifies the given and . + + Type of the dependency. + Name for the dependency. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that lets you + specify the type of the dependency using generics syntax. + + Type of the dependency. + + + + Construct a new . + + + + + Construct a new with the given + . + + Name of the dependency. + + + + A special lifetime manager which works like , + except that in the presence of child containers, each child gets it's own instance + of the object, instead of sharing one in the common parent. + + + + + A that holds onto the instance given to it. + When the is disposed, + the instance is disposed with it. + + + + + Base class for Lifetime managers which need to synchronize calls to + . + + + + The purpose of this class is to provide a basic implementation of the lifetime manager synchronization pattern. + + + Calls to the method of a + instance acquire a lock, and if the instance has not been initialized with a value yet the lock will only be released + when such an initialization takes place by calling the method or if + the build request which resulted in the call to the GetValue method fails. + + + + + + + Base class for Lifetime managers - classes that control how + and when instances are created by the Unity container. + + + + + A that controls how instances are + persisted and recovered from an external store. Used to implement + things like singletons and per-http-request lifetime. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object to store. + + + + Remove the value this lifetime policy is managing from backing store. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This interface provides a hook for the builder context to + implement error recovery when a builder strategy throws + an exception. Since we can't get try/finally blocks onto + the call stack for later stages in the chain, we instead + add these objects to the context. If there's an exception, + all the current IRequiresRecovery instances will have + their Recover methods called. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + Calls to this method acquire a lock which is released only if a non-null value + has been set for the lifetime manager. + + + + Performs the actual retrieval of a value from the backing store associated + with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + This method is invoked by + after it has acquired its lock. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + Setting a value will attempt to release the lock acquired by + . + + + + Performs the actual storage of the given value into backing store for retrieval later. + + The object being stored. + This method is invoked by + before releasing its lock. + + + + Remove the given object from backing store. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Standard Dispose pattern implementation. Not needed, but it keeps FxCop happy. + + Always true, since we don't have a finalizer. + + + + This is a custom lifetime manager that acts like , + but also provides a signal to the default build plan, marking the type so that + instances are reused across the build up object graph. + + + + + Construct a new object that does not + itself manage an instance. + + + + + Construct a new object that stores the + give value. This value will be returned by + but is not stored in the lifetime manager, nor is the value disposed. + This Lifetime manager is intended only for internal use, which is why the + normal method is not used here. + + Value to store. + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. In this class, + this is a noop, since it has special hooks down in the guts. + + The object being stored. + + + + Remove the given object from backing store. Noop in this class. + + + + + A strategy that handles Hierarchical lifetimes across a set of parent/child + containers. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. Although you + can implement this interface directly, you may also choose to use + as the base class for your strategies, as + this class provides useful helper methods and makes support BuildUp and TearDown + optional. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A that will attempt to + resolve a value, and return null if it cannot rather than throwing. + + + + + A strategy that is used at build plan execution time + to resolve a dependent value. + + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Construct a new object + that will attempt to resolve the given name and type from the container. + + Type to resolve. Must be a reference type. + Name to resolve with. + + + + Construct a new object + that will attempt to resolve the given type from the container. + + Type to resolve. Must be a reference type. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Type this resolver will resolve. + + + + + Name this resolver will resolve. + + + + + Extension methods on to provide convenience + overloads (generic versions, mostly). + + + + + Removes an individual policy type for a build key. + + The type the policy was registered as. + to remove the policy from. + The key the policy applies. + + + + Removes a default policy. + + The type the policy was registered as. + to remove the policy from. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Sets an individual policy. + + The interface the policy is registered under. + to add the policy to. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + to add the policy to. + The default policy to be registered. + + + + Base class for the current operation stored in the build context. + + + + + Create a new . + + Type currently being built. + + + + The type that's currently being built. + + + + + Build plan for that will return a Func that will resolve the requested type + through this container later. + + + + + A build plan is an object that, when invoked, will create a new object + or fill in a given existing one. It encapsulates all the information + gathered by the strategies to construct a particular object. + + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + The almost inevitable collection of extra helper methods on + to augment the rich set of what + LINQ already gives us. + + + + + Execute the provided on every item in . + + Type of the items stored in + Sequence of items to process. + Code to run over each item. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the given . + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The conversion function to change TItem -> string. + The resulting string. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the item's method. + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The resulting string. + + + + A class that lets you + override a named parameter passed to a constructor. + + + + + Construct a new object that will + override the given named constructor parameter, and pass the given + value. + + Name of the constructor parameter. + Value to pass for the constructor. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + A that lets you override + the value for a specified property. + + + + + Create an instance of . + + The property name. + Value to use for the property. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple property overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Interface defining the configuration interface exposed by the + Static Factory extension. + + + + + Base interface for all extension configuration interfaces. + + + + + Retrieve the container instance that we are currently configuring. + + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + Get the current build key for the current build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + Any policies added to this object are transient + and will be erased at the end of the buildup. + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a , + , and the + build key used to start this build operation. + + The to use for this context. + The to use for this context. + The to use for this context. + Build key to start building. + The existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + Existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + The resolver overrides. + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Get the current build key for the current build operation. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + + Any modifications will be transient (meaning, they will be forgotten when + the outer BuildUp for this context is finished executing). + + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Represents that a dependency could not be resolved. + + + + + Initializes a new instance of the class with no extra information. + + + + + Initializes a new instance of the class with the given message. + + Some random message. + + + + Initialize a new instance of the class with the given + message and inner exception. + + Some random message + Inner exception. + + + + Initializes a new instance of the class with the build key of the object begin built. + + The build key of the object begin built. + + + + The exception thrown when injection is attempted on a method + that is an open generic or has out or ref params. + + + + + Construct a new with no + message. + + + + + Construct a with the given message + + Message to return. + + + + Construct a with the given message + and inner exception. + + Message to return. + Inner exception + + + + Extension methods to provide convenience overloads over the + interface. + + + + + Start a recursive build up operation to retrieve the default + value for the given type. + + Type of object to build. + Parent context. + Resulting object. + + + + Start a recursive build up operation to retrieve the named + implementation for the given type. + + Type to resolve. + Parent context. + Name to resolve with. + The resulting object. + + + + Add a set of s to the context, specified as a + variable argument list. + + Context to add overrides to. + The overrides. + + + + Data structure that stores the set of + objects and executes them when requested. + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Releases the resources used by the . + + + + + Releases the resources used by the . + + + true to release managed and unmanaged resources; false to release only unmanaged resources. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + A custom collection over objects. + + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + A custom collection wrapper over objects. + + + + + Initialize a new instance of a class. + + + + + Initialize a new instance of a class with another policy list. + + An inner policy list to search. + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + Gets the number of items in the locator. + + + The number of items in the locator. + + + + + An implementation of . + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Implementation of which will notify an object about + the completion of a BuildUp operation, or start of a TearDown operation. + + + This strategy checks the object that is passing through the builder chain to see if it + implements IBuilderAware and if it does, it will call + and . This strategy is meant to be used from the + stage. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Implemented on a class when it wants to receive notifications + about the build process. + + + + + Called by the when the object is being built up. + + The key of the object that was just built up. + + + + Called by the when the object is being torn down. + + + + + Enumeration to represent the object builder stages. + + + The order of the values in the enumeration is the order in which the stages are run. + + + + + Strategies in this stage run before creation. Typical work done in this stage might + include strategies that use reflection to set policies into the context that other + strategies would later use. + + + + + Strategies in this stage create objects. Typically you will only have a single policy-driven + creation strategy in this stage. + + + + + Strategies in this stage work on created objects. Typical work done in this stage might + include setter injection and method calls. + + + + + Strategies in this stage work on objects that are already initialized. Typical work done in + this stage might include looking to see if the object implements some notification interface + to discover when its initialization stage has been completed. + + + + + Represents a builder policy for mapping build keys. + + + + + Represents a builder policy for mapping build keys. + + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. This parameter can be null + (called when getting container registrations). + The new build key. + + + + Initialize a new instance of the with the new build key. + + The new build key. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping, unused in this implementation. + The new build key. + + + + Represents a strategy for mapping build keys in the build up operation. + + + + + Called during the chain of responsibility for a build operation. Looks for the + and if found maps the build key for the current operation. + + The context for the operation. + + + + An implementation of that can map + generic types. + + + + + Create a new instance + that will map generic types. + + Build key to map to. This must be or contain an open generic type. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. + The new build key. + + + + A that will look for a build plan + in the current context. If it exists, it invokes it, otherwise + it creates one and stores it for later, and invokes it. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + An implementation of that chooses + constructors based on these criteria: first, pick a constructor marked with the + attribute. If there + isn't one, then choose the constructor with the longest parameter list. If that is ambiguous, + then throw. + + Thrown when the constructor to choose is ambiguous. + Attribute used to mark the constructor to call. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + A that, when implemented, + will determine which constructor to call from the build plan. + + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + + The second object to compare. + The first object to compare. + + Value Condition Less than zero is less than y. Zero equals y. Greater than zero is greater than y. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Base class for return values from selector policies that + return a MemberInfo of some sort plus a list of parameter + keys to look up the parameter resolvers. + + + + + Base class for return of selector policies that need + to keep track of a set of parameter resolvers. + + + + + Adds the parameter resolver. Resolvers are assumed + to be in the order of the parameters to the member. + + The new resolver. + + + + Gets the parameter resolvers. + + An array with the parameter resolvers. + + + + Construct a new , storing + the given member info. + + Member info to store. + + + + The member info stored. + + + + + Create a new instance which + contains the given constructor. + + The constructor to wrap. + + + + The constructor this object wraps. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the constructor being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the constructor being set up. + + + + + Parameter that's being resolved. + + + + + A that emits IL to call constructors + as part of creating a build plan. + + + + + Called during the chain of responsibility for a build operation. + + Existing object is an instance of . + The context for the operation. + + + + A helper method used by the generated IL to set up a PerResolveLifetimeManager lifetime manager + if the current object is such. + + Current build context. + + + + Build up the string that will represent the constructor signature + in any exception message. + + + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an interface (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an abstract class (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an delegate other than Func{T} or Func{IEnumerable{T}}. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved because of an invalid constructor. + + The currently being + used for the build of this object. + The signature of the invalid constructor. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Constructor we're trying to call. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + Key the resolver was stored under. + The found dependency resolver. + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + The configured resolver. + The found dependency resolver. + + + + The type that is to be built with the dynamic build plan. + + + + + The context parameter representing the used when the build plan is executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + An implementation + that constructs a build plan via dynamic IL emission. + + + + + Construct a that + uses the given strategy chain to construct the build plan. + + The strategy chain. + + + + Construct a build plan. + + The current build context. + The current build key. + The created build plan. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Method we're trying to call. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the method being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the method being set up. + + + + + Parameter that's being resolved. + + + + + A that generates IL to call + chosen methods (as specified by the current ) + as part of object build up. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A base class that holds the information shared by all operations + performed by the container while setting properties. + + + + + Initializes a new instance of the class. + + + + + Generate the description of this operation. + + The string. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + The property value currently being resolved. + + + + + This class records the information about which property value is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + A that generates IL to resolve properties + on an object being built. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + This class records the information about which property value is currently + being set, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + Type property is on. + Name of property being set. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + An that will examine the given + types and return a sequence of objects + that should be called as part of building the object. + + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of that selects + methods by looking for the given + attribute on those methods. + + Type of attribute used to mark methods + to inject. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + Attribute that marks methods that should + be called. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Create a new instance which + contains the given method. + + The method + + + + The constructor this object wraps. + + + + + An that returns a sequence + of properties that should be injected for the given type. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + An implementation of that looks + for properties marked with the + attribute that are also settable and not indexers. + + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + Objects of this type are returned from + . + This class combines the about + the property with the string key used to look up the resolver + for this property's value. + + + + + Create an instance of + with the given and key. + + The property. + + + + + PropertyInfo for this property. + + + + + IDependencyResolverPolicy for this property + + + + + Implementation of . + + + + + A builder policy that lets you keep track of the current + resolvers and will remove them from the given policy set. + + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Get an instance that implements , + either the current one in the policy set or creating a new one if it doesn't + exist. + + Policy list to look up from. + Build key to track. + The resolver tracker. + + + + Add a key to be tracked to the current tracker. + + Policy list containing the resolvers and trackers. + Build key for the resolvers being tracked. + Key for the resolver. + + + + Remove the resolvers for the given build key. + + Policy list containing the build key. + Build key. + + + + An implementation of that + calls back into the build chain to build up the dependency, passing + a type given at compile time as its build key. + + + + + Create a new instance storing the given type. + + Type to resolve. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + This interface defines a standard method to convert any regardless + of the stage enum into a regular, flat strategy chain. + + + + + Convert this into + a flat . + + The flattened . + + + + Represents a chain of responsibility for builder strategies. + + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context, + calling the Buildup methods on the strategies. + + Context for the build process. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + A builder policy used to create lifetime policy instances. + Used by the LifetimeStrategy when instantiating open + generic types. + + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + An implementation that uses + a to figure out if an object + has already been created and to update or remove that + object from some backing store. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Represents a chain of responsibility for builder strategies partitioned by stages. + + The stage enumeration to partition the strategies. + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with an inner strategy chain to use when building. + + The inner strategy chain to use first when finding strategies in the build operation. + + + + Adds a strategy to the chain at a particular stage. + + The strategy to add to the chain. + The stage to add the strategy. + + + + Add a new strategy for the . + + The of + The stage to add the strategy. + + + + Clear the current strategy chain list. + + + This will not clear the inner strategy chain if this instance was created with one. + + + + + Makes a strategy chain based on this instance. + + A new . + + + + Represents a chain of responsibility for builder strategies. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a collection of strategies. + + A collection of strategies to initialize the chain. + + + + Adds a strategy to the chain. + + The strategy to add to the chain. + + + + Adds strategies to the chain. + + The strategies to add to the chain. + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context to build up. + + Context for the build processes. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + Returns an enumerator that iterates through the collection. + + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + + An object that can be used to iterate through the collection. + + + + + Build key used to combine a type object with a string name. Used by + ObjectBuilder to indicate exactly what is being built. + + + + + Create a new instance with the given + type and name. + + to build. + Key to use to look up type mappings and singletons. + + + + Create a new instance for the default + buildup of the given type. + + to build. + + + + This helper method creates a new instance. It is + initialized for the default key for the given type. + + Type to build. + A new instance. + + + + This helper method creates a new instance for + the given type and key. + + Type to build + Key to use to look up type mappings and singletons. + A new instance initialized with the given type and name. + + + + Compare two instances. + + Two instances compare equal + if they contain the same name and the same type. Also, comparing + against a different type will also return false. + Object to compare to. + True if the two keys are equal, false if not. + + + + Calculate a hash code for this instance. + + A hash code. + + + + Compare two instances for equality. + + Two instances compare equal + if they contain the same name and the same type. + First of the two keys to compare. + Second of the two keys to compare. + True if the values of the keys are the same, else false. + + + + Compare two instances for inequality. + + Two instances compare equal + if they contain the same name and the same type. If either field differs + the keys are not equal. + First of the two keys to compare. + Second of the two keys to compare. + false if the values of the keys are the same, else true. + + + + Formats the build key as a string (primarily for debugging). + + A readable string representation of the build key. + + + + Return the stored in this build key. + + The type to build. + + + + Returns the name stored in this build key. + + The name to use when building. + + + + A generic version of so that + you can new up a key using generic syntax. + + Type for the key. + + + + Construct a new that + specifies the given type. + + + + + Construct a new that + specifies the given type and name. + + Name for the key. + + + + A series of helper methods to deal with sequences - + objects that implement . + + + + + A function that turns an arbitrary parameter list into an + . + + Type of arguments. + The items to put into the collection. + An array that contains the values of the . + + + + Given two sequences, return a new sequence containing the corresponding values + from each one. + + Type of first sequence. + Type of second sequence. + First sequence of items. + Second sequence of items. + New sequence of pairs. This sequence ends when the shorter of sequence1 and sequence2 does. + + + + A that lets you register a + delegate with the container to create an object, rather than calling + the object's constructor. + + + + + Base class for all extension objects. + + + + + The container calls this method when the extension is added. + + A instance that gives the + extension access to the internals of the container. + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + Removes the extension's functions from the container. + + + + This method is called when extensions are being removed from the container. It can be + used to do things like disconnect event handlers or clean up member state. You do not + need to remove strategies or policies here; the container will do that automatically. + + + The default implementation of this method does nothing. + + + + + The container this extension has been added to. + + The that this extension has been added to. + + + + The object used to manipulate + the inner state of the container. + + + + + Initialize this extension. This particular extension requires no + initialization work. + + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + An implementation of that + acts as a decorator over another . + This checks to see if the current type being built is the + right one before checking the inner . + + + + + Create an instance of + + Type to check for. + Inner override to check after type matches. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the type to construct via generics syntax. + + Type to check for. + + + + Create an instance of . + + Inner override to check after type matches. + + + + Extension class that adds a set of convenience overloads to the + interface. + + + + + Register a type with specific members to be injected. + + Type this registration is for. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping and transient lifetime. + + + that will be requested. + that will actually be returned. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + that will be requested. + that will actually be returned. + Container to configure. + Name of this mapping. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to configure injection on. + Container to configure. + Name that will be used to request the type. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + Name that will be used to request the type. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type with specific members to be injected. + + Container to configure. + Type this registration is for. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping. + + + Container to configure. + that will be requested. + that will actually be returned. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + Container to configure. + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + Container to configure. + that will be requested. + that will actually be returned. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to configure in the container. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the default requested type from the container. + + of object to get from the container. + Container to resolve from. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Container to resolve from. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the default requested type from the container. + + Container to resolve from. + of object to get from the container. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Container to resolve from. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + of object to perform injection on. + Container to resolve through. + Instance to build up. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Container to resolve through. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + Container to resolve through. + of object to perform injection on. + Instance to build up. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Creates a new extension object and adds it to the container. + + Type of to add. The extension type + will be resolved from within the supplied . + Container to add the extension to. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + The configuration interface required. + Container to configure. + The requested extension's configuration interface, or null if not found. + + + + Check if a particular type has been registered with the container with + the default name. + + Container to inspect. + Type to check registration for. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Container to inspect. + Type to check registration for. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + Check if a particular type has been registered with the container with the default name. + + Type to check registration for. + Container to inspect. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Type to check registration for. + Container to inspect. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + The class provides the means for extension objects + to manipulate the internal state of the . + + + + + Store a type/name pair for later resolution. + + + + When users register type mappings (or other things) with a named key, this method + allows you to register that name with the container so that when the + method is called, that name is included in the list that is returned. + + to register. + Name associated with that type. + + + + The container that this context is associated with. + + The object. + + + + The strategies this container uses. + + The that the container uses to build objects. + + + + The strategies this container uses to construct build plans. + + The that this container uses when creating + build plans. + + + + The policies this container uses. + + The the that container uses to build objects. + + + + The that this container uses. + + The is used to manage objects that the container is managing. + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method is called, providing + the newly created child container to extensions to act on as they see fit. + + + + + An EventArgs class that holds a string Name. + + + + + Create a new with a null name. + + + + + Create a new with the given name. + + Name to store. + + + + The name. + + Name used for this EventArg object. + + + + Event argument class for the event. + + + + + Create a new instance of . + + Type to map from. + Type to map to. + Name for the registration. + to manage instances. + + + + Type to map from. + + + + + Type to map to. + + + + + to manage instances. + + + + + Event argument class for the event. + + + + + Create a default instance. + + + + + Create a instance initialized with the given arguments. + + Type of instance being registered. + The instance object itself. + Name to register under, null if default registration. + object that handles how + the instance will be owned. + + + + Type of instance being registered. + + + Type of instance being registered. + + + + + Instance object being registered. + + Instance object being registered + + + + that controls ownership of + this instance. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A that lets you specify that + an array containing the registered instances of a generic type parameter + should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + The values for the elements, that will + be converted to objects. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + A type is considered compatible if it is an array type of rank one + and its element type is a generic type parameter with a name matching this generic + parameter name configured for the receiver. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A Unity container extension that allows you to configure + which constructors, properties, and methods get injected + via an API rather than through attributes. + + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + API to configure the injection settings for a particular type. + + Type the injection is being configured for. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type the injection is being configured for. + Name of registration + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type. + + Type to configure. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type to configure. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type of interface/base class being registered (may be null). + Type of actual implementation class being registered. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + A class that holds the collection of information + for a constructor, so that the container can + be configured to call this constructor. + + + + + Create a new instance of that looks + for a constructor with the given set of parameters. + + The values for the parameters, that will + be converted to objects. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + An that configures the + container to call a method as part of buildup. + + + + + Create a new instance which will configure + the container to call the given methods with the given parameters. + + Name of the method to call. + Parameter values for the method. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A small function to handle name matching. You can override this + to do things like case insensitive comparisons. + + MethodInfo for the method you're checking. + Name of the method you're looking for. + True if a match, false if not. + + + + A class that holds on to the given value and provides + the required + when the container is configured. + + + + + Create an instance of that stores + the given value, using the runtime type of that value as the + type of the parameter. + + Value to be injected for this parameter. + + + + Create an instance of that stores + the given value, associated with the given type. + + Type of the parameter. + Value of the parameter + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that makes it a + little easier to specify the type of the parameter. + + Type of parameter. + + + + Create a new . + + Value for the parameter. + + + + This class stores information about which properties to inject, + and will configure the container accordingly. + + + + + Configure the container to inject the given property name, + resolving the value via the container. + + Name of the property to inject. + + + + Configure the container to inject the given property name, + using the value supplied. This value is converted to an + object using the + rules defined by the + method. + + Name of property to inject. + Value for property. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface being registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A class that stores a type, and generates a + resolver object that resolves all the named instances or the + type registered in a container. + + + + + Construct a new that + resolves to the given element type and collection of element values. + + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Construct a new that + resolves to the given array and element types and collection of element values. + + The type for the array of elements to resolve. + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the elements for the array of the parameter. + + + + Construct a new that + resolves to the given element generic type with the given element values. + + The values for the elements, that will + be converted to objects. + + + + Interface defining the behavior of the Unity dependency injection container. + + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the TypeMappings and other configurations. + Any overrides for the resolve calls. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + A that holds a weak reference to + it's managed instance. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + An implementation of that + creates instances of the type of the given Lifetime Manager + by resolving them through the container. + + + + + Create a new that will + return instances of the given type, creating them by + resolving through the container. + + Container to resolve with. + Type of LifetimeManager to create. + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + A that holds the instances given to it, + keeping one instance per thread. + + + + This LifetimeManager does not dispose the instances it holds. + + + + + + Initializes a new instance of the class. + + + + + Retrieve a value from the backing store associated with this Lifetime policy for the + current thread. + + the object desired, or if no such object is currently + stored for the current thread. + + + + Stores the given value into backing store for retrieval later when requested + in the current thread. + + The object being stored. + + + + Remove the given object from backing store. + + Not implemented for this lifetime manager. + + + + An implementation that does nothing, + thus ensuring that instances are created new every time. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This strategy implements the logic that will call container.ResolveAll + when an array parameter is detected. + + + + + Do the PreBuildUp stage of construction. This is where the actual work is performed. + + Current build context. + + + + An implementation of that is + aware of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + + This implementation looks for the Unity on the + parameter and uses it to create an instance of + for this parameter. + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware + of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware of + the build keys used by the unity container. + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + A implementation that returns + the value set in the constructor. + + + + + Create a new instance of + which will return the given value when resolved. + + The value to return. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + An implementation of that stores a + type and name, and at resolution time puts them together into a + . + + + + + Create an instance of + with the given type and name. + + The type. + The name (may be null). + + + + Resolve the value for a dependency. + + Current build context. + The value for the dependency. + + + + The type that this resolver resolves. + + + + + The name that this resolver resolves. + + + + + An implementation of that resolves to + to an array populated with the values that result from resolving other instances + of . + + + + + Create an instance of + with the given type and a collection of + instances to use when populating the result. + + The type. + The resolver policies to use when populating an array. + + + + Resolve the value for a dependency. + + Current build context. + An array populated with the results of resolving the resolver policies. + + + + An implementation of that selects + the given constructor and creates the appropriate resolvers to call it with + the specified parameters. + + + + + Create an instance of that + will return the given constructor, being passed the given injection values + as parameters. + + The constructor to call. + Set of objects + that describes how to obtain the values for the constructor parameters. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Helper class for implementing selector policies that need to + set up dependency resolver policies. + + + + + Add dependency resolvers to the parameter set. + + Type that's currently being built (used to resolve open generics). + PolicyList to add the resolvers to. + Objects supplying the dependency resolvers. + Result object to store the keys in. + + + + A implementation that calls the specific + methods with the given parameters. + + + + + Add the given method and parameter collection to the list of methods + that will be returned when the selector's + method is called. + + Method to call. + sequence of objects + that describe how to create the method parameter values. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of which returns + the set of specific properties that the selector was configured with. + + + + + Add a property that will be par of the set returned when the + is called. + + The property to set. + object describing + how to create the value to inject. + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + The exception thrown by the Unity container when + an attempt to resolve a dependency fails. + + + + + Create a new that records + the exception for the given type and name. + + Type requested from the container. + Name requested from the container. + The actual exception that caused the failure of the build. + The build context representing the failed operation. + + + + The type that was being requested from the container at the time of failure. + + + + + The name that was being requested from the container at the time of failure. + + + + + A class that stores a name and type, and generates a + resolver object that resolves the parameter via the + container. + + + + + Construct a new that + resolves to the given type. + + Type of this parameter. + + + + Construct a new that + resolves the given type and name. + + Type of this parameter. + Name to use when resolving parameter. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the parameter + + + + Create a new for the given + generic type and the default name. + + + + + Create a new for the given + generic type and name. + + Name to use to resolve this parameter. + + + + An implementation of that wraps a Unity container. + + + + + Initializes a new instance of the class for a container. + + The to wrap with the + interface implementation. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + When implemented by inheriting classes, this method will do the actual work of resolving + the requested service instance. + + Type of instance requested.Name of registered service you want. May be null. + + The requested service instance. + + + + + When implemented by inheriting classes, this method will do the actual work of + resolving all the requested service instances. + + Type of service requested. + + Sequence of service instance objects. + + + + + A static helper class that includes various parameter checking routines. + + + + + Throws if the given argument is null. + + if tested value if null. + Argument value to test. + Name of the argument being tested. + + + + Throws an exception if the tested string argument is null or the empty string. + + Thrown if string value is null. + Thrown if the string is empty + Argument value to check. + Name of argument being checked. + + + + Verifies that an argument type is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy). + + The argument type that will be assigned to. + The type of the value being assigned. + Argument name. + + + + Verifies that an argument instance is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy, or instance can be + assigned through a runtime wrapper, as is the case for COM Objects). + + The argument type that will be assigned to. + The instance that will be assigned. + Argument name. + + + + A helper class to manage the names that get registered in the container + + + + + The build stages we use in the Unity container + strategy pipeline. + + + + + First stage. By default, nothing happens here. + + + + + Second stage. Type mapping occurs here. + + + + + Third stage. lifetime managers are checked here, + and if they're available the rest of the pipeline is skipped. + + + + + Fourth stage. Reflection over constructors, properties, etc. is + performed here. + + + + + Fifth stage. Instance creation happens here. + + + + + Sixth stage. Property sets and method injection happens here. + + + + + Seventh and final stage. By default, nothing happens here. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The type {0} has multiple constructors of length {1}. Unable to disambiguate.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to The current build operation (build key {2}) failed: {3} (Strategy type {0}, index {1}). + + + + + Looks up a localized string similar to The current type, {0}, is an abstract class and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to The current type, {0}, is delegate and cannot be constructed. Unity only supports resolving Func<T> and Func<IEnumerable<T>> by default.. + + + + + Looks up a localized string similar to The current type, {0}, is an interface and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to Cannot extract type from build key {0}.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is an open generic method. Open generic methods cannot be injected.. + + + + + Looks up a localized string similar to The property {0} on type {1} is an indexer. Indexed properties cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} has an out parameter. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one out parameter. Methods with out parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one ref parameter.Methods with ref parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} is marked for injection, but it is an open generic method. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is static. Static methods cannot be injected.. + + + + + Looks up a localized string similar to The type {0} is an open generic type. An open generic type cannot be resolved.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of constructor {1}. + + + + + Looks up a localized string similar to The parameter {0} could not be resolved when attempting to call constructor {1}.. + + + + + Looks up a localized string similar to Parameter type inference does not work for null values. Indicate the parameter type explicitly using a properly configured instance of the InjectionParameter or InjectionParameter<T> classes.. + + + + + Looks up a localized string similar to Calling constructor {0}. + + + + + Looks up a localized string similar to Calling method {0}.{1}. + + + + + Looks up a localized string similar to An item with the given key is already present in the dictionary.. + + + + + Looks up a localized string similar to The lifetime manager is already registered. Lifetime managers cannot be reused, please create a new one.. + + + + + Looks up a localized string similar to The override marker build plan policy has been invoked. This should never happen, looks like a bug in the container.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of method {1}.{2}. + + + + + Looks up a localized string similar to The value for parameter "{1}" of method {0} could not be resolved. . + + + + + Looks up a localized string similar to Could not resolve dependency for build key {0}.. + + + + + Looks up a localized string similar to The type {0} has multiple constructors marked with the InjectionConstructor attribute. Unable to disambiguate.. + + + + + Looks up a localized string similar to The supplied type {0} must be an open generic type.. + + + + + Looks up a localized string similar to The supplied type {0} does not have the same number of generic arguments as the target type {1}.. + + + + + Looks up a localized string similar to The type {0} does not have an accessible constructor.. + + + + + Looks up a localized string similar to The type {0} does not have a generic argument named "{1}". + + + + + Looks up a localized string similar to while resolving. + + + + + Looks up a localized string similar to The type {0} does not have a constructor that takes the parameters ({1}).. + + + + + Looks up a localized string similar to The type {0} does not have a public method named {1} that takes the parameters ({2}).. + + + + + Looks up a localized string similar to The type {0} does not contain an instance property named {1}.. + + + + + Looks up a localized string similar to The type {0} is not a generic type, and you are attempting to inject a generic parameter named "{1}".. + + + + + Looks up a localized string similar to The type {0} is not an array type with rank 1, and you are attempting to use a [DependencyArray] attribute on a parameter or property with this type.. + + + + + Looks up a localized string similar to Optional dependencies must be reference types. The type {0} is a value type.. + + + + + Looks up a localized string similar to The property {0} on type {1} is not settable.. + + + + + Looks up a localized string similar to The property {0} on type {1} is of type {2}, and cannot be injected with a value of type {3}.. + + + + + Looks up a localized string similar to The value for the property "{0}" could not be resolved.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to Resolution of the dependency failed, type = "{0}", name = "{1}". + Exception occurred while: {2}. + Exception is: {3} - {4} + ----------------------------------------------- + At the time of the exception, the container was: + . + + + + + Looks up a localized string similar to Resolving {0},{1}. + + + + + Looks up a localized string similar to Resolving {0},{1} (mapped from {2}, {3}). + + + + + Looks up a localized string similar to Resolving value for property {0}.{1}. + + + + + Looks up a localized string similar to The constructor {1} selected for type {0} has ref or out parameters. Such parameters are not supported for constructor injection.. + + + + + Looks up a localized string similar to Setting value for property {0}.{1}. + + + + + Looks up a localized string similar to The type {0} cannot be constructed. You must configure the container to supply this value.. + + + + + Looks up a localized string similar to The type {1} cannot be assigned to variables of type {0}.. + + + + + Looks up a localized string similar to <unknown>. + + + + + A simple, extensible dependency injection container. + + + + + Create a default . + + + + + Create a with the given parent container. + + The parent . The current object + will apply its own settings first, and then check the parent for additional ones. + + + + RegisterType a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + RegisterType an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + If true, the container will take over the lifetime of the instance, + calling Dispose on it (if it's ) when the container is Disposed. + + If false, container will not maintain a strong reference to . User is responsible + for disposing instance, and for keeping the instance from being garbage collected. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + Dispose this container instance. + + + Disposing the container also disposes any child containers, + and disposes any instances whose lifetimes are managed + by the container. + + + + + Dispose this container instance. + + + This class doesn't have a finalizer, so will always be true. + True if being called from the IDisposable.Dispose + method, false if being called from a finalizer. + + + + Remove policies associated with building this type. This removes the + compiled build plan so that it can be rebuilt with the new settings + the next time this type is resolved. + + Type of object to clear the plan for. + Name the object is being registered with. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + Implementation of the ExtensionContext that is actually used + by the UnityContainer implementation. + + + This is a nested class so that it can access state in the + container that would otherwise be inaccessible. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This extension supplies the default behavior of the UnityContainer API + by handling the context events and setting policies. + + + + + Install the default container behavior into the container. + + + + + Remove the default behavior from the container. + + + + + This extension installs the default strategies and policies into the container + to implement the standard behavior of the Unity container. + + + + + Add the default ObjectBuilder strategies & policies to the container. + + + + + Helper class to wrap common reflection stuff dealing with + methods. + + + + + Create a new instance that + lets us do more reflection stuff on that method. + + The method to reflect on. + + + + Given our set of generic type arguments, + + The generic type arguments. + An array with closed parameter types. + + + + Returns true if any of the parameters of this method + are open generics. + + + + + Return the of each parameter for this + method. + + Sequence of objects, one for + each parameter in order. + + + + A helper class that encapsulates two different + data items together into a a single item. + + + + + Create a new containing + the two values give. + + First value + Second value + + + + The first value of the pair. + + + + + The second value of the pair. + + + + + Container for a Pair helper method. + + + + + A helper factory method that lets users take advantage of type inference. + + Type of first value. + Type of second value. + First value. + Second value. + A new instance. + + + + A utility class that handles the logic of matching parameter + lists, so we can find the right constructor and method overloads. + + + + + Create a new that will attempt to + match the given parameter types. + + Target parameters to match against. + + + + Tests to see if the given set of types matches the ones + we're looking for. + + parameter list to look for. + true if they match, false if they don't. + + + + Tests to see if the given set of types matches the ones we're looking for. + + Candidate method signature to look for. + True if they match, false if they don't. + + + + Another reflection helper class that has extra methods + for dealing with ParameterInfo. + + + + + A small helper class to encapsulate details of the + reflection API, particularly around generics. + + + + + Create a new instance that + lets you look at information about the given type. + + Type to do reflection on. + + + + Test the given object, looking at + the parameters. Determine if any of the parameters are + open generic types that need type attributes filled in. + + The method to check. + True if any of the parameters are open generics. False if not. + + + + If this type is an open generic, use the + given array to + determine what the required closed type is and return that. + + If the parameter is not an open type, just + return this parameter's type. + Type arguments to substitute in for + the open type parameters. + Corresponding closed type of this parameter. + + + + Given a generic argument name, return the corresponding type for this + closed type. For example, if the current type is SomeType<User>, and the + corresponding definition was SomeType<TSomething>, calling this method + and passing "TSomething" will return typeof(User). + + Name of the generic parameter. + Type of the corresponding generic parameter, or null if there + is no matching name. + + + + The object we're reflecting over. + + + + + Is this type generic? + + + + + Is this type an open generic (no type parameter specified) + + + + + Is this type an array type? + + + + + Is this type an array of generic elements? + + + + + The type of the elements in this type (if it's an array). + + + + + Returns all the public constructors defined for the current reflected . + + + An enumeration of ConstructorInfo objects representing all the public instance constructors defined for the + current reflected , but not including the type initializer (static constructor). + + + + + Create a new instance of that + lets you query information about the given ParameterInfo object. + + Parameter to query. + + + + A set of helper methods to pick through lambdas and pull out + from them. + + + + + Pull out a object from an expression of the form + () => SomeClass.SomeMethod() + + Expression describing the method to call. + Corresponding . + + + + Pull out a object from an expression of the form + x => x.SomeMethod() + + The type where the method is defined. + Expression describing the method to call. + Corresponding . + + + + Pull out a object for the get method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the get method is to be extracted. + Corresponding . + + + + Pull out a object for the set method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the set method is to be extracted. + Corresponding . + + + + + + + + + + + + + Pull out a object from an expression of the form () => new SomeType() + + The type where the constructor is defined. + Expression invoking the desired constructor. + Corresponding . + + + diff --git a/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.XML b/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.XML new file mode 100644 index 0000000..1d4dfdd --- /dev/null +++ b/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.XML @@ -0,0 +1,312 @@ + + + + Microsoft.Practices.Unity.RegistrationByConvention + + + + + Provides helper methods to retrieve classes from assemblies. + + + + + Returns all visible, non-abstract classes from . + + The assemblies. + All visible, non-abstract classes found in the assemblies. + is . + contains elements. + All exceptions thrown while getting types from the assemblies are ignored, and the types that can be retrieved are returned. + + + + Returns all visible, non-abstract classes from , and optionally skips errors. + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from . + + to skip errors; otherwise, . + The assemblies. + + All visible, non-abstract classes. + + is . + contains elements. + + If is , all exceptions thrown while getting types from the assemblies are ignored, and the types + that can be retrieved are returned; otherwise, the original exception is thrown. + + + + + Returns all visible, non-abstract classes from all assemblies located where the application is installed. + + to include the Unity assemblies; otherwise, . Defaults to . + to skip errors; otherwise, . + + All visible, non-abstract classes. + + + If is , all exceptions thrown while loading assemblies or getting types from the assemblies + are ignored, and the types that can be retrieved are returned; otherwise, the original exception is thrown. These exceptions might be wrapped in a + . + + + + + The exception that is thrown when registering multiple types would result in an type mapping being overwritten. + + + + + Initializes a new instance of the class. + + The name for the mapping. + The source type for the mapping. + The type currently mapped. + The new type to map. + + + + Gets the name for the mapping. + + + + + Gets the source type for the mapping. + + + + + Gets the type currently mapped. + + + + + Gets the new type to map. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to An attempt to override an existing mapping was detected for type {1} with name "{0}", currently mapped to type {2}, to type {3}.. + + + + + Looks up a localized string similar to The set of assemblies contains a null element.. + + + + + Represents a set of types to register and their registration settings. + + + + + Gets types to register. + + + + + Gets a function to get the types that will be requested for each type to configure. + + + + + Gets a function to get the name to use for the registration of each type. + + + + + Gets a function to get the for the registration of each type. Defaults to no lifetime management. + + + + + + Gets a function to get the additional objects for the registration of each type. Defaults to no injection members. + + + + + + Provides a set of convenience overloads to the + interface to support registration of multiple types. + + + + + Registers the supplied types by using the specified rules for name, lifetime manager, injection members, and registration types. + + The container to configure. + The types to register. The methods in the class can be used to scan assemblies to get types, and further filtering can be performed using LINQ queries. + A function that gets the types that will be requested for each type to configure. It can be a method from the class or a custom function. Defaults to no registration types, and registers only the supplied types. + A function that gets the name to use for the registration of each type. It can be a method from the or a custom function. Defaults to no name. + A function that gets the for the registration of each type. It can be a method from the class or a custom function. Defaults to no lifetime management. + A function that gets the additional objects for the registration of each type. Defaults to no injection members. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + A new registration would overwrite an existing mapping and is . + + + + Registers the types according to the . + + The container to configure. + The convention to determine which types will be registered and how. + to overwrite existing mappings; otherwise, . Defaults to . + + The container that this method was called on. + + + + + Provides helper methods to specify the lifetime for a type with registration by convention. + + + + + Returns a . + + The type. + A lifetime manager + + + + Returns a . + + The type. + A container controlled lifetime manager. + + + + Returns a . + + The type. + An externally controlled lifetime manager. + + + + Returns a . + + The type. + A hierarchical lifetime manager. + + + + Returns a . + + The type. + A per resolve lifetime manager. + + + + Returns a . + + The type. + A transient lifetime manager. + + + + Returns a . + + The custom type. + The type. + + A lifetime manager. + + + + + Returns a . + + The type. + A per thread lifetime manager. + + + + Provides helper methods to map types to the types interfaces to which register them. + + + + + Returns no types. + + The type to register. + An empty enumeration. + + + + Returns an enumeration with the interface that matches the name of . + + The type to register. + An enumeration with the first interface matching the name of (for example, if type is MyType, a matching interface is IMyType), + or an empty enumeration if no such interface is found. + + + + Returns an enumeration with all the interfaces implemented by . + + The type to register. + An enumeration with all the interfaces implemented by the implementation type except . + + + + Returns an enumeration with all the interfaces implemented by that belong to the same assembly as implementationType. + + The type to register. + An enumeration with all the interfaces implemented by the implementation type that belong to the same assembly. + + + + Provides helper methods to get type names. + + + + + Returns the type name. + + The type. + The type name. + + + + Returns null for the registration name. + + The type. + + + + diff --git a/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.dll b/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.dll new file mode 100644 index 0000000..a40252a Binary files /dev/null and b/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.RegistrationByConvention.dll differ diff --git a/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.dll b/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.dll new file mode 100644 index 0000000..a122e13 Binary files /dev/null and b/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.dll differ diff --git a/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.xml b/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.xml new file mode 100644 index 0000000..fbd47c0 --- /dev/null +++ b/src/packages/Unity.3.5.1404.0/lib/wp80/Microsoft.Practices.Unity.xml @@ -0,0 +1,5916 @@ + + + + Microsoft.Practices.Unity + + + + + Provides access to the names registered for a container. + + + + + Represents a builder policy interface. Since there are no fixed requirements + for policies, it acts as a marker interface from which to derive all other + policy interfaces. + + + + + Gets the names registered for a type. + + The type. + The names registered for . + + + + An implementation + that constructs a build plan for creating objects. + + + + + A that can create and return an + for the given build key. + + + + + Create a build plan using the given context and build key. + + Current build context. + Current build key. + The build plan. + + + + Creates a build plan using the given context and build key. + + Current build context. + Current build key. + + The build plan. + + + + + Provides extension methods to the class due to the introduction + of class in the .NET for Windows Store apps. + + + + + Returns the constructor in that matches the specified constructor parameter types. + + The type to inspect + The constructor parameter types. + The constructor that matches the specified parameter types. + + + + Returns the non-static declared methods of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Returns the non-static method of a type or its based type. + + The type to inspect + The name of the method to seek. + The (closed) parameter type signature of the method. + The discovered + + + + Returns the declared properties of a type or its base types. + + The type to inspect + An enumerable of the objects. + + + + Determines if the types in a parameter set ordinally matches the set of supplied types. + + + + + + + + Base class for attributes that can be placed on parameters + or properties to specify how to resolve the value for + that parameter or property. + + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + This attribute is used to indicate which constructor to choose when + the container attempts to build a type. + + + + + This attribute is used to mark methods that should be called when + the container is building an object. + + + + + This attribute is used to mark properties and parameters as targets for injection. + + + For properties, this attribute is necessary for injection to happen. For parameters, + it's not needed unless you want to specify additional information to control how + the parameter is resolved. + + + + + Create an instance of with no name. + + + + + Create an instance of with the given name. + + Name to use when resolving this dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + The name specified in the constructor. + + + + + An used to mark a dependency + as optional - the container will try to resolve it, and return null + if the resolution fails rather than throw. + + + + + Construct a new object. + + + + + Construct a new object that + specifies a named dependency. + + Name of the dependency. + + + + Create an instance of that + will be used to get the value for the member this attribute is + applied to. + + Type of parameter or property that + this attribute is decoration. + The resolver object. + + + + Name of the dependency. + + + + + A that composites other + ResolverOverride objects. The GetResolver operation then + returns the resolver from the first child override that + matches the current context and request. + + + + + Base class for all override objects passed in the + method. + + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Wrap this resolver in one that verifies the type of the object being built. + This allows you to narrow any override down to a specific type easily. + + Type to constrain the override to. + The new override. + + + + Add a new to the collection + that is checked. + + item to add. + + + + Add a set of s to the collection. + + items to add. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Class that returns information about the types registered in a container. + + + + + The type that was passed to the method + as the "from" type, or the only type if type mapping wasn't done. + + + + + The type that this registration is mapped to. If no type mapping was done, the + property and this one will have the same value. + + + + + Name the type was registered under. Null for default registration. + + + + + The registered lifetime manager instance. + + + + + The lifetime manager for this registration. + + + This property will be null if this registration is for an open generic. + + + + A class that overrides + the value injected whenever there is a dependency of the + given type, regardless of where it appears in the object graph. + + + + + Create an instance of to override + the given type with the given value. + + Type of the dependency. + Value to use. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the dependency type using generic syntax. + + Type of the dependency to override. + + + + Construct a new object that will + override the given dependency, and pass the given value. + + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + This class isn't really a collection, it just implements IEnumerable + so that we get use of the nice C# collection initializer syntax. + + + + + Base helper class for creating collections of objects + for use in passing a bunch of them to the resolve call. This base class provides + the mechanics needed to allow you to use the C# collection initializer syntax. + + Concrete type of the this class collects. + Key used to create the underlying override object. + Value that the override returns. + + + + Add a new override to the collection with the given key and value. + + Key - for example, a parameter or property name. + Value - the value to be returned by the override. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Event argument class for the event. + + + + + Construct a new object with the + given child container object. + + An for the newly created child + container. + + + + The newly created child container. + + + + + An extension context for the created child container. + + + + + Base class for subclasses that let you specify that + an instance of a generic type parameter should be resolved. + + + + + Base type for objects that are used to configure parameters for + constructor or method injection, or for getting the value to + be injected into a property. + + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Convert the given set of arbitrary values to a sequence of InjectionParameterValue + objects. The rules are: If it's already an InjectionParameterValue, return it. If + it's a Type, return a ResolvedParameter object for that type. Otherwise return + an InjectionParameter object for that value. + + The values to build the sequence from. + The resulting converted sequence. + + + + Convert an arbitrary value to an InjectionParameterValue object. The rules are: + If it's already an InjectionParameterValue, return it. If it's a Type, return a + ResolvedParameter object for that type. Otherwise return an InjectionParameter + object for that value. + + The value to convert. + The resulting . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved, providing the + value if resolving fails. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A class that lets you specify a factory method the container + will use to create the object. + + This is a significantly easier way to do the same + thing the old static factory extension was used for. + + + + Base class for objects that can be used to configure what + class members get injected by the container. + + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type to register. + Policy list to add policies to. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Create a new instance of with + the given factory function. + + Factory function. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface being registered. If no interface, + this will be null. This parameter is ignored in this implementation. + Type of concrete type being registered. + Name used to resolve the type object. + Policy list to add policies to. + + + + A that can be passed to + to configure a + parameter or property as an optional dependency. + + + + + A base class for implementing classes + that deal in explicit types. + + + + + Create a new that exposes + information about the given . + + Type of the parameter. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + + + + The type of parameter this object represents. + + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + Construct a new object that + specifies the given . + + Type of the dependency. + + + + Construct a new object that + specifies the given and . + + Type of the dependency. + Name for the dependency. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that lets you + specify the type of the dependency using generics syntax. + + Type of the dependency. + + + + Construct a new . + + + + + Construct a new with the given + . + + Name of the dependency. + + + + A special lifetime manager which works like , + except that in the presence of child containers, each child gets it's own instance + of the object, instead of sharing one in the common parent. + + + + + A that holds onto the instance given to it. + When the is disposed, + the instance is disposed with it. + + + + + Base class for Lifetime managers which need to synchronize calls to + . + + + + The purpose of this class is to provide a basic implementation of the lifetime manager synchronization pattern. + + + Calls to the method of a + instance acquire a lock, and if the instance has not been initialized with a value yet the lock will only be released + when such an initialization takes place by calling the method or if + the build request which resulted in the call to the GetValue method fails. + + + + + + + Base class for Lifetime managers - classes that control how + and when instances are created by the Unity container. + + + + + A that controls how instances are + persisted and recovered from an external store. Used to implement + things like singletons and per-http-request lifetime. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object to store. + + + + Remove the value this lifetime policy is managing from backing store. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This interface provides a hook for the builder context to + implement error recovery when a builder strategy throws + an exception. Since we can't get try/finally blocks onto + the call stack for later stages in the chain, we instead + add these objects to the context. If there's an exception, + all the current IRequiresRecovery instances will have + their Recover methods called. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + Calls to this method acquire a lock which is released only if a non-null value + has been set for the lifetime manager. + + + + Performs the actual retrieval of a value from the backing store associated + with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + This method is invoked by + after it has acquired its lock. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + Setting a value will attempt to release the lock acquired by + . + + + + Performs the actual storage of the given value into backing store for retrieval later. + + The object being stored. + This method is invoked by + before releasing its lock. + + + + Remove the given object from backing store. + + + + + A method that does whatever is needed to clean up + as part of cleaning up after an exception. + + + Don't do anything that could throw in this method, + it will cause later recover operations to get skipped + and play real havoc with the stack trace. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Standard Dispose pattern implementation. Not needed, but it keeps FxCop happy. + + Always true, since we don't have a finalizer. + + + + This is a custom lifetime manager that acts like , + but also provides a signal to the default build plan, marking the type so that + instances are reused across the build up object graph. + + + + + Construct a new object that does not + itself manage an instance. + + + + + Construct a new object that stores the + give value. This value will be returned by + but is not stored in the lifetime manager, nor is the value disposed. + This Lifetime manager is intended only for internal use, which is why the + normal method is not used here. + + Value to store. + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. In this class, + this is a noop, since it has special hooks down in the guts. + + The object being stored. + + + + Remove the given object from backing store. Noop in this class. + + + + + A strategy that handles Hierarchical lifetimes across a set of parent/child + containers. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. + + + + + Represents a strategy in the chain of responsibility. + Strategies are required to support both BuildUp and TearDown. Although you + can implement this interface directly, you may also choose to use + as the base class for your strategies, as + this class provides useful helper methods and makes support BuildUp and TearDown + optional. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a teardown operation. The + PostTearDown method is called when the chain has finished the PreTearDown + phase and executes in reverse order from the PreTearDown calls. + + Context of the teardown operation. + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A that will attempt to + resolve a value, and return null if it cannot rather than throwing. + + + + + A strategy that is used at build plan execution time + to resolve a dependent value. + + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Construct a new object + that will attempt to resolve the given name and type from the container. + + Type to resolve. Must be a reference type. + Name to resolve with. + + + + Construct a new object + that will attempt to resolve the given type from the container. + + Type to resolve. Must be a reference type. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + Type this resolver will resolve. + + + + + Name this resolver will resolve. + + + + + Extension methods on to provide convenience + overloads (generic versions, mostly). + + + + + Removes an individual policy type for a build key. + + The type the policy was registered as. + to remove the policy from. + The key the policy applies. + + + + Removes a default policy. + + The type the policy was registered as. + to remove the policy from. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Gets an individual policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + to search. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list that actually contains the returned policy. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + to search. + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy in the list, if present; returns null otherwise. + + + + Sets an individual policy. + + The interface the policy is registered under. + to add the policy to. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + to add the policy to. + The default policy to be registered. + + + + Base class for the current operation stored in the build context. + + + + + Create a new . + + Type currently being built. + + + + The type that's currently being built. + + + + + Build plan for that will return a Func that will resolve the requested type + through this container later. + + + + + A build plan is an object that, when invoked, will create a new object + or fill in a given existing one. It encapsulates all the information + gathered by the strategies to construct a particular object. + + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + The almost inevitable collection of extra helper methods on + to augment the rich set of what + LINQ already gives us. + + + + + Execute the provided on every item in . + + Type of the items stored in + Sequence of items to process. + Code to run over each item. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the given . + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The conversion function to change TItem -> string. + The resulting string. + + + + Create a single string from a sequence of items, separated by the provided , + and with the conversion to string done by the item's method. + + This method does basically the same thing as , + but will work on any sequence of items, not just arrays. + Type of items in the sequence. + Sequence of items to convert. + Separator to place between the items in the string. + The resulting string. + + + + A class that lets you + override a named parameter passed to a constructor. + + + + + Construct a new object that will + override the given named constructor parameter, and pass the given + value. + + Name of the constructor parameter. + Value to pass for the constructor. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple parameter overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + A that lets you override + the value for a specified property. + + + + + Create an instance of . + + The property name. + Value to use for the property. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience form of that lets you + specify multiple property overrides in one shot rather than having + to construct multiple objects. + + + + + When implemented in derived classes, this method is called from the + method to create the actual objects. + + Key value to create the resolver. + Value to store in the resolver. + The created . + + + + Interface defining the configuration interface exposed by the + Static Factory extension. + + + + + Base interface for all extension configuration interfaces. + + + + + Retrieve the container instance that we are currently configuring. + + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Represents the context in which a build-up or tear-down operation runs. + + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + Get the current build key for the current build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + Any policies added to this object are transient + and will be erased at the end of the buildup. + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a , + , and the + build key used to start this build operation. + + The to use for this context. + The to use for this context. + The to use for this context. + Build key to start building. + The existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + Existing object to build up. + + + + Create a new using the explicitly provided + values. + + The to use for this context. + The to use for this context. + The set of persistent policies to use for this context. + The set of transient policies to use for this context. It is + the caller's responsibility to ensure that the transient and persistent policies are properly + combined. + Build key for this context. + The resolver overrides. + + + + Add a new set of resolver override objects to the current build operation. + + objects to add. + + + + Get a object for the given + or null if that dependency hasn't been overridden. + + Type of the dependency. + Resolver to use, or null if no override matches for the current operation. + + + + A convenience method to do a new buildup operation on an existing context. + + Key to use to build up. + Created object. + + + + A convenience method to do a new buildup operation on an existing context. This + overload allows you to specify extra policies which will be in effect for the duration + of the build. + + Key defining what to build up. + A delegate that takes a . This + is invoked with the new child context before the build up process starts. This gives callers + the opportunity to customize the context for the build process. + Created object. + + + + Gets the head of the strategy chain. + + + The strategy that's first in the chain; returns null if there are no + strategies in the chain. + + + + + Get the current build key for the current build operation. + + + + + The current object being built up or torn down. + + + The current object being manipulated by the build operation. May + be null if the object hasn't been created yet. + + + + Gets the associated with the build. + + + The associated with the build. + + + + + Gets the original build key for the build operation. + + + The original build key for the build operation. + + + + + The set of policies that were passed into this context. + + This returns the policies passed into the context. + Policies added here will remain after buildup completes. + The persistent policies for the current context. + + + + Gets the policies for the current context. + + + Any modifications will be transient (meaning, they will be forgotten when + the outer BuildUp for this context is finished executing). + + + The policies for the current context. + + + + + Gets the collection of objects + that need to execute in event of an exception. + + + + + Flag indicating if the build operation should continue. + + true means that building should not call any more + strategies, false means continue to the next strategy. + + + + An object representing what is currently being done in the + build chain. Used to report back errors if there's a failure. + + + + + The build context used to resolve a dependency during the build operation represented by this context. + + + + + Represents that a dependency could not be resolved. + + + + + Initializes a new instance of the class with no extra information. + + + + + Initializes a new instance of the class with the given message. + + Some random message. + + + + Initialize a new instance of the class with the given + message and inner exception. + + Some random message + Inner exception. + + + + Initializes a new instance of the class with the build key of the object begin built. + + The build key of the object begin built. + + + + The exception thrown when injection is attempted on a method + that is an open generic or has out or ref params. + + + + + Construct a new with no + message. + + + + + Construct a with the given message + + Message to return. + + + + Construct a with the given message + and inner exception. + + Message to return. + Inner exception + + + + Extension methods to provide convenience overloads over the + interface. + + + + + Start a recursive build up operation to retrieve the default + value for the given type. + + Type of object to build. + Parent context. + Resulting object. + + + + Start a recursive build up operation to retrieve the named + implementation for the given type. + + Type to resolve. + Parent context. + Name to resolve with. + The resulting object. + + + + Add a set of s to the context, specified as a + variable argument list. + + Context to add overrides to. + The overrides. + + + + Data structure that stores the set of + objects and executes them when requested. + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + Represents a lifetime container. + + + A lifetime container tracks the lifetime of an object, and implements + IDisposable. When the container is disposed, any objects in the + container which implement IDisposable are also disposed. + + + + + Adds an object to the lifetime container. + + The item to be added to the lifetime container. + + + + Determine if a given object is in the lifetime container. + + + The item to locate in the lifetime container. + + + Returns true if the object is contained in the lifetime + container; returns false otherwise. + + + + + Releases the resources used by the . + + + + + Releases the resources used by the . + + + true to release managed and unmanaged resources; false to release only unmanaged resources. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Returns an enumerator that iterates through the lifetime container. + + + An object that can be used to iterate through the life time container. + + + + + Removes an item from the lifetime container. The item is + not disposed. + + The item to be removed. + + + + Gets the number of references in the lifetime container + + + The number of references in the lifetime container + + + + + A custom collection over objects. + + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + A custom collection wrapper over objects. + + + + + Initialize a new instance of a class. + + + + + Initialize a new instance of a class with another policy list. + + An inner policy list to search. + + + + Removes an individual policy type for a build key. + + The type of policy to remove. + The key the policy applies. + + + + Removes all policies from the list. + + + + + Removes a default policy. + + The type the policy was registered as. + + + + Gets an individual policy. + + The interface the policy is registered under. + The key the policy applies. + true if the policy searches local only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list, if present; returns null otherwise. + + + + Get the non default policy. + + The interface the policy is registered under. + The key the policy applies to. + True if the search should be in the local policy list only; otherwise false to search up the parent chain. + The policy list in the chain that the searched for policy was found in, null if the policy was + not found. + The policy in the list if present; returns null otherwise. + + + + Sets an individual policy. + + The of the policy. + The policy to be registered. + The key the policy applies. + + + + Sets a default policy. When checking for a policy, if no specific individual policy + is available, the default will be used. + + The interface to register the policy under. + The default policy to be registered. + + + + Gets the number of items in the locator. + + + The number of items in the locator. + + + + + An implementation of . + + + + + Add a new object to this + list. + + Object to add. + + + + Execute the method + of everything in the recovery list. Recoveries will execute + in the opposite order of add - it's a stack. + + + + + Return the number of recovery objects currently in the stack. + + + + + Implementation of which will notify an object about + the completion of a BuildUp operation, or start of a TearDown operation. + + + This strategy checks the object that is passing through the builder chain to see if it + implements IBuilderAware and if it does, it will call + and . This strategy is meant to be used from the + stage. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a teardown operation. The + PreTearDown method is called when the chain is being executed in the + forward direction. + + Context of the teardown operation. + + + + Implemented on a class when it wants to receive notifications + about the build process. + + + + + Called by the when the object is being built up. + + The key of the object that was just built up. + + + + Called by the when the object is being torn down. + + + + + Enumeration to represent the object builder stages. + + + The order of the values in the enumeration is the order in which the stages are run. + + + + + Strategies in this stage run before creation. Typical work done in this stage might + include strategies that use reflection to set policies into the context that other + strategies would later use. + + + + + Strategies in this stage create objects. Typically you will only have a single policy-driven + creation strategy in this stage. + + + + + Strategies in this stage work on created objects. Typical work done in this stage might + include setter injection and method calls. + + + + + Strategies in this stage work on objects that are already initialized. Typical work done in + this stage might include looking to see if the object implements some notification interface + to discover when its initialization stage has been completed. + + + + + Represents a builder policy for mapping build keys. + + + + + Represents a builder policy for mapping build keys. + + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. This parameter can be null + (called when getting container registrations). + The new build key. + + + + Initialize a new instance of the with the new build key. + + The new build key. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping, unused in this implementation. + The new build key. + + + + Represents a strategy for mapping build keys in the build up operation. + + + + + Called during the chain of responsibility for a build operation. Looks for the + and if found maps the build key for the current operation. + + The context for the operation. + + + + An implementation of that can map + generic types. + + + + + Create a new instance + that will map generic types. + + Build key to map to. This must be or contain an open generic type. + + + + Maps the build key. + + The build key to map. + Current build context. Used for contextual information + if writing a more sophisticated mapping. + The new build key. + + + + A that will look for a build plan + in the current context. If it exists, it invokes it, otherwise + it creates one and stores it for later, and invokes it. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + An implementation of that chooses + constructors based on these criteria: first, pick a constructor marked with the + attribute. If there + isn't one, then choose the constructor with the longest parameter list. If that is ambiguous, + then throw. + + Thrown when the constructor to choose is ambiguous. + Attribute used to mark the constructor to call. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + A that, when implemented, + will determine which constructor to call from the build plan. + + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. + + The second object to compare. + The first object to compare. + + Value Condition Less than zero is less than y. Zero equals y. Greater than zero is greater than y. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Base class for return values from selector policies that + return a MemberInfo of some sort plus a list of parameter + keys to look up the parameter resolvers. + + + + + Base class for return of selector policies that need + to keep track of a set of parameter resolvers. + + + + + Adds the parameter resolver. Resolvers are assumed + to be in the order of the parameters to the member. + + The new resolver. + + + + Gets the parameter resolvers. + + An array with the parameter resolvers. + + + + Construct a new , storing + the given member info. + + Member info to store. + + + + The member info stored. + + + + + Create a new instance which + contains the given constructor. + + The constructor to wrap. + + + + The constructor this object wraps. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the constructor being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the constructor being set up. + + + + + Parameter that's being resolved. + + + + + A that emits IL to call constructors + as part of creating a build plan. + + + + + Called during the chain of responsibility for a build operation. + + Existing object is an instance of . + The context for the operation. + + + + A helper method used by the generated IL to set up a PerResolveLifetimeManager lifetime manager + if the current object is such. + + Current build context. + + + + Build up the string that will represent the constructor signature + in any exception message. + + + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an interface (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an abstract class (usually due to the lack of a type mapping). + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + no existing object is present, but the user is attempting to build + an delegate other than Func{T} or Func{IEnumerable{T}}. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved. + + The currently being + used for the build of this object. + + + + A helper method used by the generated IL to throw an exception if + a dependency cannot be resolved because of an invalid constructor. + + The currently being + used for the build of this object. + The signature of the invalid constructor. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Constructor we're trying to call. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + Key the resolver was stored under. + The found dependency resolver. + + + + Helper method used by generated IL to look up a dependency resolver based on the given key. + + Current build context. + Type of the dependency being resolved. + The configured resolver. + The found dependency resolver. + + + + The type that is to be built with the dynamic build plan. + + + + + The context parameter representing the used when the build plan is executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + An implementation + that constructs a build plan via dynamic IL emission. + + + + + Construct a that + uses the given strategy chain to construct the build plan. + + The strategy chain. + + + + Construct a build plan. + + The current build context. + The current build key. + The created build plan. + + + + A class that records that a constructor is about to be call, and is + responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Generate the description string. + + The string. + + + + Method we're trying to call. + + + + + This class records the information about which constructor argument is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + The type that is being constructed. + A string representing the method being called. + Parameter being resolved. + + + + Generate the string describing what parameter was being resolved. + + The description string. + + + + String describing the method being set up. + + + + + Parameter that's being resolved. + + + + + A that generates IL to call + chosen methods (as specified by the current ) + as part of object build up. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A base class that holds the information shared by all operations + performed by the container while setting properties. + + + + + Initializes a new instance of the class. + + + + + Generate the description of this operation. + + The string. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + The property value currently being resolved. + + + + + This class records the information about which property value is currently + being resolved, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + A that generates IL to resolve properties + on an object being built. + + + + + Called during the chain of responsibility for a build operation. + + The context for the operation. + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + A helper method used by the generated IL to store the current operation in the build context. + + + + + This class records the information about which property value is currently + being set, and is responsible for generating the error string required when + an error has occurred. + + + + + Initializes a new instance of the class. + + Type property is on. + Name of property being set. + + + + Get a format string used to create the description. Called by + the base method. + + The format string. + + + + Creates an instance of this build plan's type, or fills + in the existing type if passed in. + + Context used to build up the object. + + + + An that will examine the given + types and return a sequence of objects + that should be called as part of building the object. + + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of that selects + methods by looking for the given + attribute on those methods. + + Type of attribute used to mark methods + to inject. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + Attribute that marks methods that should + be called. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + Objects of this type are the return value from . + It encapsulates the desired with the string keys + needed to look up the for each + parameter. + + + + + Create a new instance which + contains the given method. + + The method + + + + The constructor this object wraps. + + + + + An that returns a sequence + of properties that should be injected for the given type. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Base class that provides an implementation of + which lets you override how the parameter resolvers are created. + + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + An implementation of that looks + for properties marked with the + attribute that are also settable and not indexers. + + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + Objects of this type are returned from + . + This class combines the about + the property with the string key used to look up the resolver + for this property's value. + + + + + Create an instance of + with the given and key. + + The property. + + + + + PropertyInfo for this property. + + + + + IDependencyResolverPolicy for this property + + + + + Implementation of . + + + + + A builder policy that lets you keep track of the current + resolvers and will remove them from the given policy set. + + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Add a new resolver to track by key. + + Key that was used to add the resolver to the policy set. + + + + Remove the currently tracked resolvers from the given policy list. + + Policy list to remove the resolvers from. + + + + Get an instance that implements , + either the current one in the policy set or creating a new one if it doesn't + exist. + + Policy list to look up from. + Build key to track. + The resolver tracker. + + + + Add a key to be tracked to the current tracker. + + Policy list containing the resolvers and trackers. + Build key for the resolvers being tracked. + Key for the resolver. + + + + Remove the resolvers for the given build key. + + Policy list containing the build key. + Build key. + + + + An implementation of that + calls back into the build chain to build up the dependency, passing + a type given at compile time as its build key. + + + + + Create a new instance storing the given type. + + Type to resolve. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + This interface defines a standard method to convert any regardless + of the stage enum into a regular, flat strategy chain. + + + + + Convert this into + a flat . + + The flattened . + + + + Represents a chain of responsibility for builder strategies. + + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context, + calling the Buildup methods on the strategies. + + Context for the build process. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + A builder policy used to create lifetime policy instances. + Used by the LifetimeStrategy when instantiating open + generic types. + + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + An implementation that uses + a to figure out if an object + has already been created and to update or remove that + object from some backing store. + + + + + Called during the chain of responsibility for a build operation. The + PreBuildUp method is called when the chain is being executed in the + forward direction. + + Context of the build operation. + + + + Called during the chain of responsibility for a build operation. The + PostBuildUp method is called when the chain has finished the PreBuildUp + phase and executes in reverse order from the PreBuildUp calls. + + Context of the build operation. + + + + Represents a chain of responsibility for builder strategies partitioned by stages. + + The stage enumeration to partition the strategies. + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with an inner strategy chain to use when building. + + The inner strategy chain to use first when finding strategies in the build operation. + + + + Adds a strategy to the chain at a particular stage. + + The strategy to add to the chain. + The stage to add the strategy. + + + + Add a new strategy for the . + + The of + The stage to add the strategy. + + + + Clear the current strategy chain list. + + + This will not clear the inner strategy chain if this instance was created with one. + + + + + Makes a strategy chain based on this instance. + + A new . + + + + Represents a chain of responsibility for builder strategies. + + + + + Initialize a new instance of the class. + + + + + Initialize a new instance of the class with a collection of strategies. + + A collection of strategies to initialize the chain. + + + + Adds a strategy to the chain. + + The strategy to add to the chain. + + + + Adds strategies to the chain. + + The strategies to add to the chain. + + + + Reverse the order of the strategy chain. + + The reversed strategy chain. + + + + Execute this strategy chain against the given context to build up. + + Context for the build processes. + The build up object + + + + Execute this strategy chain against the given context, + calling the TearDown methods on the strategies. + + Context for the teardown process. + + + + Returns an enumerator that iterates through the collection. + + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + + An object that can be used to iterate through the collection. + + + + + Build key used to combine a type object with a string name. Used by + ObjectBuilder to indicate exactly what is being built. + + + + + Create a new instance with the given + type and name. + + to build. + Key to use to look up type mappings and singletons. + + + + Create a new instance for the default + buildup of the given type. + + to build. + + + + This helper method creates a new instance. It is + initialized for the default key for the given type. + + Type to build. + A new instance. + + + + This helper method creates a new instance for + the given type and key. + + Type to build + Key to use to look up type mappings and singletons. + A new instance initialized with the given type and name. + + + + Compare two instances. + + Two instances compare equal + if they contain the same name and the same type. Also, comparing + against a different type will also return false. + Object to compare to. + True if the two keys are equal, false if not. + + + + Calculate a hash code for this instance. + + A hash code. + + + + Compare two instances for equality. + + Two instances compare equal + if they contain the same name and the same type. + First of the two keys to compare. + Second of the two keys to compare. + True if the values of the keys are the same, else false. + + + + Compare two instances for inequality. + + Two instances compare equal + if they contain the same name and the same type. If either field differs + the keys are not equal. + First of the two keys to compare. + Second of the two keys to compare. + false if the values of the keys are the same, else true. + + + + Formats the build key as a string (primarily for debugging). + + A readable string representation of the build key. + + + + Return the stored in this build key. + + The type to build. + + + + Returns the name stored in this build key. + + The name to use when building. + + + + A generic version of so that + you can new up a key using generic syntax. + + Type for the key. + + + + Construct a new that + specifies the given type. + + + + + Construct a new that + specifies the given type and name. + + Name for the key. + + + + A series of helper methods to deal with sequences - + objects that implement . + + + + + A function that turns an arbitrary parameter list into an + . + + Type of arguments. + The items to put into the collection. + An array that contains the values of the . + + + + Given two sequences, return a new sequence containing the corresponding values + from each one. + + Type of first sequence. + Type of second sequence. + First sequence of items. + Second sequence of items. + New sequence of pairs. This sequence ends when the shorter of sequence1 and sequence2 does. + + + + A that lets you register a + delegate with the container to create an object, rather than calling + the object's constructor. + + + + + Base class for all extension objects. + + + + + The container calls this method when the extension is added. + + A instance that gives the + extension access to the internals of the container. + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + Removes the extension's functions from the container. + + + + This method is called when extensions are being removed from the container. It can be + used to do things like disconnect event handlers or clean up member state. You do not + need to remove strategies or policies here; the container will do that automatically. + + + The default implementation of this method does nothing. + + + + + The container this extension has been added to. + + The that this extension has been added to. + + + + The object used to manipulate + the inner state of the container. + + + + + Initialize this extension. This particular extension requires no + initialization work. + + + + + Register the given factory delegate to be called when the container is + asked to resolve and . + + Type that will be requested from the container. + The name that will be used when requesting to resolve this type. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + Register the given factory delegate to be called when the container is + asked to resolve . + + Type that will be requested from the container. + Delegate to invoke to create the instance. + The container extension object this method was invoked on. + + + + An implementation of that + acts as a decorator over another . + This checks to see if the current type being built is the + right one before checking the inner . + + + + + Create an instance of + + Type to check for. + Inner override to check after type matches. + + + + Return a that can be used to give a value + for the given desired dependency. + + Current build context. + Type of dependency desired. + a object if this override applies, null if not. + + + + A convenience version of that lets you + specify the type to construct via generics syntax. + + Type to check for. + + + + Create an instance of . + + Inner override to check after type matches. + + + + Extension class that adds a set of convenience overloads to the + interface. + + + + + Register a type with specific members to be injected. + + Type this registration is for. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping and transient lifetime. + + + that will be requested. + that will actually be returned. + Container to configure. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + that will be requested. + that will actually be returned. + Container to configure. + Name of this mapping. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Container to configure. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type with the container. + No type mapping is performed for this type. + + The type to configure injection on. + Container to configure. + Name that will be used to request the type. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + The type to apply the to. + Container to configure. + Name that will be used to request the type. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type with specific members to be injected. + + Container to configure. + Type this registration is for. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + + This overload registers a default mapping. + + + Container to configure. + that will be requested. + that will actually be returned. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container. + + + This method is used to tell the container that when asked for type , + actually return an instance of type . This is very useful for + getting instances of interfaces. + + Container to configure. + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a type mapping with the container, where the created instances will use + the given . + + Container to configure. + that will be requested. + that will actually be returned. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to configure in the container. + Name to use for registration, null if a default registration. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register a for the given type and name with the container. + No type mapping is performed for this type. + + Container to configure. + The to apply the to. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Type of instance to register (may be an implemented interface instead of the full type). + Container to configure. + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Container to configure. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration and has the container take over the lifetime of the instance. + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload does a default registration (name = null). + + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + This overload automatically has the container take ownership of the . + + Container to configure. + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the default requested type from the container. + + of object to get from the container. + Container to resolve from. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Container to resolve from. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Resolve an instance of the default requested type from the container. + + Container to resolve from. + of object to get from the container. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Container to resolve from. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + of object to perform injection on. + Container to resolve through. + Instance to build up. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Container to resolve through. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + + This overload uses the default registrations. + + + Container to resolve through. + of object to perform injection on. + Instance to build up. + Any overrides for the Buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Creates a new extension object and adds it to the container. + + Type of to add. The extension type + will be resolved from within the supplied . + Container to add the extension to. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + The configuration interface required. + Container to configure. + The requested extension's configuration interface, or null if not found. + + + + Check if a particular type has been registered with the container with + the default name. + + Container to inspect. + Type to check registration for. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Container to inspect. + Type to check registration for. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + Check if a particular type has been registered with the container with the default name. + + Type to check registration for. + Container to inspect. + True if this type has been registered, false if not. + + + + Check if a particular type/name pair has been registered with the container. + + Type to check registration for. + Container to inspect. + Name to check registration for. + True if this type/name pair has been registered, false if not. + + + + The class provides the means for extension objects + to manipulate the internal state of the . + + + + + Store a type/name pair for later resolution. + + + + When users register type mappings (or other things) with a named key, this method + allows you to register that name with the container so that when the + method is called, that name is included in the list that is returned. + + to register. + Name associated with that type. + + + + The container that this context is associated with. + + The object. + + + + The strategies this container uses. + + The that the container uses to build objects. + + + + The strategies this container uses to construct build plans. + + The that this container uses when creating + build plans. + + + + The policies this container uses. + + The the that container uses to build objects. + + + + The that this container uses. + + The is used to manage objects that the container is managing. + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This event is raised when the method is called, providing + the newly created child container to extensions to act on as they see fit. + + + + + An EventArgs class that holds a string Name. + + + + + Create a new with a null name. + + + + + Create a new with the given name. + + Name to store. + + + + The name. + + Name used for this EventArg object. + + + + Event argument class for the event. + + + + + Create a new instance of . + + Type to map from. + Type to map to. + Name for the registration. + to manage instances. + + + + Type to map from. + + + + + Type to map to. + + + + + to manage instances. + + + + + Event argument class for the event. + + + + + Create a default instance. + + + + + Create a instance initialized with the given arguments. + + Type of instance being registered. + The instance object itself. + Name to register under, null if default registration. + object that handles how + the instance will be owned. + + + + Type of instance being registered. + + + Type of instance being registered. + + + + + Instance object being registered. + + Instance object being registered + + + + that controls ownership of + this instance. + + + + + A that lets you specify that + an instance of a generic type parameter should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + name to use when looking up in the container. + + + + Return a instance that will + return this types value for the parameter. + + The actual type to resolve. + The resolution key. + The . + + + + A that lets you specify that + an array containing the registered instances of a generic type parameter + should be resolved. + + + + + Create a new instance that specifies + that the given named generic parameter should be resolved. + + The generic parameter name to resolve. + The values for the elements, that will + be converted to objects. + + + + Test to see if this parameter value has a matching type for the given type. + + Type to check. + True if this parameter value is compatible with type , + false if not. + A type is considered compatible if it is an array type of rank one + and its element type is a generic type parameter with a name matching this generic + parameter name configured for the receiver. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + Name for the type represented by this . + This may be an actual type name or a generic argument name. + + + + + A Unity container extension that allows you to configure + which constructors, properties, and methods get injected + via an API rather than through attributes. + + + + + Initial the container with this extension's functionality. + + + When overridden in a derived class, this method will modify the given + by adding strategies, policies, etc. to + install it's functions into the container. + + + + API to configure the injection settings for a particular type. + + Type the injection is being configured for. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type the injection is being configured for. + Name of registration + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type. + + Type to configure. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type to configure. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + API to configure the injection settings for a particular type/name pair. + + Type of interface/base class being registered (may be null). + Type of actual implementation class being registered. + Name of registration. + Objects containing the details on which members to inject and how. + This extension object. + + + + A class that holds the collection of information + for a constructor, so that the container can + be configured to call this constructor. + + + + + Create a new instance of that looks + for a constructor with the given set of parameters. + + The values for the parameters, that will + be converted to objects. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + An that configures the + container to call a method as part of buildup. + + + + + Create a new instance which will configure + the container to call the given methods with the given parameters. + + Name of the method to call. + Parameter values for the method. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Type of interface registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A small function to handle name matching. You can override this + to do things like case insensitive comparisons. + + MethodInfo for the method you're checking. + Name of the method you're looking for. + True if a match, false if not. + + + + A class that holds on to the given value and provides + the required + when the container is configured. + + + + + Create an instance of that stores + the given value, using the runtime type of that value as the + type of the parameter. + + Value to be injected for this parameter. + + + + Create an instance of that stores + the given value, associated with the given type. + + Type of the parameter. + Value of the parameter + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of that makes it a + little easier to specify the type of the parameter. + + Type of parameter. + + + + Create a new . + + Value for the parameter. + + + + This class stores information about which properties to inject, + and will configure the container accordingly. + + + + + Configure the container to inject the given property name, + resolving the value via the container. + + Name of the property to inject. + + + + Configure the container to inject the given property name, + using the value supplied. This value is converted to an + object using the + rules defined by the + method. + + Name of property to inject. + Value for property. + + + + Add policies to the to configure the + container to call this constructor with the appropriate parameter values. + + Interface being registered, ignored in this implementation. + Type to register. + Name used to resolve the type object. + Policy list to add policies to. + + + + A class that stores a type, and generates a + resolver object that resolves all the named instances or the + type registered in a container. + + + + + Construct a new that + resolves to the given element type and collection of element values. + + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Construct a new that + resolves to the given array and element types and collection of element values. + + The type for the array of elements to resolve. + The type of elements to resolve. + The values for the elements, that will + be converted to objects. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the elements for the array of the parameter. + + + + Construct a new that + resolves to the given element generic type with the given element values. + + The values for the elements, that will + be converted to objects. + + + + Interface defining the behavior of the Unity dependency injection container. + + + + + Register a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Register an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + object that controls how this instance will be managed by the container. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the TypeMappings and other configurations. + Any overrides for the resolve calls. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Resolve access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + A that holds a weak reference to + it's managed instance. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + An implementation of that + creates instances of the type of the given Lifetime Manager + by resolving them through the container. + + + + + Create a new that will + return instances of the given type, creating them by + resolving through the container. + + Container to resolve with. + Type of LifetimeManager to create. + + + + Create a new instance of . + + The new instance. + + + + The type of Lifetime manager that will be created by this factory. + + + + + A that holds the instances given to it, + keeping one instance per thread. + + + + This LifetimeManager does not dispose the instances it holds. + + + + + + Initializes a new instance of the class. + + + + + Retrieve a value from the backing store associated with this Lifetime policy for the + current thread. + + the object desired, or if no such object is currently + stored for the current thread. + + + + Stores the given value into backing store for retrieval later when requested + in the current thread. + + The object being stored. + + + + Remove the given object from backing store. + + Not implemented for this lifetime manager. + + + + An implementation that does nothing, + thus ensuring that instances are created new every time. + + + + + Retrieve a value from the backing store associated with this Lifetime policy. + + the object desired, or null if no such object is currently stored. + + + + Stores the given value into backing store for retrieval later. + + The object being stored. + + + + Remove the given object from backing store. + + + + + This strategy implements the logic that will call container.ResolveAll + when an array parameter is detected. + + + + + Do the PreBuildUp stage of construction. This is where the actual work is performed. + + Current build context. + + + + An implementation of that is + aware of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + + This implementation looks for the Unity on the + parameter and uses it to create an instance of + for this parameter. + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware + of the build keys used by the Unity container. + + + + + Create a instance for the given + . + + Parameter to create the resolver for. + The resolver object. + + + + An implementation of that is aware of + the build keys used by the unity container. + + + + + Create a for the given + property. + + Property to create resolver for. + The resolver object. + + + + A implementation that returns + the value set in the constructor. + + + + + Create a new instance of + which will return the given value when resolved. + + The value to return. + + + + Get the value for a dependency. + + Current build context. + The value for the dependency. + + + + An implementation of that stores a + type and name, and at resolution time puts them together into a + . + + + + + Create an instance of + with the given type and name. + + The type. + The name (may be null). + + + + Resolve the value for a dependency. + + Current build context. + The value for the dependency. + + + + The type that this resolver resolves. + + + + + The name that this resolver resolves. + + + + + An implementation of that resolves to + to an array populated with the values that result from resolving other instances + of . + + + + + Create an instance of + with the given type and a collection of + instances to use when populating the result. + + The type. + The resolver policies to use when populating an array. + + + + Resolve the value for a dependency. + + Current build context. + An array populated with the results of resolving the resolver policies. + + + + An implementation of that selects + the given constructor and creates the appropriate resolvers to call it with + the specified parameters. + + + + + Create an instance of that + will return the given constructor, being passed the given injection values + as parameters. + + The constructor to call. + Set of objects + that describes how to obtain the values for the constructor parameters. + + + + Choose the constructor to call for the given type. + + Current build context + The to add any + generated resolver objects into. + The chosen constructor. + + + + Helper class for implementing selector policies that need to + set up dependency resolver policies. + + + + + Add dependency resolvers to the parameter set. + + Type that's currently being built (used to resolve open generics). + PolicyList to add the resolvers to. + Objects supplying the dependency resolvers. + Result object to store the keys in. + + + + A implementation that calls the specific + methods with the given parameters. + + + + + Add the given method and parameter collection to the list of methods + that will be returned when the selector's + method is called. + + Method to call. + sequence of objects + that describe how to create the method parameter values. + + + + Return the sequence of methods to call while building the target object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of methods to call. + + + + An implementation of which returns + the set of specific properties that the selector was configured with. + + + + + Add a property that will be par of the set returned when the + is called. + + The property to set. + object describing + how to create the value to inject. + + + + Returns sequence of properties on the given type that + should be set as part of building that object. + + Current build context. + The to add any + generated resolver objects into. + Sequence of objects + that contain the properties to set. + + + + The exception thrown by the Unity container when + an attempt to resolve a dependency fails. + + + + + Create a new that records + the exception for the given type and name. + + Type requested from the container. + Name requested from the container. + The actual exception that caused the failure of the build. + The build context representing the failed operation. + + + + The type that was being requested from the container at the time of failure. + + + + + The name that was being requested from the container at the time of failure. + + + + + A class that stores a name and type, and generates a + resolver object that resolves the parameter via the + container. + + + + + Construct a new that + resolves to the given type. + + Type of this parameter. + + + + Construct a new that + resolves the given type and name. + + Type of this parameter. + Name to use when resolving parameter. + + + + Return a instance that will + return this types value for the parameter. + + Type that contains the member that needs this parameter. Used + to resolve open generic parameters. + The . + + + + A generic version of for convenience + when creating them by hand. + + Type of the parameter + + + + Create a new for the given + generic type and the default name. + + + + + Create a new for the given + generic type and name. + + Name to use to resolve this parameter. + + + + An implementation of that wraps a Unity container. + + + + + Initializes a new instance of the class for a container. + + The to wrap with the + interface implementation. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + When implemented by inheriting classes, this method will do the actual work of resolving + the requested service instance. + + Type of instance requested.Name of registered service you want. May be null. + + The requested service instance. + + + + + When implemented by inheriting classes, this method will do the actual work of + resolving all the requested service instances. + + Type of service requested. + + Sequence of service instance objects. + + + + + A static helper class that includes various parameter checking routines. + + + + + Throws if the given argument is null. + + if tested value if null. + Argument value to test. + Name of the argument being tested. + + + + Throws an exception if the tested string argument is null or the empty string. + + Thrown if string value is null. + Thrown if the string is empty + Argument value to check. + Name of argument being checked. + + + + Verifies that an argument type is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy). + + The argument type that will be assigned to. + The type of the value being assigned. + Argument name. + + + + Verifies that an argument instance is assignable from the provided type (meaning + interfaces are implemented, or classes exist in the base class hierarchy, or instance can be + assigned through a runtime wrapper, as is the case for COM Objects). + + The argument type that will be assigned to. + The instance that will be assigned. + Argument name. + + + + A helper class to manage the names that get registered in the container + + + + + The build stages we use in the Unity container + strategy pipeline. + + + + + First stage. By default, nothing happens here. + + + + + Second stage. Type mapping occurs here. + + + + + Third stage. lifetime managers are checked here, + and if they're available the rest of the pipeline is skipped. + + + + + Fourth stage. Reflection over constructors, properties, etc. is + performed here. + + + + + Fifth stage. Instance creation happens here. + + + + + Sixth stage. Property sets and method injection happens here. + + + + + Seventh and final stage. By default, nothing happens here. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The type {0} has multiple constructors of length {1}. Unable to disambiguate.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to The current build operation (build key {2}) failed: {3} (Strategy type {0}, index {1}). + + + + + Looks up a localized string similar to The current type, {0}, is an abstract class and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to The current type, {0}, is delegate and cannot be constructed. Unity only supports resolving Func<T> and Func<IEnumerable<T>> by default.. + + + + + Looks up a localized string similar to The current type, {0}, is an interface and cannot be constructed. Are you missing a type mapping?. + + + + + Looks up a localized string similar to Cannot extract type from build key {0}.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is an open generic method. Open generic methods cannot be injected.. + + + + + Looks up a localized string similar to The property {0} on type {1} is an indexer. Indexed properties cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} has an out parameter. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one out parameter. Methods with out parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) has at least one ref parameter.Methods with ref parameters cannot be injected.. + + + + + Looks up a localized string similar to The method {1} on type {0} is marked for injection, but it is an open generic method. Injection cannot be performed.. + + + + + Looks up a localized string similar to The method {0}.{1}({2}) is static. Static methods cannot be injected.. + + + + + Looks up a localized string similar to The type {0} is an open generic type. An open generic type cannot be resolved.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of constructor {1}. + + + + + Looks up a localized string similar to The parameter {0} could not be resolved when attempting to call constructor {1}.. + + + + + Looks up a localized string similar to Parameter type inference does not work for null values. Indicate the parameter type explicitly using a properly configured instance of the InjectionParameter or InjectionParameter<T> classes.. + + + + + Looks up a localized string similar to Calling constructor {0}. + + + + + Looks up a localized string similar to Calling method {0}.{1}. + + + + + Looks up a localized string similar to An item with the given key is already present in the dictionary.. + + + + + Looks up a localized string similar to The lifetime manager is already registered. Lifetime managers cannot be reused, please create a new one.. + + + + + Looks up a localized string similar to The override marker build plan policy has been invoked. This should never happen, looks like a bug in the container.. + + + + + Looks up a localized string similar to Resolving parameter "{0}" of method {1}.{2}. + + + + + Looks up a localized string similar to The value for parameter "{1}" of method {0} could not be resolved. . + + + + + Looks up a localized string similar to Could not resolve dependency for build key {0}.. + + + + + Looks up a localized string similar to The type {0} has multiple constructors marked with the InjectionConstructor attribute. Unable to disambiguate.. + + + + + Looks up a localized string similar to The supplied type {0} must be an open generic type.. + + + + + Looks up a localized string similar to The supplied type {0} does not have the same number of generic arguments as the target type {1}.. + + + + + Looks up a localized string similar to The type {0} does not have an accessible constructor.. + + + + + Looks up a localized string similar to The type {0} does not have a generic argument named "{1}". + + + + + Looks up a localized string similar to while resolving. + + + + + Looks up a localized string similar to The type {0} does not have a constructor that takes the parameters ({1}).. + + + + + Looks up a localized string similar to The type {0} does not have a public method named {1} that takes the parameters ({2}).. + + + + + Looks up a localized string similar to The type {0} does not contain an instance property named {1}.. + + + + + Looks up a localized string similar to The type {0} is not a generic type, and you are attempting to inject a generic parameter named "{1}".. + + + + + Looks up a localized string similar to The type {0} is not an array type with rank 1, and you are attempting to use a [DependencyArray] attribute on a parameter or property with this type.. + + + + + Looks up a localized string similar to Optional dependencies must be reference types. The type {0} is a value type.. + + + + + Looks up a localized string similar to The property {0} on type {1} is not settable.. + + + + + Looks up a localized string similar to The property {0} on type {1} is of type {2}, and cannot be injected with a value of type {3}.. + + + + + Looks up a localized string similar to The value for the property "{0}" could not be resolved.. + + + + + Looks up a localized string similar to The provided string argument must not be empty.. + + + + + Looks up a localized string similar to Resolution of the dependency failed, type = "{0}", name = "{1}". + Exception occurred while: {2}. + Exception is: {3} - {4} + ----------------------------------------------- + At the time of the exception, the container was: + . + + + + + Looks up a localized string similar to Resolving {0},{1}. + + + + + Looks up a localized string similar to Resolving {0},{1} (mapped from {2}, {3}). + + + + + Looks up a localized string similar to Resolving value for property {0}.{1}. + + + + + Looks up a localized string similar to The constructor {1} selected for type {0} has ref or out parameters. Such parameters are not supported for constructor injection.. + + + + + Looks up a localized string similar to Setting value for property {0}.{1}. + + + + + Looks up a localized string similar to The type {0} cannot be constructed. You must configure the container to supply this value.. + + + + + Looks up a localized string similar to The type {1} cannot be assigned to variables of type {0}.. + + + + + Looks up a localized string similar to <unknown>. + + + + + A simple, extensible dependency injection container. + + + + + Create a default . + + + + + Create a with the given parent container. + + The parent . The current object + will apply its own settings first, and then check the parent for additional ones. + + + + RegisterType a type mapping with the container, where the created instances will use + the given . + + that will be requested. + that will actually be returned. + Name to use for registration, null if a default registration. + The that controls the lifetime + of the returned instance. + Injection configuration objects. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + RegisterType an instance with the container. + + + + Instance registration is much like setting a type as a singleton, except that instead + of the container creating the instance the first time it is requested, the user + creates the instance ahead of type and adds that instance to the container. + + + Type of instance to register (may be an implemented interface instead of the full type). + Object to returned. + Name for registration. + + If true, the container will take over the lifetime of the instance, + calling Dispose on it (if it's ) when the container is Disposed. + + If false, container will not maintain a strong reference to . User is responsible + for disposing instance, and for keeping the instance from being garbage collected. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get an instance of the requested type with the given name from the container. + + of object to get from the container. + Name of the object to retrieve. + Any overrides for the resolve call. + The retrieved object. + + + + Return instances of all registered types requested. + + + + This method is useful if you've registered multiple types with the same + but different names. + + + Be aware that this method does NOT return an instance for the default (unnamed) registration. + + + The type requested. + Any overrides for the resolve calls. + Set of objects of type . + + + + Run an existing object through the container and perform injection on it. + + + + This method is useful when you don't control the construction of an + instance (ASP.NET pages or objects created via XAML, for instance) + but you still want properties and other injection performed. + + of object to perform injection on. + Instance to build up. + name to use when looking up the typemappings and other configurations. + Any overrides for the buildup. + The resulting object. By default, this will be , but + container extensions may add things like automatic proxy creation which would + cause this to return a different object (but still type compatible with ). + + + + Run an existing object through the container, and clean it up. + + The object to tear down. + + + + Add an extension object to the container. + + to add. + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Get access to a configuration interface exposed by an extension. + + Extensions can expose configuration interfaces as well as adding + strategies and policies to the container. This method walks the list of + added extensions and returns the first one that implements the requested type. + + of configuration interface required. + The requested extension's configuration interface, or null if not found. + + + + Remove all installed extensions from this container. + + + + This method removes all extensions from the container, including the default ones + that implement the out-of-the-box behavior. After this method, if you want to use + the container again you will need to either read the default extensions or replace + them with your own. + + + The registered instances and singletons that have already been set up in this container + do not get removed. + + + The object that this method was called on (this in C#, Me in Visual Basic). + + + + Create a child container. + + + A child container shares the parent's configuration, but can be configured with different + settings or lifetime. + The new child container. + + + + Dispose this container instance. + + + Disposing the container also disposes any child containers, + and disposes any instances whose lifetimes are managed + by the container. + + + + + Dispose this container instance. + + + This class doesn't have a finalizer, so will always be true. + True if being called from the IDisposable.Dispose + method, false if being called from a finalizer. + + + + Remove policies associated with building this type. This removes the + compiled build plan so that it can be rebuilt with the new settings + the next time this type is resolved. + + Type of object to clear the plan for. + Name the object is being registered with. + + + + The parent of this container. + + The parent container, or null if this container doesn't have one. + + + + Get a sequence of that describe the current state + of the container. + + + + + Implementation of the ExtensionContext that is actually used + by the UnityContainer implementation. + + + This is a nested class so that it can access state in the + container that would otherwise be inaccessible. + + + + + This event is raised when the method, + or one of its overloads, is called. + + + + + This extension supplies the default behavior of the UnityContainer API + by handling the context events and setting policies. + + + + + Install the default container behavior into the container. + + + + + Remove the default behavior from the container. + + + + + This extension installs the default strategies and policies into the container + to implement the standard behavior of the Unity container. + + + + + Add the default ObjectBuilder strategies & policies to the container. + + + + + Helper class to wrap common reflection stuff dealing with + methods. + + + + + Create a new instance that + lets us do more reflection stuff on that method. + + The method to reflect on. + + + + Given our set of generic type arguments, + + The generic type arguments. + An array with closed parameter types. + + + + Returns true if any of the parameters of this method + are open generics. + + + + + Return the of each parameter for this + method. + + Sequence of objects, one for + each parameter in order. + + + + A helper class that encapsulates two different + data items together into a a single item. + + + + + Create a new containing + the two values give. + + First value + Second value + + + + The first value of the pair. + + + + + The second value of the pair. + + + + + Container for a Pair helper method. + + + + + A helper factory method that lets users take advantage of type inference. + + Type of first value. + Type of second value. + First value. + Second value. + A new instance. + + + + A utility class that handles the logic of matching parameter + lists, so we can find the right constructor and method overloads. + + + + + Create a new that will attempt to + match the given parameter types. + + Target parameters to match against. + + + + Tests to see if the given set of types matches the ones + we're looking for. + + parameter list to look for. + true if they match, false if they don't. + + + + Tests to see if the given set of types matches the ones we're looking for. + + Candidate method signature to look for. + True if they match, false if they don't. + + + + Another reflection helper class that has extra methods + for dealing with ParameterInfo. + + + + + A small helper class to encapsulate details of the + reflection API, particularly around generics. + + + + + Create a new instance that + lets you look at information about the given type. + + Type to do reflection on. + + + + Test the given object, looking at + the parameters. Determine if any of the parameters are + open generic types that need type attributes filled in. + + The method to check. + True if any of the parameters are open generics. False if not. + + + + If this type is an open generic, use the + given array to + determine what the required closed type is and return that. + + If the parameter is not an open type, just + return this parameter's type. + Type arguments to substitute in for + the open type parameters. + Corresponding closed type of this parameter. + + + + Given a generic argument name, return the corresponding type for this + closed type. For example, if the current type is SomeType<User>, and the + corresponding definition was SomeType<TSomething>, calling this method + and passing "TSomething" will return typeof(User). + + Name of the generic parameter. + Type of the corresponding generic parameter, or null if there + is no matching name. + + + + The object we're reflecting over. + + + + + Is this type generic? + + + + + Is this type an open generic (no type parameter specified) + + + + + Is this type an array type? + + + + + Is this type an array of generic elements? + + + + + The type of the elements in this type (if it's an array). + + + + + Returns all the public constructors defined for the current reflected . + + + An enumeration of ConstructorInfo objects representing all the public instance constructors defined for the + current reflected , but not including the type initializer (static constructor). + + + + + Create a new instance of that + lets you query information about the given ParameterInfo object. + + Parameter to query. + + + + A set of helper methods to pick through lambdas and pull out + from them. + + + + + Pull out a object from an expression of the form + () => SomeClass.SomeMethod() + + Expression describing the method to call. + Corresponding . + + + + Pull out a object from an expression of the form + x => x.SomeMethod() + + The type where the method is defined. + Expression describing the method to call. + Corresponding . + + + + Pull out a object for the get method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the get method is to be extracted. + Corresponding . + + + + Pull out a object for the set method from an expression of the form + x => x.SomeProperty + + The type where the method is defined. + The type for the property. + Expression describing the property for which the set method is to be extracted. + Corresponding . + + + + + + + + + + + + + Pull out a object from an expression of the form () => new SomeType() + + The type where the constructor is defined. + Expression invoking the desired constructor. + Corresponding . + + + diff --git a/tools/NuGet.exe b/tools/NuGet.exe index 6198d99..c41a0d0 100644 Binary files a/tools/NuGet.exe and b/tools/NuGet.exe differ diff --git a/tools/UnityAutoMoq.dll b/tools/UnityAutoMoq.dll new file mode 100644 index 0000000..95d68f3 Binary files /dev/null and b/tools/UnityAutoMoq.dll differ diff --git a/tools/UnityAutoMoqPlus.3.0.0.nupkg b/tools/UnityAutoMoqPlus.3.0.0.nupkg new file mode 100644 index 0000000..9245007 Binary files /dev/null and b/tools/UnityAutoMoqPlus.3.0.0.nupkg differ