﻿<?xml version="1.0" encoding="utf-8"?><Type Name="TextWriterTraceListener" FullName="System.Diagnostics.TextWriterTraceListener"><TypeSignature Language="C#" Maintainer="auto" Value="public class TextWriterTraceListener : System.Diagnostics.TraceListener" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit TextWriterTraceListener extends System.Diagnostics.TraceListener" /><AssemblyInfo><AssemblyName>System</AssemblyName><AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey><AssemblyVersion>1.0.3300.0</AssemblyVersion><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the &lt;link location="node:gtk-sharp/programming/threads"&gt;Gtk# Thread Programming&lt;/link&gt; for details.</ThreadSafetyStatement><Base><BaseTypeName>System.Diagnostics.TraceListener</BaseTypeName></Base><Interfaces></Interfaces><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class provides the <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" /> property to get or set the text writer that receives the tracing or debugging output.</para><para>This class also provides methods to <see cref="M:System.Diagnostics.TextWriterTraceListener.Close" /> the <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" /> so that it no longer receives tracing or debugging output, to <see cref="M:System.Diagnostics.TextWriterTraceListener.Flush" /> the output buffer for the <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" />, and to <see cref="M:System.Diagnostics.TextWriterTraceListener.Write(System.String)" /> a message to the <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" />.</para><para>You must enable tracing or debugging to use a trace listener. The following syntax is compiler specific. If you use compilers other than C# or Visual Basic, refer to the documentation for your compiler.</para><list type="bullet"><item><para>To enable debugging in C#, add the /d:DEBUG flag to the compiler command line when you compile your code, or you can add #define DEBUG to the top of your file. In Visual Basic, add the /d:DEBUG=True flag to the compiler command line.</para></item><item><para>To enable tracing in C#, add the /d:TRACE flag to the compiler command line when you compile your code, or add #define TRACE to the top of your file. In Visual Basic, add the /d:TRACE=True flag to the compiler command line.</para></item></list><para>To add a trace listener, edit the configuration file that corresponds to the name of your application. Within this file, you can add a listener, set its type and set its parameter, remove a listener, or clear all the listeners previously set by the application. The configuration file should be formatted like the following example.</para><code>&lt;configuration&gt;
  &lt;system.diagnostics&gt;
    &lt;trace autoflush="false" indentsize="4"&gt;
      &lt;listeners&gt;
        &lt;add name="myListener" 
          type="System.Diagnostics.TextWriterTraceListener" 
          initializeData="TextWriterOutput.log" /&gt;
        &lt;remove name="Default" /&gt;
      &lt;/listeners&gt;
    &lt;/trace&gt;
  &lt;/system.diagnostics&gt;
&lt;/configuration&gt;</code><block subset="none" type="note"><para>If an attempt is made to write to a file that is in use or unavailable, the file name is automatically prefixed by a GUID.      </para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Directs tracing or debugging output to a <see cref="T:System.IO.TextWriter" /> or to a <see cref="T:System.IO.Stream" />, such as <see cref="T:System.IO.FileStream" />.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public TextWriterTraceListener ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor uses the <see cref="T:System.IO.TextWriter" /> stream as the recipient of the tracing or debugging output. Its <see cref="P:System.Diagnostics.TraceListener.Name" /> is initialized to "TextWriter".</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class with <see cref="T:System.IO.TextWriter" /> as the output recipient.</para></summary></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public TextWriterTraceListener (System.IO.Stream stream);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.IO.Stream stream) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="stream" Type="System.IO.Stream" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor initializes the <see cref="P:System.Diagnostics.TraceListener.Name" /> property to an empty string ("").</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class, using the stream as the recipient of the debugging and tracing output.</para></summary><param name="stream"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.IO.Stream" /> that represents the stream the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> writes to. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public TextWriterTraceListener (System.IO.TextWriter writer);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.IO.TextWriter writer) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="writer" Type="System.IO.TextWriter" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor initializes the <see cref="P:System.Diagnostics.TraceListener.Name" /> property to an empty string ("").</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class using the specified writer as recipient of the tracing or debugging output.</para></summary><param name="writer"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.IO.TextWriter" /> that receives the output from the <see cref="T:System.Diagnostics.TextWriterTraceListener" />. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public TextWriterTraceListener (string fileName);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string fileName) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="fileName" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor initializes the <see cref="P:System.Diagnostics.TraceListener.Name" /> property to an empty string ("").</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class, using the file as the recipient of the debugging and tracing output.</para></summary><param name="fileName"><attribution license="cc4" from="Microsoft" modified="false" />The name of the file the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> writes to. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public TextWriterTraceListener (System.IO.Stream stream, string name);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.IO.Stream stream, string name) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="stream" Type="System.IO.Stream" /><Parameter Name="name" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor initializes the <see cref="P:System.Diagnostics.TraceListener.Name" /> property to the <paramref name="name" /> parameter or to an empty string (""), if the <paramref name="name" /> parameter is null.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class with the specified name, using the stream as the recipient of the debugging and tracing output.</para></summary><param name="stream"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.IO.Stream" /> that represents the stream the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> writes to. </param><param name="name"><attribution license="cc4" from="Microsoft" modified="false" />The name of the new instance. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public TextWriterTraceListener (System.IO.TextWriter writer, string name);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.IO.TextWriter writer, string name) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="writer" Type="System.IO.TextWriter" /><Parameter Name="name" Type="System.String" /></Parameters><Docs><remarks>To be added</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class with the specified name, using the specified writer as recipient of the tracing or debugging output.</para></summary><param name="writer"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.IO.TextWriter" /> that receives the output from the <see cref="T:System.Diagnostics.TextWriterTraceListener" />. </param><param name="name"><attribution license="cc4" from="Microsoft" modified="false" />The name of the new instance. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public TextWriterTraceListener (string fileName, string name);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string fileName, string name) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="fileName" Type="System.String" /><Parameter Name="name" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor initializes the <see cref="P:System.Diagnostics.TraceListener.Name" /> property to the <paramref name="name" /> parameter or to an empty string (""), if the <paramref name="name" /> parameter is null.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class with the specified name, using the file as the recipient of the debugging and tracing output.</para></summary><param name="fileName"><attribution license="cc4" from="Microsoft" modified="false" />The name of the file the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> writes to. </param><param name="name"><attribution license="cc4" from="Microsoft" modified="false" />The name of the new instance. </param></Docs></Member><Member MemberName="Close"><MemberSignature Language="C#" Value="public override void Close ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Close() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Calling a <see cref="Overload:System.Diagnostics.TextWriterTraceListener.Write" /> or <see cref="Overload:System.Diagnostics.TextWriterTraceListener.WriteLine" /> method after calling <see cref="M:System.Diagnostics.TextWriterTraceListener.Close" /> automatically reopens the stream.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Closes the <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" /> so that it no longer receives tracing or debugging output.</para></summary></Docs></Member><Member MemberName="Dispose"><MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Dispose(bool disposing) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="disposing" Type="System.Boolean" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Use the <see cref="M:System.Diagnostics.TextWriterTraceListener.Close" /> method of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class to release the managed resources of a <see cref="T:System.Diagnostics.TextWriterTraceListener" /> object.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Disposes this <see cref="T:System.Diagnostics.TextWriterTraceListener" /> object.</para></summary><param name="disposing"><attribution license="cc4" from="Microsoft" modified="false" />true to release managed resources; if false, <see cref="M:System.Diagnostics.TextWriterTraceListener.Dispose(System.Boolean)" /> has no effect.</param></Docs></Member><Member MemberName="Flush"><MemberSignature Language="C#" Value="public override void Flush ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Flush() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><remarks>To be added</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Flushes the output buffer for the <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" />.</para></summary></Docs></Member><Member MemberName="Write"><MemberSignature Language="C#" Value="public override void Write (string message);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Write(string message) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="message" Type="System.String" /></Parameters><Docs><remarks>To be added</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Writes a message to this instance's <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" />.</para></summary><param name="message"><attribution license="cc4" from="Microsoft" modified="false" />A message to write. </param></Docs></Member><Member MemberName="WriteLine"><MemberSignature Language="C#" Value="public override void WriteLine (string message);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void WriteLine(string message) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="message" Type="System.String" /></Parameters><Docs><remarks>To be added</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Writes a message to this instance's <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" /> followed by a line terminator. The default line terminator is a carriage return followed by a line feed (\r\n).</para></summary><param name="message"><attribution license="cc4" from="Microsoft" modified="false" />A message to write. </param></Docs></Member><Member MemberName="Writer"><MemberSignature Language="C#" Value="public System.IO.TextWriter Writer { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.IO.TextWriter Writer" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.IO.TextWriter</ReturnType></ReturnValue><Parameters></Parameters><Docs><value>To be added: an object of type 'IO.TextWriter'</value><remarks>To be added</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the text writer that receives the tracing or debugging output.</para></summary></Docs></Member></Members></Type>