Just curious, why you think throwing is not good for resolveall and it is for resolve?
2011/3/5, Krzysztof Koźmic <[email protected]>: > Well, I usually have a test like below and if it fails I just grab a > debugger, run the test to the point where my container is fully > configured and then have a look at "potentially misconfigured > components". That's enough in 99% of the cases and takes 20s, 10 of > which are spent waiting for VS to run the test. > > If people really want that (go create a suggestion in UserVoice and > we'll see if people vote on it) then I may add an option to throw, > although I myself am not convinced that's the best thing to do... > > On 06/03/2011 12:13 AM, José F. Romaniello wrote: >> If the assert fails, where do i start looking? >> -did my convention based registration fails? >> -or one of the services doesn't have satisfied one of *his* dependences. >> >> The second one is confusing for me and contra intuitive for newcomers. >> I'd expect an exception rather... >> >> 2011/3/5, Krzysztof Koźmic<[email protected]>: >>> Jose, I'm not sure I understand what you're saying. >>> >>> to make sure all components for service IFoo are resolvable this simple >>> test will do: >>> >>> var countOfAllFoos = Kernel.GetHandlers(typeof(IFoo)).Length; >>> var fooInstances = Kernel.ResolveAll<IFoo>(); >>> >>> Assert.AreEqual(countOfAllFoos, fooInstances.Length); >>> >>> How the change to ResolveAll changes anything here? Actually it saves >>> you from hitting false positives... >>> >>> >>> On 05/03/2011 11:52 PM, José F. Romaniello wrote: >>>> Well it is all related, because in the way i used to register before >>>> this change the only way to test was calling the resolveall method and >>>> verify if the service is in the result. If the service isnt there, >>>> where do i have to start looking? If there is no exception... >>>> >>>> 2011/3/4, Krzysztof Koźmic<[email protected]>: >>>>> Xavier, >>>>> >>>>> not really... >>>>> >>>>> I usually have a test for that... >>>>> >>>>> >>>>> On 05/03/2011 8:27 AM, Xavier wrote: >>>>>> We use it exactly the same way and i didn't know it could return more >>>>>> components than those registered for this service. So it should not >>>>>> change anything. >>>>>> >>>>>> By the way, would it be possible for ResolveAll to tell when it does >>>>>> not return all components because of missing dependencies? >>>>>> >>>>>> On 2 mar, 22:20, Alex Henderson<[email protected]> wrote: >>>>>>> +1 I didn't realise ResolveAll<> didn't just return those >>>>>>> components >>>>>>> explicitly registered for that service. I'm fine with the change, as >>>>>>> it's >>>>>>> deterministic/won't break anything I've got relying on that feature. >>>>>>> >>>>>>> Cheers, >>>>>>> >>>>>>> Alex >>>>>>> >>>>>>> On Thu, Mar 3, 2011 at 2:02 AM, Jason >>>>>>> Meckley<[email protected]>wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>> I also thought Windsor only resolved all types explicitly >>>>>>>> registered. >>>>>>>> I >>>>>>>> wouldn't have a problem with this change. >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups >>>>>>>> "Castle Project Users" 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-users?hl=en. >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups >>>>> "Castle Project Users" 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-users?hl=en. >>>>> >>>>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Castle Project Users" 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-users?hl=en. >>> >>> > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" 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-users?hl=en. > > -- Enviado desde mi dispositivo móvil -- You received this message because you are subscribed to the Google Groups "Castle Project Users" 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-users?hl=en.
