Most likely it is code that no one had to touch.
Patches are welcome.

On Tue, Oct 7, 2008 at 11:43 AM, Krzysztof Kozmic <[EMAIL PROTECTED]>wrote:

>
> Hey,
>
> I've been going over parts of Castle source code, and I found
> LifecycleStepCollection' implementation of GetEnumerator a bit unusual.
>
> Is there any particular reason why it looks this way?
>
>                public IEnumerator GetEnumerator()
>                {
>                        List<object> newList = new
> List<object>(commissionSteps);
>                        newList.AddRange(decommissionSteps);
>                        return newList.GetEnumerator();
>                }
>
>
> I guess this is a leftover from < .NET 2.0 days.
> Since class uses generics already, why not just do it like this:
>
>                public IEnumerator GetEnumerator()
>                {
>                    foreach (var commissionStep in commissionSteps)
>                    {
>                        yield return commissionStep;
>                    }
>                    foreach (var decommissionStep in decommissionSteps)
>                    {
>                        yield return decommissionStep;
>                    }
>                }
>
> well, maybe without the 'var' :)
>
> Krzysztof
>
> CONFIDENTIALITY NOTICE
> This message is intended exclusively for the individual or entity to which
> it is addressed. This communication may contain information that is
> proprietary, privileged, confidential or otherwise legally exempt from
> disclosure. If you are not the named addressee, you are not authorized to
> read, print, retain, copy or disseminate this message or any part of it. If
> you have received this message in error, please delete all copies of this
> message and notify the sender immediately by return mail or fax ATSI
> S.A.(+4812) 285 36 04.
> Any email attachment may contain software viruses which could damage your
> own computer system. Whilst reasonable precaution has been taken to minimise
> this risk, we cannot accept liability for any damage which you sustain as a
> result of software viruses. You should therefore carry out your own virus
> checks before opening any attachments.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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