PageRenderTime 47ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/Senparc.Weixin.MP.Sample/Senparc.Weixin.MP.Sample/Controllers/HomeController.cs

https://github.com/mjhuangzk/WeiXinMPSDK
C# | 22 lines | 20 code | 1 blank | 1 comment | 0 complexity | b3711b67636ee1420fc61a46dc970d50 MD5 | raw file
Possible License(s): BSD-2-Clause, BSD-3-Clause
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.Linq;
  5. //using System.Text.RegularExpressions;
  6. using System.Web;
  7. using System.Web.Mvc;
  8. namespace Senparc.Weixin.MP.Sample.Controllers
  9. {
  10. public class HomeController : Controller
  11. {
  12. public ActionResult Index()
  13. {
  14. var mpFileVersionInfo = FileVersionInfo.GetVersionInfo(Server.MapPath("~/bin/Senparc.Weixin.MP.dll"));
  15. var extensionFileVersionInfo = FileVersionInfo.GetVersionInfo(Server.MapPath("~/bin/Senparc.Weixin.MP.MvcExtension.dll"));
  16. TempData["MpVersion"] = string.Format("{0}.{1}", mpFileVersionInfo.FileMajorPart, mpFileVersionInfo.FileMinorPart); //Regex.Match(fileVersionInfo.FileVersion, @"\d+\.\d+");
  17. TempData["ExtensionVersion"] = string.Format("{0}.{1}", extensionFileVersionInfo.FileMajorPart, extensionFileVersionInfo.FileMinorPart); //Regex.Match(fileVersionInfo.FileVersion, @"\d+\.\d+");
  18. return View();
  19. }
  20. }
  21. }