예제 #1
0
        public ActionResult Singleton(string id)
        {
            DesignPatterns.单例模式.MultiThread_Singleton singleton = DesignPatterns.单例模式.MultiThread_Singleton.Instance;
            string str = singleton.test();

            return(Content(str));
        }
예제 #2
0
        public ActionResult DesignPattern()
        {
            ViewBag.Message = "Your DesignPattern page.";
            DesignPatterns.单例模式.MultiThread_Singleton singleton = DesignPatterns.单例模式.MultiThread_Singleton.Instance;
            var str = singleton.test();

            ViewBag.test = str;
            return(View());
        }