Пример #1
0
        /// <returns>
        ///     -1 - something wrong
        ///     0 - successfully
        ///     1 - job agent is offline
        /// </returns>
        public static int ClearJobs()
        {
            int iRet = 0;

            if (ms_jobStatusManager == null)
            {
                return(-1);
            }
            try
            {
                ms_jobStatusManager.ClearJobs();
            }
            catch (System.Net.Sockets.SocketException)
            {
                iRet = 1;
            }
            catch (Exception)
            {
                iRet = -1;
            }

            return(iRet);
        }