Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

68 Zeilen
3.7 KiB

  1. using System;
  2. using System.Reflection;
  3. using Microsoft.AspNetCore;
  4. using Microsoft.AspNetCore.Hosting;
  5. namespace MQTTnet.Server
  6. {
  7. public static class Program
  8. {
  9. public static int Main(string[] args)
  10. {
  11. try
  12. {
  13. PrintLogo();
  14. WebHost.CreateDefaultBuilder(args).UseStartup<Startup>().Build().Run();
  15. return 0;
  16. }
  17. catch (Exception exception)
  18. {
  19. Console.WriteLine(exception);
  20. return -1;
  21. }
  22. }
  23. private static void PrintLogo()
  24. {
  25. Console.ResetColor();
  26. Console.ForegroundColor = ConsoleColor.Red;
  27. const string LogoText =
  28. @"
  29. ███╗ ███╗ ██████╗ ████████╗████████╗███╗ ██╗███████╗████████╗ ███████╗███████╗██████╗ ██╗ ██╗███████╗██████╗
  30. ████╗ ████║██╔═══██╗╚══██╔══╝╚══██╔══╝████╗ ██║██╔════╝╚══██╔══╝ ██╔════╝██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗
  31. ██╔████╔██║██║ ██║ ██║ ██║ ██╔██╗ ██║█████╗ ██║ ███████╗█████╗ ██████╔╝██║ ██║█████╗ ██████╔╝
  32. ██║╚██╔╝██║██║▄▄ ██║ ██║ ██║ ██║╚██╗██║██╔══╝ ██║ ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██╔══╝ ██╔══██╗
  33. ██║ ╚═╝ ██║╚██████╔╝ ██║ ██║ ██║ ╚████║███████╗ ██║ ███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
  34. ╚═╝ ╚═╝ ╚══▀▀═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝
  35. ";
  36. Console.WriteLine(LogoText);
  37. Console.ResetColor();
  38. Console.WriteLine();
  39. Console.ForegroundColor = ConsoleColor.White;
  40. Console.WriteLine("The official MQTT server implementation of MQTTnet");
  41. Console.WriteLine("Copyright (c) 2017-2019 The MQTTnet Team");
  42. Console.ForegroundColor = ConsoleColor.Blue;
  43. Console.WriteLine(@"https://github.com/chkr1011/MQTTnet");
  44. Console.ForegroundColor = ConsoleColor.White;
  45. Console.WriteLine($@"
  46. Version: {Assembly.GetExecutingAssembly().GetName().Version}
  47. License: MIT (read LICENSE file)
  48. Sponsoring: https://opencollective.com/mqttnet
  49. Support: https://github.com/chkr1011/MQTTnet/issues
  50. Docs: https://github.com/chkr1011/MQTTnet/wiki/MQTTnetServer
  51. ");
  52. Console.ForegroundColor = ConsoleColor.Red;
  53. Console.WriteLine(" ! THIS IS AN ALPHA VERSION! IT IS NOT RECOMMENDED TO USE IT FOR ANY DIFFERENT PURPOSE THAN TESTING OR EVALUATING!");
  54. Console.ResetColor();
  55. Console.WriteLine();
  56. }
  57. }
  58. }