Пример #1
0
        static async Task Main(string[] args)
        {
            try
            {
                var seansCommands = await _coreCommandsService.GetAllCommandsUsedBySSCAsync(Defaults.SeansCommands,
                                                                                            Defaults.Repositories);

                var dllCommands = await _coreCommandsService.GetAllCommandsUsedBySSCAsync();

                await _writer.WriteComparisonAsync(seansCommands.Where(x => dllCommands.All(y => y.Name != x.Name)),
                                                   dllCommands.Where(x => seansCommands.All(y => y.Name != x.Name)));

                await _writer.WriteAsync(dllCommands);
            }
            catch (Exception e)
            {
                System.Console.WriteLine(e.ToString());
                throw;
            }
        }
Пример #2
0
        private async Task <IEnumerable <CoreCommandVM> > getCommandsUsedBySscAsync()
        {
            var res = await _coreCommandsService.GetAllCommandsUsedBySSCAsync();

            var vms =
                (await Task.WhenAll(res.Select(CoreCommandVM.fromDependencyAsync)))
                .OrderByDescending(x => x.IsExclusivelyUsedBySSC)
                .ThenBy(x => x.Dependencies.Count())
                .ThenBy(x => x.Name);

            return(vms);
        }