示例#1
0
文件: Program.cs 项目: xorllc/OpenKh
            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);
            }
示例#2
0
文件: Program.cs 项目: xorllc/OpenKh
            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);
            }