コード例 #1
0
ファイル: FigletTests.cs プロジェクト: sahwar/Cake.Figlet
        public void Figlet_can_render()
        {
            const string expected = @"
 _   _        _  _            __        __              _      _ 
| | | |  ___ | || |  ___      \ \      / /  ___   _ __ | |  __| |
| |_| | / _ \| || | / _ \      \ \ /\ / /  / _ \ | '__|| | / _` |
|  _  ||  __/| || || (_) | _    \ V  V /  | (_) || |   | || (_| |
|_| |_| \___||_||_| \___/ ( )    \_/\_/    \___/ |_|   |_| \__,_|
                          |/                                     
";

            FigletAliases.Figlet(null, "Hello, World").ShouldBeWithLeadingLineBreak(expected);
        }
コード例 #2
0
        private static async Task MainAsync(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine(FigletAliases.Figlet(null, " EpicOrbit"));
            Console.ResetColor();

            ConventionRegistry.Register("ignore.null", new ConventionPack {
                new IgnoreExtraElementsConvention(true),
                new IgnoreIfNullConvention(true)
            }, t => true);

            var logger = new ConsoleLogger(LogLevel.Debug);

            AppDomain.CurrentDomain.GetAssemblies().Where(y => y.FullName.Contains("EpicOrbit")).ToList()
            .ForEach(x => logger.LogDebug(x.FullName));

            GameContext.Initialize(logger, "mongodb://127.0.0.1", "epicorbit",
                                   new IPEndPoint(IPAddress.Any, 8080), new IPEndPoint(IPAddress.Any, 843),
                                   new IPEndPoint(IPAddress.Any, 9338));

            GameContext.Start();

            await CreateWebHostBuilder(args).RunAsync();
        }