No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

67 líneas
3.7 KiB

  1. using System;
  2. using System.Reflection;
  3. using Microsoft.AspNetCore;
  4. using Microsoft.AspNetCore.Hosting;
  5. using MQTTnet.Server.Web;
  6. namespace MQTTnet.Server
  7. {
  8. public static class Program
  9. {
  10. public static int Main(string[] args)
  11. {
  12. try
  13. {
  14. PrintLogo();
  15. WebHost.CreateDefaultBuilder(args).UseStartup<Startup>().Build().Run();
  16. return 0;
  17. }
  18. catch (Exception exception)
  19. {
  20. Console.WriteLine(exception);
  21. return -1;
  22. }
  23. }
  24. private static void PrintLogo()
  25. {
  26. Console.ResetColor();
  27. Console.ForegroundColor = ConsoleColor.Red;
  28. const string LogoText =
  29. @"
  30. ███╗ ███╗ ██████╗ ████████╗████████╗███╗ ██╗███████╗████████╗ ███████╗███████╗██████╗ ██╗ ██╗███████╗██████╗
  31. ████╗ ████║██╔═══██╗╚══██╔══╝╚══██╔══╝████╗ ██║██╔════╝╚══██╔══╝ ██╔════╝██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗
  32. ██╔████╔██║██║ ██║ ██║ ██║ ██╔██╗ ██║█████╗ ██║ ███████╗█████╗ ██████╔╝██║ ██║█████╗ ██████╔╝
  33. ██║╚██╔╝██║██║▄▄ ██║ ██║ ██║ ██║╚██╗██║██╔══╝ ██║ ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██╔══╝ ██╔══██╗
  34. ██║ ╚═╝ ██║╚██████╔╝ ██║ ██║ ██║ ╚████║███████╗ ██║ ███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
  35. ╚═╝ ╚═╝ ╚══▀▀═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝
  36. ";
  37. Console.WriteLine(LogoText);
  38. Console.ResetColor();
  39. Console.WriteLine();
  40. Console.ForegroundColor = ConsoleColor.White;
  41. Console.WriteLine("The official MQTT server implementation of MQTTnet");
  42. Console.WriteLine("Copyright (c) 2017-2019 The MQTTnet Team");
  43. Console.WriteLine(@"https://github.com/chkr1011/MQTTnet");
  44. Console.ForegroundColor = ConsoleColor.White;
  45. Console.WriteLine($@"
  46. Version: {Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion}
  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. }