Program.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Text;
  5. using System.Xml.Serialization;
  6. using Masuit.Tools;
  7. using Masuit.Tools.Win32;
  8. namespace Test
  9. {
  10. internal static class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. //FileStream fs = new FileStream(@"D:\boot.vmdk", FileMode.OpenOrCreate, FileAccess.ReadWrite);
  15. //{
  16. // fs.CopyToFileAsync(@"D:\1.bak");
  17. // string md5 = fs.GetFileMD5Async().Result;//获取文件的MD5
  18. //}
  19. //Console.WriteLine("复制完成");
  20. //bool isUrl;
  21. //var match = "//music.163.com/#/search/m/?%23%2Fmy%2Fm%2Fmusic%2Fempty=&s=fade&type=1!k".MatchUrl(out isUrl);
  22. //Console.WriteLine(isUrl);
  23. //foreach (Group g in match.Groups)
  24. //{
  25. // if (g.Captures.Count > 0)
  26. // {
  27. // foreach (Capture c in g.Captures)
  28. // {
  29. // Console.WriteLine(c.Index + " : " + c.Value);
  30. // }
  31. // }
  32. // else
  33. // {
  34. // Console.WriteLine(g.Index + " : " + g.Value);
  35. // }
  36. //}
  37. //bool b1 = "512002199509230611".MatchIdentifyCard();//False
  38. //bool b2 = "140108197705058894".MatchIdentifyCard();//True
  39. //Console.WriteLine(b1 + "----" + b2);
  40. //bool isIP;
  41. //"114.114.256.114".MatchInetAddress(out isIP);//False
  42. //"114.114.114.114".MatchInetAddress(out isIP);//True
  43. //Console.WriteLine(isIP);
  44. Console.WriteLine(WindowsCommand.Execute("help"));
  45. Console.ReadKey();
  46. }
  47. }
  48. }