Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Write() [2/4]

static void System.Diagnostics.TraceInternal.Write ( object value,
string category )
inlinestatic

Definition at line 542 of file TraceInternal.cs.

543 {
544 if (UseGlobalLock)
545 {
546 lock (critSec)
547 {
548 foreach (TraceListener listener in Listeners)
549 {
550 listener.Write(value, category);
551 if (AutoFlush)
552 {
553 listener.Flush();
554 }
555 }
556 return;
557 }
558 }
559 foreach (TraceListener listener2 in Listeners)
560 {
561 if (!listener2.IsThreadSafe)
562 {
563 lock (listener2)
564 {
565 listener2.Write(value, category);
566 if (AutoFlush)
567 {
568 listener2.Flush();
569 }
570 }
571 }
572 else
573 {
574 listener2.Write(value, category);
575 if (AutoFlush)
576 {
577 listener2.Flush();
578 }
579 }
580 }
581 }
static readonly object critSec
static TraceListenerCollection Listeners

References System.Diagnostics.TraceInternal.AutoFlush, System.Diagnostics.TraceInternal.critSec, System.Diagnostics.TraceListener.Flush(), System.Diagnostics.TraceListener.IsThreadSafe, System.Diagnostics.TraceInternal.Listeners, System.Diagnostics.TraceInternal.UseGlobalLock, System.value, and System.Diagnostics.TraceListener.Write().