|
From: <jer...@us...> - 2009-02-05 15:39:04
|
Revision: 233
http://structuremap.svn.sourceforge.net/structuremap/?rev=233&view=rev
Author: jeremydmiller
Date: 2009-02-05 15:38:53 +0000 (Thu, 05 Feb 2009)
Log Message:
-----------
picking up missed files, some extensions to the With() syntax
Modified Paths:
--------------
trunk/Source/CommonAssemblyInfo.cs
trunk/Source/HTML/ScanningAssemblies.htm
trunk/Source/StructureMap/Container.cs
trunk/Source/StructureMap/ExplicitArgsExpression.cs
trunk/Source/StructureMap/IContainer.cs
trunk/Source/StructureMap/ObjectFactory.cs
trunk/Source/StructureMap/Pipeline/ExplicitArguments.cs
trunk/Source/StructureMap/StructureMap.csproj
trunk/Source/StructureMap/TypeExtensions.cs
trunk/Source/StructureMap.Testing/Graph/TestExplicitArguments.cs
trunk/Source/StructureMap.Testing/Pipeline/GenericsHelperExpressionTester.cs
trunk/Source/StructureMap.sln
trunk/cruise.build
Added Paths:
-----------
trunk/Source/StructureMap/CloseGenericTypeExpression.cs
trunk/Source/StructureMap.Prism/Properties/
trunk/Source/StructureMap.Prism/Properties/AssemblyInfo.cs
trunk/Source/StructureMap.Prism/StructureMap.Prism.csproj
trunk/Source/StructureMap.Testing.Prism/Properties/
trunk/Source/StructureMap.Testing.Prism/Properties/AssemblyInfo.cs
trunk/Source/StructureMap.Testing.Prism/StructureMap.Testing.Prism.csproj
trunk/bin/Prism/
trunk/bin/Prism/Prism1/
trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.UnityExtensions.dll
trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.UnityExtensions.pdb
trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.UnityExtensions.xml
trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.Wpf.dll
trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.Wpf.pdb
trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.Wpf.xml
trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.dll
trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.pdb
trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.xml
trunk/bin/Prism/Prism1/Microsoft.Practices.EnterpriseLibrary.Common.dll
trunk/bin/Prism/Prism1/Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
trunk/bin/Prism/Prism1/Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
trunk/bin/Prism/Prism1/Microsoft.Practices.EnterpriseLibrary.Logging.dll
Modified: trunk/Source/CommonAssemblyInfo.cs
===================================================================
--- trunk/Source/CommonAssemblyInfo.cs 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/CommonAssemblyInfo.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -13,11 +13,11 @@
//------------------------------------------------------------------------------
[assembly: ComVisibleAttribute(false)]
-[assembly: AssemblyVersionAttribute("2.5.3.0000")]
+[assembly: AssemblyVersionAttribute("2.5.4.0000")]
[assembly: AssemblyCopyrightAttribute("Copyright (c) 2003-2008, Jeremy D. Miller")]
[assembly: AssemblyProductAttribute("StructureMap")]
[assembly: AssemblyCompanyAttribute("")]
[assembly: AssemblyConfigurationAttribute("release")]
-[assembly: AssemblyInformationalVersionAttribute("2.5.3.0000")]
-[assembly: AssemblyFileVersionAttribute("2.5.3.0000")]
+[assembly: AssemblyInformationalVersionAttribute("2.5.4.0000")]
+[assembly: AssemblyFileVersionAttribute("2.5.4.0000")]
Modified: trunk/Source/HTML/ScanningAssemblies.htm
===================================================================
--- trunk/Source/HTML/ScanningAssemblies.htm 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/HTML/ScanningAssemblies.htm 2009-02-05 15:38:53 UTC (rev 233)
@@ -1148,7 +1148,7 @@
<p style="margin: 0px;">
}</p>
<p style="margin: 0px;">
-& }</p>
+ }</p>
</div>
<!--EndFragment-->
<p>You apply the custom ITypeScanner by simply calling With() inside of a Scan()
Added: trunk/Source/StructureMap/CloseGenericTypeExpression.cs
===================================================================
--- trunk/Source/StructureMap/CloseGenericTypeExpression.cs (rev 0)
+++ trunk/Source/StructureMap/CloseGenericTypeExpression.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -0,0 +1,48 @@
+using System;
+
+namespace StructureMap
+{
+ public interface OpenGenericTypeSpecificationExpression
+ {
+ T As<T>();
+ }
+
+ public class CloseGenericTypeExpression : OpenGenericTypeSpecificationExpression
+ {
+ private readonly object _subject;
+ private readonly IContainer _container;
+ private Type _pluginType;
+
+ public CloseGenericTypeExpression(object subject, IContainer container)
+ {
+ _subject = subject;
+ _container = container;
+ }
+
+ /// <summary>
+ /// Specify the open generic type that should have a single generic parameter
+ /// </summary>
+ /// <param name="type"></param>
+ /// <returns></returns>
+ public OpenGenericTypeSpecificationExpression GetClosedTypeOf(Type type)
+ {
+ if (!type.IsGeneric())
+ {
+ throw new StructureMapException(285);
+ }
+
+ _pluginType = type.MakeGenericType(_subject.GetType());
+ return this;
+ }
+
+ /// <summary>
+ /// specify what type you'd like the service returned as
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <returns></returns>
+ T OpenGenericTypeSpecificationExpression.As<T>()
+ {
+ return (T) _container.With(_subject.GetType(), _subject).GetInstance(_pluginType);
+ }
+ }
+}
\ No newline at end of file
Modified: trunk/Source/StructureMap/Container.cs
===================================================================
--- trunk/Source/StructureMap/Container.cs 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/StructureMap/Container.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -411,6 +411,18 @@
}
/// <summary>
+ /// Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency
+ /// of type T should be "arg"
+ /// </summary>
+ /// <param name="pluginType"></param>
+ /// <param name="arg"></param>
+ /// <returns></returns>
+ public ExplicitArgsExpression With(Type pluginType, object arg)
+ {
+ return new ExplicitArgsExpression(this).With(pluginType, arg);
+ }
+
+ /// <summary>
/// Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency or primitive argument
/// with the designated name should be the next value.
/// </summary>
@@ -549,5 +561,23 @@
{
T GetInstanceAs<T>();
}
+
+ /// <summary>
+ /// Shortcut syntax for using an object to find a service that handles
+ /// that type of object by using an open generic type
+ /// </summary>
+ /// <example>
+ /// IHandler handler = container.ForObject(shipment)
+ /// .GetClosedTypeOf(typeof (IHandler<>))
+ /// .As<IHandler>();
+ /// </example>
+ /// <param name="subject"></param>
+ /// <returns></returns>
+ public CloseGenericTypeExpression ForObject(object subject)
+ {
+ return new CloseGenericTypeExpression(subject, this);
+ }
}
+
+
}
\ No newline at end of file
Modified: trunk/Source/StructureMap/ExplicitArgsExpression.cs
===================================================================
--- trunk/Source/StructureMap/ExplicitArgsExpression.cs 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/StructureMap/ExplicitArgsExpression.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -49,6 +49,18 @@
}
/// <summary>
+ /// Pass in additional arguments by type
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="arg"></param>
+ /// <returns></returns>
+ public ExplicitArgsExpression With(Type pluginType, object arg)
+ {
+ _args.Set(pluginType, arg);
+ return this;
+ }
+
+ /// <summary>
/// Pass in additional arguments by name
/// </summary>
/// <param name="argName"></param>
Modified: trunk/Source/StructureMap/IContainer.cs
===================================================================
--- trunk/Source/StructureMap/IContainer.cs 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/StructureMap/IContainer.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -246,5 +246,27 @@
/// <param name="name"></param>
/// <returns></returns>
T GetInstance<T>(ExplicitArguments args, string name);
+
+ /// <summary>
+ /// Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency
+ /// of type T should be "arg"
+ /// </summary>
+ /// <param name="pluginType"></param>
+ /// <param name="arg"></param>
+ /// <returns></returns>
+ ExplicitArgsExpression With(Type pluginType, object arg);
+
+ /// <summary>
+ /// Shortcut syntax for using an object to find a service that handles
+ /// that type of object by using an open generic type
+ /// </summary>
+ /// <example>
+ /// IHandler handler = container.ForObject(shipment)
+ /// .GetClosedTypeOf(typeof (IHandler<>))
+ /// .As<IHandler>();
+ /// </example>
+ /// <param name="subject"></param>
+ /// <returns></returns>
+ CloseGenericTypeExpression ForObject(object subject);
}
}
\ No newline at end of file
Modified: trunk/Source/StructureMap/ObjectFactory.cs
===================================================================
--- trunk/Source/StructureMap/ObjectFactory.cs 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/StructureMap/ObjectFactory.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -257,6 +257,18 @@
}
/// <summary>
+ /// Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency
+ /// of type T should be "arg"
+ /// </summary>
+ /// <param name="pluginType"></param>
+ /// <param name="arg"></param>
+ /// <returns></returns>
+ public static ExplicitArgsExpression With(Type pluginType, object arg)
+ {
+ return container.With(pluginType, arg);
+ }
+
+ /// <summary>
/// Removes all configured instances of type T from the Container. Use with caution!
/// </summary>
/// <typeparam name="T"></typeparam>
@@ -438,5 +450,22 @@
return container.ForGenericType(templateType);
}
+
+ /// <summary>
+ /// Shortcut syntax for using an object to find a service that handles
+ /// that type of object by using an open generic type
+ /// </summary>
+ /// <example>
+ /// IHandler handler = container.ForObject(shipment)
+ /// .GetClosedTypeOf(typeof (IHandler<>))
+ /// .As<IHandler>();
+ /// </example>
+ /// <param name="subject"></param>
+ /// <returns></returns>
+ public static CloseGenericTypeExpression ForObject(object subject)
+ {
+ return container.ForObject(subject);
+ }
+
}
}
\ No newline at end of file
Modified: trunk/Source/StructureMap/Pipeline/ExplicitArguments.cs
===================================================================
--- trunk/Source/StructureMap/Pipeline/ExplicitArguments.cs 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/StructureMap/Pipeline/ExplicitArguments.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -29,9 +29,14 @@
public void Set<T>(T arg)
{
- _children.Add(typeof (T), arg);
+ Set(typeof (T), arg);
}
+ public void Set(Type pluginType, object arg)
+ {
+ _children.Add(pluginType, arg);
+ }
+
public void SetArg(string key, object argValue)
{
_args.Add(key, argValue);
Modified: trunk/Source/StructureMap/StructureMap.csproj
===================================================================
--- trunk/Source/StructureMap/StructureMap.csproj 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/StructureMap/StructureMap.csproj 2009-02-05 15:38:53 UTC (rev 233)
@@ -56,7 +56,7 @@
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
- <NoWarn>618,1591</NoWarn>
+ <NoWarn>618,1591,1573,1711,1570</NoWarn>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
@@ -77,7 +77,7 @@
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
- <NoWarn>618,1591</NoWarn>
+ <NoWarn>618,1591,1573,1711,1570</NoWarn>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
@@ -381,6 +381,7 @@
<Link>Properties\structuremap.snk</Link>
</None>
<None Include="ConfigurationClasses.cd" />
+ <Compile Include="CloseGenericTypeExpression.cs" />
<Compile Include="ConfigurationExpression.cs" />
<Compile Include="Configuration\DictionaryReader.cs" />
<Compile Include="Configuration\DSL\Expressions\InstanceExpression.cs" />
Modified: trunk/Source/StructureMap/TypeExtensions.cs
===================================================================
--- trunk/Source/StructureMap/TypeExtensions.cs 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/StructureMap/TypeExtensions.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -69,7 +69,7 @@
}
}
- return null;
+ return pluggedType.BaseType == typeof(object) ? null : pluggedType.BaseType.FindInterfaceThatCloses(templateType);
}
public static string GetName(this Type type)
Added: trunk/Source/StructureMap.Prism/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Source/StructureMap.Prism/Properties/AssemblyInfo.cs (rev 0)
+++ trunk/Source/StructureMap.Prism/Properties/AssemblyInfo.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("StructureMap.Prism")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("StructureMap.Prism")]
+[assembly: AssemblyCopyright("Copyright © 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("2b71f182-5fdb-4df8-913e-76c95445fd1f")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Added: trunk/Source/StructureMap.Prism/StructureMap.Prism.csproj
===================================================================
--- trunk/Source/StructureMap.Prism/StructureMap.Prism.csproj (rev 0)
+++ trunk/Source/StructureMap.Prism/StructureMap.Prism.csproj 2009-02-05 15:38:53 UTC (rev 233)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{150CACB1-7F59-4C68-8830-F277E0E98A3F}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>StructureMap.Prism</RootNamespace>
+ <AssemblyName>StructureMap.Prism</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <SignAssembly>false</SignAssembly>
+ <AssemblyOriginatorKeyFile>structuremap.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Practices.Composite, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\bin\Prism\Prism1\Microsoft.Practices.Composite.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Practices.Composite.Wpf, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\bin\Prism\Prism1\Microsoft.Practices.Composite.Wpf.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="DefaultRegistry.cs" />
+ <Compile Include="PrismBootstrapper.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="StructureMapContainerFacade.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="structuremap.snk" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\StructureMap\StructureMap.csproj">
+ <Project>{3F36EA80-2F9A-4DAD-BA27-5AC6163A2EE3}</Project>
+ <Name>StructureMap</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Modified: trunk/Source/StructureMap.Testing/Graph/TestExplicitArguments.cs
===================================================================
--- trunk/Source/StructureMap.Testing/Graph/TestExplicitArguments.cs 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/StructureMap.Testing/Graph/TestExplicitArguments.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -179,6 +179,53 @@
}
[Test]
+ public void Fill_in_argument_by_type()
+ {
+ var container = new Container(x =>
+ {
+ x.ForRequestedType<IView>().TheDefaultIsConcreteType<View>();
+ });
+
+ var theNode = new SpecialNode();
+ var theTrade = new Trade();
+
+ var command = container
+ .With(typeof(Node), theNode)
+ .With(theTrade)
+ .GetInstance<Command>();
+
+ Assert.IsInstanceOfType(typeof(View), command.View);
+ Assert.AreSame(theNode, command.Node);
+ Assert.AreSame(theTrade, command.Trade);
+ }
+
+ [Test]
+ public void Fill_in_argument_by_type_with_ObjectFactory()
+ {
+ ObjectFactory.Initialize(x =>
+ {
+ x.ForRequestedType<IView>().TheDefaultIsConcreteType<View>();
+ });
+
+ var theNode = new SpecialNode();
+ var theTrade = new Trade();
+
+ var command = ObjectFactory
+ .With(typeof(Node), theNode)
+ .With(theTrade)
+ .GetInstance<Command>();
+
+ Assert.IsInstanceOfType(typeof(View), command.View);
+ Assert.AreSame(theNode, command.Node);
+ Assert.AreSame(theTrade, command.Trade);
+ }
+
+ public class SpecialNode : Node
+ {
+
+ }
+
+ [Test]
public void NowDoItWithObjectFactoryItself()
{
ObjectFactory.Initialize(x =>
Modified: trunk/Source/StructureMap.Testing/Pipeline/GenericsHelperExpressionTester.cs
===================================================================
--- trunk/Source/StructureMap.Testing/Pipeline/GenericsHelperExpressionTester.cs 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/StructureMap.Testing/Pipeline/GenericsHelperExpressionTester.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -140,4 +140,75 @@
return null;
}
}
+
+
+ [TestFixture]
+ public class when_getting_a_closed_type_from_an_open_generic_type_by_providing_an_input_parameter
+ {
+ [Test]
+ public void fetch_the_object()
+ {
+ var container = new Container(x =>
+ {
+ x.ForRequestedType<IHandler<Shipment>>().TheDefaultIsConcreteType<ShipmentHandler>();
+ });
+
+ var shipment = new Shipment();
+
+ IHandler handler = container
+ .ForObject(shipment)
+ .GetClosedTypeOf(typeof (IHandler<>))
+ .As<IHandler>();
+
+ handler.ShouldBeOfType<ShipmentHandler>().Shipment.ShouldBeTheSameAs(shipment);
+ }
+ }
+
+ [TestFixture]
+ public class when_getting_a_closed_type_from_an_open_generic_type_by_providing_an_input_parameter_from_ObjectFactory
+ {
+ [Test]
+ public void fetch_the_object()
+ {
+ ObjectFactory.Initialize(x =>
+ {
+ x.ForRequestedType<IHandler<Shipment>>().TheDefaultIsConcreteType<ShipmentHandler>();
+ });
+
+ var shipment = new Shipment();
+ IHandler handler = ObjectFactory.ForObject(shipment).GetClosedTypeOf(typeof(IHandler<>)).As<IHandler>();
+
+ handler.ShouldBeOfType<ShipmentHandler>().Shipment.ShouldBeTheSameAs(shipment);
+ }
+ }
+
+ public class Shipment
+ {
+
+ }
+
+ public interface IHandler<T> : IHandler
+ {
+
+ }
+
+ public interface IHandler
+ {
+
+ }
+
+ public class ShipmentHandler : IHandler<Shipment>
+ {
+ private readonly Shipment _shipment;
+
+ public ShipmentHandler(Shipment shipment)
+ {
+ _shipment = shipment;
+ }
+
+ public Shipment Shipment
+ {
+ get { return _shipment; }
+ }
+ }
}
\ No newline at end of file
Added: trunk/Source/StructureMap.Testing.Prism/Properties/AssemblyInfo.cs
===================================================================
--- trunk/Source/StructureMap.Testing.Prism/Properties/AssemblyInfo.cs (rev 0)
+++ trunk/Source/StructureMap.Testing.Prism/Properties/AssemblyInfo.cs 2009-02-05 15:38:53 UTC (rev 233)
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("StructureMap.Testing.Prism")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("StructureMap.Testing.Prism")]
+[assembly: AssemblyCopyright("Copyright © 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("f0176eaa-10fe-453d-abe0-2fb3df709cde")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Added: trunk/Source/StructureMap.Testing.Prism/StructureMap.Testing.Prism.csproj
===================================================================
--- trunk/Source/StructureMap.Testing.Prism/StructureMap.Testing.Prism.csproj (rev 0)
+++ trunk/Source/StructureMap.Testing.Prism/StructureMap.Testing.Prism.csproj 2009-02-05 15:38:53 UTC (rev 233)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7F72EFA9-B575-462A-855F-132F8DBC6E9D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>StructureMap.Testing.Prism</RootNamespace>
+ <AssemblyName>StructureMap.Testing.Prism</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Practices.Composite, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\bin\Prism\Prism1\Microsoft.Practices.Composite.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Practices.Composite.Wpf, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\bin\Prism\Prism1\Microsoft.Practices.Composite.Wpf.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework, Version=2.4.0.2, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\bin\NUnit\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="DefaultRegistryTester.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="StructureMapContainerFacadeTester.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\StructureMap.Prism\StructureMap.Prism.csproj">
+ <Project>{150CACB1-7F59-4C68-8830-F277E0E98A3F}</Project>
+ <Name>StructureMap.Prism</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\StructureMap.Testing\StructureMap.Testing.csproj">
+ <Project>{63C2742D-B6E2-484F-AFDB-346873075C5E}</Project>
+ <Name>StructureMap.Testing</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\StructureMap\StructureMap.csproj">
+ <Project>{3F36EA80-2F9A-4DAD-BA27-5AC6163A2EE3}</Project>
+ <Name>StructureMap</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Modified: trunk/Source/StructureMap.sln
===================================================================
--- trunk/Source/StructureMap.sln 2009-02-01 20:03:18 UTC (rev 232)
+++ trunk/Source/StructureMap.sln 2009-02-05 15:38:53 UTC (rev 233)
@@ -57,10 +57,6 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TableOfContentsBuilder", "TableOfContentsBuilder\TableOfContentsBuilder.csproj", "{8A9EAE91-F3F5-4919-86FC-6D98D00FC77F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StructureMap.Prism", "StructureMap.Prism\StructureMap.Prism.csproj", "{150CACB1-7F59-4C68-8830-F277E0E98A3F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StructureMap.Testing.Prism", "StructureMap.Testing.Prism\StructureMap.Testing.Prism.csproj", "{7F72EFA9-B575-462A-855F-132F8DBC6E9D}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Build|.NET = Build|.NET
@@ -296,36 +292,6 @@
{8A9EAE91-F3F5-4919-86FC-6D98D00FC77F}.Release|Any CPU.Build.0 = Release|Any CPU
{8A9EAE91-F3F5-4919-86FC-6D98D00FC77F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{8A9EAE91-F3F5-4919-86FC-6D98D00FC77F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Build|.NET.ActiveCfg = Release|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Build|Any CPU.ActiveCfg = Release|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Build|Any CPU.Build.0 = Release|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Build|Mixed Platforms.ActiveCfg = Release|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Build|Mixed Platforms.Build.0 = Release|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Debug|.NET.ActiveCfg = Debug|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Release|.NET.ActiveCfg = Release|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Release|Any CPU.Build.0 = Release|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {150CACB1-7F59-4C68-8830-F277E0E98A3F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Build|.NET.ActiveCfg = Release|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Build|Any CPU.ActiveCfg = Release|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Build|Any CPU.Build.0 = Release|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Build|Mixed Platforms.ActiveCfg = Release|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Build|Mixed Platforms.Build.0 = Release|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Debug|.NET.ActiveCfg = Debug|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Release|.NET.ActiveCfg = Release|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Release|Any CPU.Build.0 = Release|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {7F72EFA9-B575-462A-855F-132F8DBC6E9D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Added: trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.UnityExtensions.dll
===================================================================
(Binary files differ)
Property changes on: trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.UnityExtensions.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.UnityExtensions.pdb
===================================================================
(Binary files differ)
Property changes on: trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.UnityExtensions.pdb
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.UnityExtensions.xml
===================================================================
--- trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.UnityExtensions.xml (rev 0)
+++ trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.UnityExtensions.xml 2009-02-05 15:38:53 UTC (rev 233)
@@ -0,0 +1,230 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>Microsoft.Practices.Composite.UnityExtensions</name>
+ </assembly>
+ <members>
+ <member name="T:Microsoft.Practices.Composite.UnityExtensions.Properties.Resources">
+ <summary>
+ A strongly-typed resource class, for looking up localized strings, etc.
+ </summary>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.UnityExtensions.Properties.Resources.ResourceManager">
+ <summary>
+ Returns the cached ResourceManager instance used by this class.
+ </summary>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.UnityExtensions.Properties.Resources.Culture">
+ <summary>
+ Overrides the current thread's CurrentUICulture property for all
+ resource lookups using this strongly typed resource class.
+ </summary>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.UnityExtensions.Properties.Resources.NotOverwrittenGetModuleEnumeratorException">
+ <summary>
+ Looks up a localized string similar to The method 'GetModuleEnumerator' of the bootstrapper must be overwritten in order to use the default module initialization logic..
+ </summary>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.UnityExtensions.Properties.Resources.NullLoggerFacadeException">
+ <summary>
+ Looks up a localized string similar to The ILoggerFacade is required and cannot be null..
+ </summary>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.UnityExtensions.Properties.Resources.NullModuleEnumeratorException">
+ <summary>
+ Looks up a localized string similar to The IModuleEnumerator is required and cannot be null in order to initialize the modules..
+ </summary>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.UnityExtensions.Properties.Resources.NullModuleLoaderException">
+ <summary>
+ Looks up a localized string similar to The IModuleLoader is required and cannot be null in order to initialize the modules..
+ </summary>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.UnityExtensions.Properties.Resources.NullUnityContainerException">
+ <summary>
+ Looks up a localized string similar to The IUnityContainer is required and cannot be null..
+ </summary>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.UnityExtensions.Properties.Resources.TypeMappingAlreadyRegistered">
+ <summary>
+ Looks up a localized string similar to Type '{0}' was already registered by the application. Skipping....
+ </summary>
+ </member>
+ <member name="T:Microsoft.Practices.Composite.UnityExtensions.UnityContainerHelper">
+ <summary>
+ Extensions methods to extend and facilitate the usage of <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/>.
+ </summary>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityContainerHelper.IsTypeRegistered(Microsoft.Practices.Unity.IUnityContainer,System.Type)">
+ <summary>
+ Returns whether a specified type has a type mapping registered in the container.
+ </summary>
+ <param name="container">The <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> to check for the type mapping.</param>
+ <param name="type">The type to check if there is a type mapping for.</param>
+ <returns><see langword="true"/> if there is a type mapping registered for <paramref name="type"/>.</returns>
+ <remarks>In order to use this extension method, you first need to add the
+ <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> extension to the <see cref="T:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapperExtension"/>.
+ </remarks>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityContainerHelper.TryResolve``1(Microsoft.Practices.Unity.IUnityContainer)">
+ <summary>
+ Utility method to try to resolve a service from the container avoiding an exception if the container cannot build the type.
+ </summary>
+ <param name="container">The cointainer that will be used to resolve the type.</param>
+ <typeparam name="T">The type to resolve.</typeparam>
+ <returns>The instance of <typeparamref name="T"/> built up by the container.</returns>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityContainerHelper.TryResolve(Microsoft.Practices.Unity.IUnityContainer,System.Type)">
+ <summary>
+ Utility method to try to resolve a service from the container avoiding an exception if the container cannot build the type.
+ </summary>
+ <param name="container">The cointainer that will be used to resolve the type.</param>
+ <param name="typeToResolve">The type to resolve.</param>
+ <returns>The instance of <paramref name="typeToResolve"/> built up by the container.</returns>
+ </member>
+ <member name="T:Microsoft.Practices.Composite.UnityExtensions.UnityContainerAdapter">
+ <summary>
+ Defines a <seealso cref="T:Microsoft.Practices.Unity.IUnityContainer"/> adapter for
+ the <see cref="T:Microsoft.Practices.Composite.IContainerFacade"/> interface
+ to be used by the Composite Application Library.
+ </summary>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityContainerAdapter.#ctor(Microsoft.Practices.Unity.IUnityContainer)">
+ <summary>
+ Initializes a new instance of <see cref="T:Microsoft.Practices.Composite.UnityExtensions.UnityContainerAdapter"/>.
+ </summary>
+ <param name="unityContainer">The <seealso cref="T:Microsoft.Practices.Unity.IUnityContainer"/> that will be used
+ by the <see cref="M:Microsoft.Practices.Composite.UnityExtensions.UnityContainerAdapter.Resolve(System.Type)"/> and <see cref="M:Microsoft.Practices.Composite.UnityExtensions.UnityContainerAdapter.TryResolve(System.Type)"/> methods.</param>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityContainerAdapter.Resolve(System.Type)">
+ <summary>
+ Resolve an instance of the requested type from the container.
+ </summary>
+ <param name="type">The type of object to get from the container.</param>
+ <returns>An instance of <paramref name="type"/>.</returns>
+ <exception cref="T:Microsoft.Practices.Unity.ResolutionFailedException"><paramref name="type"/> cannot be resolved by the container.</exception>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityContainerAdapter.TryResolve(System.Type)">
+ <summary>
+ Tries to resolve an instance of the requested type from the container.
+ </summary>
+ <param name="type">The type of object to get from the container.</param>
+ <returns>
+ An instance of <paramref name="type"/>.
+ If the type cannot be resolved it will return a <see langword="null"/> value.
+ </returns>
+ </member>
+ <member name="T:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper">
+ <summary>
+ Base class that provides a basic bootstrapping sequence that
+ registers most of the Composite Application Library assets
+ in a <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/>.
+ </summary>
+ <remarks>
+ This class must be overriden to provide application specific configuration.
+ </remarks>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.Run">
+ <summary>
+ Runs the bootstrapper process.
+ </summary>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.Run(System.Boolean)">
+ <summary>
+ Run the bootstrapper process.
+ </summary>
+ <param name="useDefaultConfiguration">If <see langword="true"/>, registers default Composite Application Library services in the container. This is the default behavior.</param>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.ConfigureContainer">
+ <summary>
+ Configures the <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/>. May be overwritten in a derived class to add specific
+ type mappings required by the application.
+ </summary>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.ConfigureRegionAdapterMappings">
+ <summary>
+ Configures the default region adapter mappings to use in the application, in order
+ to adapt UI controls defined in XAML to use a region and register it automatically.
+ May be overwritten in a derived class to add specific mappings required by the application.
+ </summary>
+ <returns>The <see cref="T:Microsoft.Practices.Composite.Wpf.Regions.RegionAdapterMappings"/> instance containing all the mappings.</returns>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.InitializeModules">
+ <summary>
+ Initializes the modules. May be overwritten in a derived class to use custom
+ module loading and avoid using an <seealso cref="T:Microsoft.Practices.Composite.Modularity.IModuleLoader"/> and
+ <seealso cref="T:Microsoft.Practices.Composite.Modularity.IModuleEnumerator"/>.
+ </summary>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.CreateContainer">
+ <summary>
+ Creates the <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> that will be used as the default container.
+ </summary>
+ <returns>A new instance of <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/>.</returns>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.GetModuleEnumerator">
+ <summary>
+ Returns the module enumerator that will be used to initialize the modules.
+ </summary>
+ <remarks>
+ When using the default initialization behavior, this method must be overwritten by a derived class.
+ </remarks>
+ <returns>An instance of <see cref="T:Microsoft.Practices.Composite.Modularity.IModuleEnumerator"/> that will be used to initialize the modules.</returns>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.RegisterTypeIfMissing(System.Type,System.Type,System.Boolean)">
+ <summary>
+ Registers a type in the container only if that type was not already registered.
+ </summary>
+ <param name="fromType">The interface type to register.</param>
+ <param name="toType">The type implementing the interface.</param>
+ <param name="registerAsSingleton">Registers the type as a singleton.</param>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.CreateShell">
+ <summary>
+ Creates the shell or main window of the application.
+ </summary>
+ <returns>The shell of the application.</returns>
+ <remarks>
+ If the returned instance is a <see cref="T:System.Windows.DependencyObject"/>, the
+ <see cref="T:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper"/> will attach the default <seealso cref="T:Microsoft.Practices.Composite.Regions.IRegionManager"/> of
+ the application in its <see cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionManagerProperty"/> attached property
+ in order to be able to add regions by using the <seealso cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionNameProperty"/>
+ attached property from XAML.
+ </remarks>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.Container">
+ <summary>
+ Gets the default <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> for the application.
+ </summary>
+ <value>The default <see cref="T:Microsoft.Practices.Unity.IUnityContainer"/> instance.</value>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.LoggerFacade">
+ <summary>
+ Gets the default <see cref="T:Microsoft.Practices.Composite.Logging.ILoggerFacade"/> for the application.
+ </summary>
+ <value>A <see cref="T:Microsoft.Practices.Composite.Logging.ILoggerFacade"/> instance.</value>
+ </member>
+ <member name="T:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapperExtension">
+ <summary>
+ Implements a <see cref="T:Microsoft.Practices.Unity.UnityContainerExtension"/> that checks if a specific type was registered with the container.
+ </summary>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapperExtension.IsTypeRegistered(Microsoft.Practices.Unity.IUnityContainer,System.Type)">
+ <summary>
+ Evaluates if a specified type was registered in the container.
+ </summary>
+ <param name="container">The container to check if the type was registered in.</param>
+ <param name="type">The type to check if it was registered.</param>
+ <returns><see langword="true"/> if the <paramref name="type"/> was registered with the container.</returns>
+ <remarks>
+ In order to use this extension, you must first call <see cref="M:Microsoft.Practices.Unity.IUnityContainer.AddNewExtension``1"/>
+ and specify <see cref="T:Microsoft.Practices.Unity.UnityContainerExtension"/> as the extension type.
+ </remarks>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapperExtension.Initialize">
+ <summary>
+ Initializes the container with this extension's functionality.
+ </summary>
+ </member>
+ </members>
+</doc>
Added: trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.Wpf.dll
===================================================================
(Binary files differ)
Property changes on: trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.Wpf.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.Wpf.pdb
===================================================================
(Binary files differ)
Property changes on: trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.Wpf.pdb
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.Wpf.xml
===================================================================
--- trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.Wpf.xml (rev 0)
+++ trunk/bin/Prism/Prism1/Microsoft.Practices.Composite.Wpf.xml 2009-02-05 15:38:53 UTC (rev 233)
@@ -0,0 +1,881 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>Microsoft.Practices.Composite.Wpf</name>
+ </assembly>
+ <members>
+ <member name="T:Microsoft.Practices.Composite.Wpf.Regions.RegionManager">
+ <summary>
+ This class is responsible for maintaining a collection of regions and attaching regions to controls.
+ </summary>
+ <remarks>
+ This class supplies the attached properties that can be used for simple region creation from XAML.
+ It finds an adapter mapped to a WPF control and associates a new region to that control by calling
+ <see cref="M:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.AttachNewRegion(System.Object,System.String)"/> automatically.
+ </remarks>
+ </member>
+ <member name="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionNameProperty">
+ <summary>
+ Identifies the RegionName attached property.
+ </summary>
+ <remarks>
+ When a control has both the <see cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionNameProperty"/> and
+ <see cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionManagerProperty"/> attached properties set to
+ a value different than <see langword="null"/> and there is a
+ <see cref="T:Microsoft.Practices.Composite.Regions.IRegionAdapter"/> mapping registered for the control, it
+ will create and adapt a new region for that control, and register it
+ in the <see cref="T:Microsoft.Practices.Composite.Regions.IRegionManager"/> with the specified region name.
+ </remarks>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.SetRegionName(System.Windows.DependencyObject,System.String)">
+ <summary>
+ Sets the <see cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionNameProperty"/> attached property.
+ </summary>
+ <param name="regionTarget">The object to adapt. This is typically a container (i.e a control).</param>
+ <param name="regionName">The name of the region to register.</param>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.GetRegionName(System.Windows.DependencyObject)">
+ <summary>
+ Gets the value for the <see cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionNameProperty"/> attached property.
+ </summary>
+ <param name="regionTarget">The object to adapt. This is typically a container (i.e a control).</param>
+ <returns>The name of the region that should be created when
+ <see cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionManagerProperty"/> is also set in this element.</returns>
+ </member>
+ <member name="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionManagerProperty">
+ <summary>
+ Identifies the RegionManager attached property.
+ </summary>
+ <remarks>
+ When a control has both the <see cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionNameProperty"/> and
+ <see cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionManagerProperty"/> attached properties set to
+ a value different than <see langword="null"/> and there is a
+ <see cref="T:Microsoft.Practices.Composite.Regions.IRegionAdapter"/> mapping registered for the control, it
+ will create and adapt a new region for that control, and register it
+ in the <see cref="T:Microsoft.Practices.Composite.Regions.IRegionManager"/> with the specified region name.
+ </remarks>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.GetRegionManager(System.Windows.DependencyObject)">
+ <summary>
+ Gets the value of the <see cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionNameProperty"/> attached property.
+ </summary>
+ <param name="target">The target element.</param>
+ <returns>The <see cref="T:Microsoft.Practices.Composite.Regions.IRegionManager"/> attached to the <paramref name="target"/> element.</returns>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.SetRegionManager(System.Windows.DependencyObject,Microsoft.Practices.Composite.Regions.IRegionManager)">
+ <summary>
+ Sets the <see cref="F:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.RegionManagerProperty"/> attached property.
+ </summary>
+ <param name="target">The target element.</param>
+ <param name="value">The value.</param>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.#ctor">
+ <summary>
+ Initializes a new instance of <see cref="T:Microsoft.Practices.Composite.Wpf.Regions.RegionManager"/>.
+ </summary>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.#ctor(Microsoft.Practices.Composite.Wpf.Regions.RegionAdapterMappings)">
+ <summary>
+ Initializes a new instance of <see cref="T:Microsoft.Practices.Composite.Wpf.Regions.RegionManager"/>.
+ </summary>
+ <param name="mappings">The <see cref="T:Microsoft.Practices.Composite.Wpf.Regions.RegionAdapterMappings"/> that
+ will be used when calling <see cref="M:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.AttachNewRegion(System.Object,System.String)"/> explicitly
+ or by creating regions by using attached properties through XAML.
+ </param>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.AttachNewRegion(System.Object,System.String)">
+ <summary>
+ Attaches a region to an object and adds it to the region manager.
+ </summary>
+ <param name="regionTarget">The object to adapt. This is typically a container (i.e a control).</param>
+ <param name="regionName">The name of the region to register.</param>
+ <exception cref="T:System.ArgumentException">When regions collection already has a region registered using <paramref name="regionName"/>.</exception>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.CreateRegionManager">
+ <summary>
+ Creates a new region manager.
+ </summary>
+ <returns>A new region manager that can be used as a different scope from the current region manager.</returns>
+ </member>
+ <member name="P:Microsoft.Practices.Composite.Wpf.Regions.RegionManager.Regions">
+ <summary>
+ Gets a dictionary of <see cref="T:Microsoft.Practices.Composite.Regions.IRegion"/> that identify each region by name.
+ You can use this dictionary to add or remove regions to the current region manager.
+ </summary>
+ <value>An <see cref="T:System.Collections.Generic.IDictionary`2"/> with all the registered regions.</value>
+ </member>
+ <member name="T:Microsoft.Practices.Composite.Wpf.Regions.RegionAdapterMappings">
+ <summary>
+ This class maps <see cref="T:System.Type"/> with <see cref="T:Microsoft.Practices.Composite.Regions.IRegionAdapter"/>.
+ </summary>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.Wpf.Regions.RegionAdapterMappings.RegisterMapping(System.Type,Microsoft.Practices.Composite.Regions.IRegionAdapter)">
+ <summary>
+ Registers the mapping between a type and an adapter.
+ </summary>
+ <param name="controlType">The type of the control.</param>
+ <param name="adapter">The adapter to use with the <paramref name="controlType"/> type.</param>
+ <exception cref="T:System.ArgumentNullException">When any of <paramref name="controlType"/> or <paramref name="adapter"/> are <see langword="null"/>.</exception>
+ <exception cref="T:System.InvalidOperationException">If a mapping for <paramref name="controlType"/> already exists.</exception>
+ </member>
+ <member name="M:Microsoft.Practices.Composite.Wpf.Regions.RegionAdapterMappings....
[truncated message content] |