コード例 #1
0
        //
        public ActionResult _SortBenchMarkDemo()
        {
            //-------------------------------------------------
            // LLAMADO A LA PÁGINA "_SortBenchMarkDemo"
            //-------------------------------------------------

            try
            {
                //
                string unsortedListRaw = AlgorithmManager.GetUnsortedList
                                         (
                    ARRAY_SIZE
                                         );
                //
                string unsortedListEncoded = HttpUtility.HtmlEncode(unsortedListRaw).Replace("|", "<br/>");
                //
                ViewBag.Message = unsortedListEncoded;
                //
                Session["unsortedList"] = unsortedListRaw;

                //
                LogModel.Log("PAGE_SORT_BENCHAMRK_DEMO", this.GetIpValue(), LogModel.LogType.Info);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(View());
        }
コード例 #2
0
        //
        public string _NewSort()
        {
            //
            string status = "OK";

            try
            {
                //
                string unsortedListRaw = AlgorithmManager.GetUnsortedList
                                         (
                    ARRAY_SIZE
                                         );
                //
                string unsortedListEncoded = HttpUtility.HtmlEncode(unsortedListRaw).Replace("|", "<br/>");
                //
                Session["unsortedList"] = unsortedListRaw;
                //
                status = unsortedListEncoded;
                //
            }
            catch (Exception ex)
            {
                LogModel.Log(string.Format("REGEX_ÈRROR. ='{0}'-'{1}'"
                                           , ex.Message
                                           , ex.StackTrace)
                             , string.Empty
                             , LogModel.LogType.Error
                             );
            }
            //--------------------------------------------------
            // LOG
            //--------------------------------------------------
#if DEBUG
            LogModel.Log(string.Format("SORT_BENCHMARK . NEW SORT : {0}", status));
#endif
            //
            return(status);
        }