コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <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);
             }
         }
     }
 }
コード例 #3
0
        /// <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);
            }
        }