Hey Craig,
Is this still on your radar?
-- Roelof.
On Thu, Jul 24, 2008 at 4:28 PM, Craig Neuwirt <[EMAIL PROTECTED]> wrote:
> I'll try and get to it today :-)
>
> On Thu, Jul 24, 2008 at 9:15 AM, Roelof Blom <[EMAIL PROTECTED]>
> wrote:
>
>> Cool. Are you planning on fixing this momentarily?
>>
>>
>> On Thu, Jul 24, 2008 at 4:09 PM, Craig Neuwirt <[EMAIL PROTECTED]>
>> wrote:
>>
>>> I know. I couldn't find anything either. At least I believe I know what
>>> they want to i'll try and fix it up.
>>>
>>> Thanks for tracking this one.
>>> craig
>>>
>>>
>>> On Thu, Jul 24, 2008 at 9:01 AM, Roelof Blom <[EMAIL PROTECTED]>
>>> wrote:
>>>
>>>> Don't know, I've searched the list but could not find any related
>>>> discussions. Adding the fact there's no failing test case either it's hard
>>>> to tell what the original problem was.
>>>>
>>>>
>>>> On Thu, Jul 24, 2008 at 3:12 PM, Craig Neuwirt <[EMAIL PROTECTED]>
>>>> wrote:
>>>>
>>>>> Yeah. In particular the first patch that performed the constructor
>>>>> clear.
>>>>>
>>>>>
>>>>> On Thu, Jul 24, 2008 at 7:43 AM, Roelof Blom <[EMAIL PROTECTED]>
>>>>> wrote:
>>>>>
>>>>>> Do you mean what this patch was supposed to fix?
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 24, 2008 at 2:04 PM, Craig Neuwirt <[EMAIL PROTECTED]>
>>>>>> wrote:
>>>>>>
>>>>>>> Do you know exactly what the original problem was that caused the
>>>>>>> initial changes?
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jul 23, 2008 at 4:59 PM, Roelof Blom <[EMAIL PROTECTED]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> This breaks the Wcf facility (and probably more stuff, but I'm not
>>>>>>>> sure). For instance, in Wcf facility there's no service metadata
>>>>>>>> available
>>>>>>>> because ComponentModel.Configuration is never set, causing
>>>>>>>> WcfUtils.FindBehaviors<> to never find any IServiceBehavior handlers.
>>>>>>>>
>>>>>>>> I think that the problem is that ComponentRegistration is not using
>>>>>>>> ComponentModelBuilder for construction, but new'ing ComponentModel
>>>>>>>> instead.
>>>>>>>>
>>>>>>>> Any objections to reverting this patch?
>>>>>>>>
>>>>>>>> -- Roelof.
>>>>>>>>
>>>>>>>> On Wed, Jul 9, 2008 at 3:12 PM, <[EMAIL PROTECTED]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> User: enix
>>>>>>>>> Date: 2008/07/09 06:12 AM
>>>>>>>>>
>>>>>>>>> Modified:
>>>>>>>>> /trunk/InversionOfControl/Castle.MicroKernel/Registration/
>>>>>>>>> ComponentInstanceDescriptor.cs, ComponentRegistration.cs
>>>>>>>>>
>>>>>>>>> Log:
>>>>>>>>> Better fix for the dependency exception that occurred when
>>>>>>>>> resolving a component instance that has c'tor arguments. This patch
>>>>>>>>> excluded
>>>>>>>>> the component from being inspected for registration. This allows the
>>>>>>>>> registration of Stub instanced generated by Rhino.Mocks.
>>>>>>>>>
>>>>>>>>> File Changes:
>>>>>>>>>
>>>>>>>>> Directory:
>>>>>>>>> /trunk/InversionOfControl/Castle.MicroKernel/Registration/
>>>>>>>>>
>>>>>>>>> =====================================================================
>>>>>>>>>
>>>>>>>>> File [modified]: ComponentInstanceDescriptor.cs
>>>>>>>>> Delta lines: +0 -5
>>>>>>>>> ===================================================================
>>>>>>>>> ---
>>>>>>>>> trunk/InversionOfControl/Castle.MicroKernel/Registration/ComponentInstanceDescriptor.cs
>>>>>>>>> 2008-07-08 20:49:29 UTC (rev 5221)
>>>>>>>>> +++
>>>>>>>>> trunk/InversionOfControl/Castle.MicroKernel/Registration/ComponentInstanceDescriptor.cs
>>>>>>>>> 2008-07-09 13:12:54 UTC (rev 5222)
>>>>>>>>> @@ -30,11 +30,6 @@
>>>>>>>>> {
>>>>>>>>> model.CustomComponentActivator =
>>>>>>>>> typeof(ExternalInstanceActivator);
>>>>>>>>> model.ExtendedProperties["instance"] =
>>>>>>>>> instance;
>>>>>>>>> -
>>>>>>>>> - // The constructor collection is filled
>>>>>>>>> because the instance gets inspected
>>>>>>>>> - // by the kernel when added. The kernel
>>>>>>>>> doesn't need to resolve any
>>>>>>>>> - // dependencies since we pass an instance.
>>>>>>>>> - model.Constructors.Clear();
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>> \ No newline at end of file
>>>>>>>>>
>>>>>>>>> File [modified]: ComponentRegistration.cs
>>>>>>>>> Delta lines: +9 -4
>>>>>>>>> ===================================================================
>>>>>>>>> ---
>>>>>>>>> trunk/InversionOfControl/Castle.MicroKernel/Registration/ComponentRegistration.cs
>>>>>>>>> 2008-07-08 20:49:29 UTC (rev 5221)
>>>>>>>>> +++
>>>>>>>>> trunk/InversionOfControl/Castle.MicroKernel/Registration/ComponentRegistration.cs
>>>>>>>>> 2008-07-09 13:12:54 UTC (rev 5222)
>>>>>>>>> @@ -37,6 +37,7 @@
>>>>>>>>> {
>>>>>>>>> private String name;
>>>>>>>>> private bool overwrite;
>>>>>>>>> + private bool isInstanceRegistration;
>>>>>>>>> private Type serviceType;
>>>>>>>>> private Type implementation;
>>>>>>>>> private List<Type> forwardedTypes = new
>>>>>>>>> List<Type>();
>>>>>>>>> @@ -159,6 +160,7 @@
>>>>>>>>> throw new
>>>>>>>>> ArgumentNullException("instance");
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> + isInstanceRegistration = true;
>>>>>>>>> ImplementedBy(instance.GetType());
>>>>>>>>> return AddDescriptor(new
>>>>>>>>> ComponentInstanceDescriptior<S>(instance));
>>>>>>>>> }
>>>>>>>>> @@ -504,12 +506,15 @@
>>>>>>>>>
>>>>>>>>> descriptor.ApplyToConfiguration(kernel, configuration);
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> - if (componentModel == null)
>>>>>>>>> + if (componentModel == null &&
>>>>>>>>> isInstanceRegistration == false)
>>>>>>>>> {
>>>>>>>>> - componentModel =
>>>>>>>>> kernel.ComponentModelBuilder.BuildModel(
>>>>>>>>> - name, serviceType,
>>>>>>>>> implementation, null);
>>>>>>>>> + componentModel =
>>>>>>>>> kernel.ComponentModelBuilder.BuildModel(name, serviceType,
>>>>>>>>> implementation,
>>>>>>>>> null);
>>>>>>>>> + }
>>>>>>>>> + else if (componentModel == null &&
>>>>>>>>> isInstanceRegistration)
>>>>>>>>> + {
>>>>>>>>> + componentModel = new
>>>>>>>>> ComponentModel(name, serviceType, implementation);
>>>>>>>>> }
>>>>>>>>> -
>>>>>>>>> +
>>>>>>>>> foreach (ComponentDescriptor<S>
>>>>>>>>> descriptor in descriptors)
>>>>>>>>> {
>>>>>>>>>
>>>>>>>>> descriptor.ApplyToModel(kernel, componentModel);
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---