private void TraceOutput(TraceBits bits, string format, params object[] varParams) { lock (this) { int tid = Thread.CurrentThread.GetHashCode(); Console.ForegroundColor = (ConsoleColor)(tid % 8 + 8); Console.Write("{0:000} PDOS ", tid); Console.WriteLine(format, varParams); Console.ResetColor(); } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & this.desiredTrace) != 0) { //lock(outputLock) { int tid = System.Threading.Thread.CurrentThread.GetHashCode(); Console.Write("{0:000} PBOS ", tid); } } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & this.desiredTrace) != 0) { //lock(outputLock) { int tid = System.Threading.Thread.CurrentThread.GetHashCode(); System.Diagnostics.Debug.WriteLine("{0:000} PBOS {1}", tid, string.Format(format, varParams)); } } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & _DesiredTrace) != 0) { lock (_outputLock) { int tid = Thread.CurrentThread.GetHashCode(); Console.Write("{0:000} PDOS ", tid); Console.WriteLine(format, varParams); } } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & this._DesiredTrace) != TraceBits.None) { lock (this._outputLock) { int hashCode = Thread.CurrentThread.GetHashCode(); Console.Write("{0:000} PDOS ", hashCode); Console.WriteLine(format, varParams); } } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & _DesiredTrace) != 0) { lock (_outputLock) { int hashCode = Thread.CurrentThread.GetHashCode(); Console.ForegroundColor = (ConsoleColor)(hashCode % 8 + 8); Console.Write("{0:000} PDOS ", hashCode); Console.WriteLine(format, varParams); Console.ResetColor(); } } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & this.desiredTrace) != 0) { lock (outputLock) { int tid = Thread.CurrentThread.GetHashCode(); Console.ForegroundColor = (ConsoleColor)(tid % 8 + 10); Console.Write("{0:000} PBOS ", tid); Console.WriteLine(format, varParams); Console.ResetColor(); } } }
public ParallelDeflateOutputStream(Stream stream, CompressionLevel level, CompressionStrategy strategy, bool leaveOpen) { this._eLock = new object(); this._outputLock = new object(); this._DesiredTrace = TraceBits.WriterThread | TraceBits.Synch | TraceBits.Session | TraceBits.Lifecycle; this._bufferSize = IO_BUFFER_SIZE_DEFAULT; this._compressLevel = level; this._leaveOpen = leaveOpen; this.Strategy = strategy; this.BuffersPerCore = 4; this._writingDone = new ManualResetEvent(false); this._sessionReset = new ManualResetEvent(false); this._outStream = stream; }
private static void TraceOutput(TraceBits bits, string format, params object[] varParams) { #if Trace if ((bits & _DesiredTrace) != 0) { lock (_outputLock) { int tid = Thread.CurrentThread.GetHashCode(); Console.ForegroundColor = (ConsoleColor)(tid % 8 + 8); Console.Write("{0:000} PDOS ", tid); Console.WriteLine(format, varParams); Console.ResetColor(); } } #endif }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & this.desiredTrace) != 0) { //lock(outputLock) { int tid = System.Threading.Thread.CurrentThread.GetHashCode(); #if !SILVERLIGHT && !NETCF Console.ForegroundColor = (ConsoleColor)(tid % 8 + 10); #endif Console.Write("{0:000} PBOS ", tid); Console.WriteLine(format, varParams); #if !SILVERLIGHT && !NETCF Console.ResetColor(); #endif } } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & this.m_DesiredTrace) != 0) { lock (this.m_outputLock) { int tid = Thread.CurrentThread.GetHashCode(); #if !SILVERLIGHT Console.ForegroundColor = (ConsoleColor)(tid % 8 + 8); #endif Console.Write("{0:000} PDOS ", tid); Console.WriteLine(format, varParams); #if !SILVERLIGHT Console.ResetColor(); #endif } } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & this._DesiredTrace) != 0) { object outputLock = this._outputLock; Monitor.Enter(outputLock); try { int hashCode = Thread.CurrentThread.GetHashCode(); Console.ForegroundColor = (ConsoleColor)(hashCode % 8 + 8); Console.Write("{0:000} PDOS ", hashCode); Console.WriteLine(format, varParams); Console.ResetColor(); } finally { Monitor.Exit(outputLock); } } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & this.desiredTrace) != 0) { lock(outputLock) { int tid = Thread.CurrentThread.GetHashCode(); System.Diagnostics.Debug.WriteLine("{0:000} PBOS {1}", tid, string.Format(format, varParams)); } } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & this.desiredTrace) != 0) { lock(outputLock) { int tid = Thread.CurrentThread.GetHashCode(); #if !SILVERLIGHT Console.ForegroundColor = (ConsoleColor) (tid % 8 + 10); #endif Console.Write("{0:000} PBOS ", tid); Console.WriteLine(format, varParams); #if !SILVERLIGHT Console.ResetColor(); #endif } } }
private void TraceOutput(TraceBits bits, string format, params object[] varParams) { if ((bits & _DesiredTrace) != 0) { lock(_outputLock) { int tid = Thread.CurrentThread.GetHashCode(); Console.Write("{0:000} PDOS ", tid); Console.WriteLine(format, varParams); } } }