コード例 #1
0
ファイル: Service.cs プロジェクト: Hefester/l2c-devsadmin
        /// <summary>
        /// Terminates current service instance.
        /// </summary>
        /// <param name="e">For more information, please see <see cref="ServiceShutdownEventArgs"/> class.</param>
        internal static void Terminate( ServiceShutdownEventArgs e )
        {
            if ( e != null && e.LastException != null )
                Logger.Exception(e.LastException, e.Message);

            Logger.WriteLine(Source.Service, "Unexpected service termination.");

            Environment.Exit(-1);
        }
コード例 #2
0
ファイル: Service.cs プロジェクト: orzMaster/L2.Net
        /// <summary>
        /// Terminates current service instance.
        /// </summary>
        /// <param name="e">For more information, please see <see cref="ServiceShutdownEventArgs"/> class.</param>
        internal static void Terminate(ServiceShutdownEventArgs e)
        {
            if (e != null && e.LastException != null)
            {
                Logger.Exception(e.LastException, e.Message);
            }

            Logger.WriteLine(Source.Service, "Unexpected service termination.");

            Environment.Exit(-1);
        }