/// <summary> /// Starts the timer that flushes the log queue. /// </summary> public bool Start() { if (LogType.Disabled != RockfishServerPlugIn.LogType()) { m_timer.Start(); return(true); } return(false); }
/// <summary> /// Adds an item to the queue. /// </summary> public void Enqueue(RockfishHeader header) { if (null != header) { lock (m_locker) { if (RockfishLog.LogType.Disabled != RockfishServerPlugIn.LogType()) { m_queue.Enqueue(header); } } } }
/// <summary> /// Simple test to see if the RockFish service is operational. /// </summary> /// <param name="header">The header.</param> /// <param name="str"></param> /// <returns>The echoed string if successful.</returns> public string Echo(RockfishHeader header, string str) { if (null == header) { throw new FaultException("RockfishHeader is null"); } header.Method = nameof(IntersectBreps); RhinoApp.WriteLine("{0} request received from {1}.", header.Method, header.ClientId); using (var item = new RockfishRecord(header)) { var host_name = RockfishServerPlugIn.ServerHostName(); var rc = $"Echo from \"{host_name}\" : {str}"; header.Succeeded = true; return(rc); } }