예제 #1
0
        static void PrintBundledUpdates(Update updateWithBundledUpdates, IMetadataSource metadataSource)
        {
            if (updateWithBundledUpdates.BundledUpdates.Count() > 0)
            {
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.WriteLine("    Bundled updates:");
                Console.ResetColor();

                foreach (var id in updateWithBundledUpdates.BundledUpdates)
                {
                    Console.WriteLine("        ID        : {0}", id);
                    Console.WriteLine("        Title     : {0}", metadataSource.GetUpdateTitle(id));
                }
            }
        }
예제 #2
0
        static void PrintBundleChainRecursive(IMetadataSource source, Update update, int recursionIndex)
        {
            const int indentSize = 4;

            if (update.IsBundled)
            {
                foreach (var parentBundleID in update.BundleParent)
                {
                    Console.CursorLeft = indentSize * recursionIndex + indentSize;
                    Console.WriteLine("Bundled in     : {0}", parentBundleID);
                    Console.CursorLeft = indentSize * recursionIndex + indentSize;
                    Console.WriteLine("               : {0}", source.GetUpdateTitle(parentBundleID));

                    PrintBundleChainRecursive(source, source.GetUpdate(parentBundleID), recursionIndex + 1);
                }
            }
        }