/// <summary> /// <para>Write to the log file in such a way so as to avoid collisions in updating same.</para> /// <para>NOTE: THIS PROCESS USES LockWait. IF YOU ARE USING IT ACROSS MACHINES, THERE IS A SLIGHT CHANCE /// THAT YOUR PROCESS ID WILL NOT BE UNIQUE. CAVEAT USER.</para> /// </summary> /// <param name="sMessage">The message to write.</param> /// <returns>True if the log file was written.</returns> public bool LogWait(string sMessage) { bool br = false; if (FileSemaphore.LockWait(ref fSem) == true) { if (SimpleLog.Log(sMessage) != null) { br = true; } FileSemaphore.UnLock(ref fSem); } return(br); }