blob: 9008f5b02b561cda273c2867fa9f5954ce1dc381 [file] [log] [blame]
<html dir="LTR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<title>DefaultRenderer.RenderObject Method</title>
<xml>
</xml>
<link rel="stylesheet" type="text/css" href="MSDN.css" />
</head>
<body id="bodyID" class="dtBODY">
<div id="nsbanner">
<div id="bannerrow1">
<table class="bannerparthead" cellspacing="0">
<tr id="hdr">
<td class="runninghead">Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0</td>
<td class="product">
</td>
</tr>
</table>
</div>
<div id="TitleRow">
<h1 class="dtH1">DefaultRenderer.RenderObject�Method�</h1>
</div>
</div>
<div id="nstext">
<p> Render the object <i>obj</i> to a string </p>
<div class="syntax">
<span class="lang">[Visual�Basic]</span>
<br />NotOverridable�Public�Sub�RenderObject( _<br />���ByVal <i>rendererMap</i>�As�<a href="log4net.ObjectRenderer.RendererMap.html">RendererMap</a>,�_<br />���ByVal <i>obj</i>�As�<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">Object</a>,�_<br />���ByVal <i>writer</i>�As�<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemIOTextWriterClassTopic.htm">TextWriter</a>�_<br />)�_<div>����Implements�<a href="log4net.ObjectRenderer.IObjectRenderer.RenderObject.html">IObjectRenderer.RenderObject</a></div></div>
<div class="syntax">
<span class="lang">[C#]</span>
<br />public�<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemVoidClassTopic.htm">void</a>�RenderObject(<br />���<a href="log4net.ObjectRenderer.RendererMap.html">RendererMap</a><i>rendererMap</i>,<br />���<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">object</a><i>obj</i>,<br />���<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemIOTextWriterClassTopic.htm">TextWriter</a><i>writer</i><br />);</div>
<h4 class="dtH4">Parameters</h4>
<dl>
<dt>
<i>rendererMap</i>
</dt>
<dd>The map used to lookup renderers</dd>
<dt>
<i>obj</i>
</dt>
<dd>The object to render</dd>
<dt>
<i>writer</i>
</dt>
<dd>The writer to render to</dd>
</dl>
<h4 class="dtH4">Implements</h4>
<p>
<a href="log4net.ObjectRenderer.IObjectRenderer.RenderObject.html">IObjectRenderer.RenderObject</a>
</p>
<h4 class="dtH4">Remarks</h4>
<p> Render the object <i>obj</i> to a string. </p>
<p> The <i>rendererMap</i> parameter is provided to lookup and render other objects. This is very useful where <i>obj</i> contains nested objects of unknown type. The <b>FindAndRender</b> method can be used to render these objects. </p>
<p> The default renderer supports rendering objects to strings as follows: </p>
<div class="tablediv"><table class="dtTABLE" cellspacing="0"><tr valign="top">
<th width="50%">Value</th>
<th width="50%">Rendered String</th>
</tr><tr valign="top">
<td><code>null</code></td>
<td>
<p>"(null)"</p>
</td>
</tr><tr valign="top">
<td><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemArrayClassTopic.htm">Array</a></td>
<td>
<p> For a one dimensional array this is the array type name, an open brace, followed by a comma separated list of the elements (using the appropriate renderer), followed by a close brace. </p>
<p> For example: <code>int[] {1, 2, 3}</code>. </p>
<p> If the array is not one dimensional the <code>Array.ToString()</code> is returned. </p>
</td>
</tr><tr valign="top">
<td><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsIEnumerableClassTopic.htm">IEnumerable</a>, <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsICollectionClassTopic.htm">ICollection</a> &amp; <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsIEnumeratorClassTopic.htm">IEnumerator</a></td>
<td>
<p> Rendered as an open brace, followed by a comma separated list of the elements (using the appropriate renderer), followed by a close brace. </p>
<p> For example: <code>{a, b, c}</code>. </p>
<p> All collection classes that implement <b>ICollection</b> its subclasses, or generic equivalents all implement the <b>IEnumerable</b> interface. </p>
</td>
</tr><tr valign="top">
<td><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsDictionaryEntryClassTopic.htm">DictionaryEntry</a></td>
<td>
<p> Rendered as the key, an equals sign ('='), and the value (using the appropriate renderer). </p>
<p> For example: <code>key=value</code>. </p>
</td>
</tr><tr valign="top">
<td>other</td>
<td>
<p><code>Object.ToString()</code></p>
</td>
</tr></table></div>
<h4 class="dtH4">See Also</h4><p><a href="log4net.ObjectRenderer.DefaultRenderer.html">DefaultRenderer Class</a> | <a href="log4net.ObjectRenderer.html">log4net.ObjectRenderer Namespace</a></p><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;"><param name="Keyword" value="RenderObject method"></param><param name="Keyword" value="RenderObject method, DefaultRenderer class"></param><param name="Keyword" value="DefaultRenderer.RenderObject method"></param></object><hr /><div id="footer"><a href='http://logging.apache.org/log4net/'>Copyright 2004-2013 The Apache Software Foundation.</a><br></br>Apache log4net, Apache and log4net are trademarks of The Apache Software Foundation.</div></div>
</body>
</html>