예제 #1
0
        public IActionResult DownloadProtocols()
        {
            string text = ProtocolMinFileHelper.ToFileContent();
            var    data = Encoding.UTF8.GetBytes(text);

            return(File(data, "text/html", "Protocols.cs"));
        }
예제 #2
0
        static void Main(string[] args)
        {
            string text = ProtocolMinFileHelper.ToFileContent();

            File.WriteAllText("Protocols.cs", text);

            Console.WriteLine("转换结束, 按任意键退出");
            Console.ReadLine();
        }