예제 #1
0
        /// <summary>获得WEB应用退出信息</summary>
        private static string GetApplicationEndMessage()
        {
            var runtime = ReflectUtil.GetFieldInfo(typeof(HttpRuntime), "_theRuntime", true)?.GetValue(null);

            if (runtime == null)
            {
                return(string.Empty);
            }
            var shutDownMessage = ReflectUtil.GetFieldValue(runtime, "_shutDownMessage").As <string>() ?? string.Empty;
            var shutDownStack   = ReflectUtil.GetFieldValue(runtime, "_shutDownStack").As <string>() ?? string.Empty;

            return($"{shutDownMessage}{shutDownStack}");
        }