Hi there,
        
The user Nick Zdunic (nzdunic) has changed the issue IOC-ISSUE-145 
"CreationContent.Resolve tries to convert dictionary".
        
Here is what the user changed:
        
        Description
                from: In build 1037, CreationContext.cs whe have:
public virtual object Resolve(CreationContext context, ISubDependencyResolver 
contextHandlerResolver,ComponentModel model, DependencyModel dependency)
{
   if (additionalArguments != null)
   {
        var inlineArgument = additionalArguments[dependency.DependencyKey];
        if (inlineArgument != null && converter != null && 
        dependency.DependencyType == DependencyType.Parameter)
        {
        return converter.PerformConversion(inlineArgument.ToString(),         
dependency.TargetType);
        }
        return inlineArgument;
   }
   return null;
}
This is diffrent from lats public release which has:
public object Resolve(CreationContext context, ISubDependencyResolver 
parentResolver, ComponentModel model, DependencyModel dependency)
{
    if (this.additionalArguments != null)
    {
        return this.additionalArguments[dependency.DependencyKey];
    }
    return null;
}
The new code has now introduced a bug whereby when the argument is a Dictionary 
type if will call the convert.PerformConversion line whoch in turn calls 
DictionaryConverter and hits code raising a NotImplemenetedException.
Returning inlineArgument as it is is all that is required I believe.
                to: In build 1037, CreationContext.cs whe have:
public virtual object Resolve(CreationContext context, ISubDependencyResolver 
contextHandlerResolver,ComponentModel model, DependencyModel dependency)
{
   if (additionalArguments != null)
   {
        var inlineArgument = additionalArguments[dependency.DependencyKey];
        if (inlineArgument != null && converter != null && 
        dependency.DependencyType == DependencyType.Parameter)
        {
        return converter.PerformConversion(inlineArgument.ToString(),         
dependency.TargetType);
        }
        return inlineArgument;
   }
   return null;
}
This is different from last public release which has:
public object Resolve(CreationContext context, ISubDependencyResolver 
parentResolver, ComponentModel model, DependencyModel dependency)
{
    if (this.additionalArguments != null)
    {
        return this.additionalArguments[dependency.DependencyKey];
    }
    return null;
}
The new code has now introduced a bug whereby when the argument is a Dictionary 
type if will call the convert.PerformConversion line whoch in turn calls 
DictionaryConverter and hits code raising a NotImplemenetedException.
Returning inlineArgument as it is is all that is required I believe.
        
For more, see 
http://support.castleproject.org/projects/IOC/issues/view/IOC-ISSUE-145
 
        
--
donjon
by Castle Stronghold
http://www.castle-donjon.com



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to