static void Main(string[] args) { BCT.Execute(c => { }); while (true) { #region DEBUG //var caches = BulletinCollector.GetBulletinsByQuery(@"http://avito.ru", "iPhone"); //caches = BulletinCollector.GetBulletinsBySheets(caches); #endregion Console.Write("BC> "); var text = Console.ReadLine(); BCT.Execute(c => { var enterArgs = text.Split(new[] { " -" }, StringSplitOptions.None); var command = enterArgs[0]; switch (command) { case "TaskGeneration": GenerationHelpers.GenerationFull(); break; case "TaskGenerationClear": GenerationHelpers.GenerationClearData(); break; case "NextTask": var r2 = BackTaskHelper.Next(); r2 = r2; break; case "RunStatisticsTasks": StatisticsHelper.RunUserStatisticsTask(new Guid("43461B22-1BC4-4584-8DB8-FA930CB331C5")); break; case "ComputeStatisticsTasks": StatisticsHelper.ComputeUserStatistics(new Guid("43461B22-1BC4-4584-8DB8-FA930CB331C5")); break; case "GetCalls": StatisticsHelper.GetCallsStatistics(new Guid("43461B22-1BC4-4584-8DB8-FA930CB331C5")); break; case "help": Console.WriteLine(Help); break; default: Console.WriteLine("Command not found"); break; } }); } }
public override IEnumerable <EntityObject> CustomCollectionLoad(string code, string sessionUID = "", string hashUID = "", IEnumerable <EntityObject> obj = null, IEnumerable <Guid> id = null) { var result = Enumerable.Empty <EntityObject>(); BCT.Execute(d => { //Пока не заморачивался - передаётся базовый объект и требуется привести к типу var entities = Enumerable.Empty <Task>(); if (obj.Any()) { entities = obj.Select(q => (Task)q).ToArray(); } switch (code) { case "All": result = BackTaskHelper.All(); break; case "Next": result = new Task[] { BackTaskHelper.Next() }; break; case "Complete": BackTaskHelper.Complite(entities); break; case "Erorr": BackTaskHelper.Error(entities); break; case "GetTask": result = entities; break; default: break; } }); return(result); }