I remember now...it was so AspNetCachePatternConverter could send the entire 
contents of the Cache to WriteDictionary. HttpRuntime.Cache is not enumerable. 
HttpRuntime.Cache.GetEnumerator() returns an IDictionaryEnumerator.

----- Original Message ----
From: Göran Roseen <[EMAIL PROTECTED]>
To: Log4NET Dev <[email protected]>
Sent: Wednesday, October 11, 2006 3:43:39 AM
Subject: Re: PatternConverter.WriteDictionary IDictionaryEnumerator overload


Well... This is what you wrote in LOG4NET-56:

<snip>
Add override for WriteDictionary that accepts IDictionaryEnumerator
-------------------------------------------------------------------

         Key: LOG4NET-56
         URL: http://issues.apache.org/jira/browse/LOG4NET-56
     Project: Log4net
        Type: Improvement
    Reporter: Ron Grabowski
    Priority: Minor


Some objects that use IDictionary objects expose an IDictionaryEnumerator 
instead of the underlying IDictionary. 
HttpRuntime.Cache.GetEnumerator() is one such object.

</snip>

Personally, I haven't had any need for neither version yet... :-)

/Göran

On Tue, 10 Oct 2006 19:22 , Ron Grabowski <[EMAIL PROTECTED]> sent:

>I was looking through some old files on my system (from 12/2005) and came 
>across a modified PatternConverter.cs on my local system were 
>I had overloaded the WriteDictionary method to accept an 
>IDictionaryEnumerator. The IDictionary overload forwarded to the 
>IDictionaryEnumerator version:
>
>protected static void WriteDictionary(TextWriter writer, ILoggerRepository 
>repository, IDictionary value)
>{
>WriteDictionary(writer, repository, value.GetEnumerator());
>}
>
>Does anyone remember discussions on the list about why this might be 
>beneficial? I don't remember anything. Do people ever use 
>IDictionaryEnumerator? I think it was an attempt to automagically dump items 
>in the Session or HttpContext objects.
>
>Hrmmm...







Reply via email to