Exemple #1
0
            protected int OnExecute(CommandLineApplication app)
            {
                var target = File.OpenRead(InputFile).Using(stream => Imgd.Read(stream));

                Console.WriteLine(
                    FormatterFactory.GetFormatterPairs()
                    .First()
                    .FormatToString(ImgdSummary.From(target))
                    );

                return(0);
            }
Exemple #2
0
            protected int OnExecute(CommandLineApplication app)
            {
                var targets = File.OpenRead(InputFile).Using(stream => Imgz.Read(stream).ToArray());

                Console.WriteLine(
                    FormatterFactory.GetFormatterPairs()
                    .First()
                    .FormatToString(
                        targets
                        .Select(one => ImgdSummary.From(one))
                        .Select((one, index) => (one, index))
                        .ToDictionary(
                            pair => pair.index.ToString(),
                            pair => pair.one
                            )
                        )
                    );

                return(0);
            }