From f4ec3f03364c508392aa4bebd8e58cb2cc97a184 Mon Sep 17 00:00:00 2001 From: cneuwirt Date: Fri, 14 Mar 2008 21:27:21 +0000 Subject: [PATCH] Few name changes and expose AdditionalParameters in CreationContext. git-svn-id: https://svn.castleproject.org/svn/castle/trunk@4892 73e77b4c-caa6-f847-a29a-24ab75ae54b6 --- Core/Castle.Core/Model/InterceptorReference.cs | 11 ++++++++++- .../Castle.MicroKernel/Context/CreationContext.cs | 5 +++++ .../Castle.MicroKernel/Registration/Strategies/AllTypesOf.cs | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Core/Castle.Core/Model/InterceptorReference.cs b/Core/Castle.Core/Model/InterceptorReference.cs index b167fb2fd..5753bf111 100644 --- a/Core/Castle.Core/Model/InterceptorReference.cs +++ b/Core/Castle.Core/Model/InterceptorReference.cs @@ -104,11 +104,20 @@ namespace Castle.Core /// /// The service. /// The - public static InterceptorReference WithType(Type service) + public static InterceptorReference ForType(Type service) { return new InterceptorReference(service); } + /// + /// Gets an for the service. + /// + /// The service type. + /// The + public static InterceptorReference ForType() + { + return new InterceptorReference(typeof(T)); + } public bool Equals(InterceptorReference interceptorReference) { diff --git a/InversionOfControl/Castle.MicroKernel/Context/CreationContext.cs b/InversionOfControl/Castle.MicroKernel/Context/CreationContext.cs index e0b550282..9ea02e487 100644 --- a/InversionOfControl/Castle.MicroKernel/Context/CreationContext.cs +++ b/InversionOfControl/Castle.MicroKernel/Context/CreationContext.cs @@ -123,6 +123,11 @@ namespace Castle.MicroKernel #endregion + public IDictionary AdditionalParameters + { + get { return additionalArguments; } + } + public bool HasAdditionalParameters { get { return additionalArguments != null && additionalArguments.Count != 0; } diff --git a/InversionOfControl/Castle.MicroKernel/Registration/Strategies/AllTypesOf.cs b/InversionOfControl/Castle.MicroKernel/Registration/Strategies/AllTypesOf.cs index 6fc3418fc..a9189d8b0 100644 --- a/InversionOfControl/Castle.MicroKernel/Registration/Strategies/AllTypesOf.cs +++ b/InversionOfControl/Castle.MicroKernel/Registration/Strategies/AllTypesOf.cs @@ -34,7 +34,7 @@ namespace Castle.MicroKernel.Registration /// /// The assembly name. /// The corresponding - public static TypesDescriptor FromAssembly(string assemblyName) + public static TypesDescriptor FromAssemblyNamed(string assemblyName) { Assembly assembly; String extension = Path.GetExtension(assemblyName); -- 2.11.4.GIT