Пример #1
0
        public async static Task <IRepoControl> GetRepoControllerAsync(ICommandInput commandInput)
        {
            IRepoControl controller = null;
            await Task.Run(() =>
            {
                controller = new Mercurial();
                if (controller.Exists(commandInput))
                {
                    return;
                }
                controller = new Git();
                if (controller.Exists(commandInput))
                {
                    return;
                }
                controller = null;
            });

            return(controller);
        }
Пример #2
0
        private ICollection <IRepoControl> AddNewItemInOrder(ICollection <IRepoControl> collection, IRepoControl newItem)
        {
            collection.Add(newItem);

            collection = collection.OrderBy(l => l.SortingCategory).ThenBy(l => l.LocationName).ToList();

            return(collection);
        }