Q:

TraceSource - set autoflush to true without config file?

I don't see autoflush option on TraceSource like there is for Trace.
Is there a way to autoflush without having to flush manually after each write?
BTW I'm using TextWriterTraceListener as my trace source listener and not using config xml. 

A:

Internally TraceSource uses AutoFlush setting of Trace class. E.g. sources of TraceSource.TraceEvent method:
for (int j = 0; j < this.listeners.Count; j++)
{
    TraceListener listener = this.listeners[j];
    listener.TraceEvent(eventCache, this.Name, eventType, id, format, args);
    if (Trace.AutoFlush)
    {
        listener.Flush();
    }
}

So, all you need to do, is set Trace.AutoFlush to true. BTW same is stated in MSDN:

The trace listeners use the values of the Trace class properties
  Indent, IndentSize, and AutoFlush to format trace output.

