PatternConverter WriteDictionary Method (TextWriter, ILoggerRepository, IDictionaryEnumerator) | Apache log4net™ SDK Documentation

Write an dictionary to a TextWriter

Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    protected static void WriteDictionary(
    	TextWriter writer,
    	ILoggerRepository repository,
    	IDictionaryEnumerator value
    )

    Protected Shared Sub WriteDictionary (
    	writer As TextWriter,
    	repository As ILoggerRepository,
    	value As IDictionaryEnumerator
    )

    protected:
    static void WriteDictionary(
    	TextWriter^ writer,
    	ILoggerRepository^ repository,
    	IDictionaryEnumerator^ value
    )

    static member WriteDictionary :
            writer : TextWriter *
            repository : ILoggerRepository *
            value : IDictionaryEnumerator -> unit

#### Parameters

writer
  Type: System.IO
  TextWriter
  the writer to write to
repository
  Type: log4net.Repository
  ILoggerRepository
  a ILoggerRepository to use for object conversion
value
  Type: System.Collections
  IDictionaryEnumerator
  the value to write to the writer

Remarks

Writes the IDictionaryEnumerator to a writer in the form:

Copy

    {key1=value1, key2=value2, key3=value3}

If the ILoggerRepository specified is not null then it is used to render the key and value to text, otherwise the object's ToString method is called.

See Also

#### Reference

PatternConverter Class
WriteDictionary Overload
log4net.Util Namespace