예제 #1
0
        public void FormatsDefinitions()
        {
            var expected  = File.ReadAllText("Apps/ExampleApp.d.json");
            var formatted = new StringWriter();

            AppDefinitionFormatter.FormatAppDefinition(typeof(ExampleApp), true, formatted);
            Assert.Equal(Normalize(expected), Normalize(formatted.ToString()));
        }
예제 #2
0
        protected override Task <int> Run()
        {
            using var appLoader = new AppLoader(_dir);
            if (!appLoader.TryLoadSeqAppType(_type, out var seqAppType))
            {
                Console.Error.WriteLine("No type marked with `[SeqApp]` could be found.");
                return(Task.FromResult(1));
            }

            AppDefinitionFormatter.FormatAppDefinition(seqAppType, _indented, Console.Out);
            return(Task.FromResult(0));
        }