internal AbstractFormattingResult( TreeData treeInfo, TokenStream tokenStream, TextSpan formattedSpan, TaskExecutor taskExecutor) { this.TreeInfo = treeInfo; this.TokenStream = tokenStream; this.FormattedSpan = formattedSpan; this.TaskExecutor = taskExecutor; _lazyChanges = new CancellableLazy<IList<TextChange>>(CreateTextChanges); _lazyNode = new CancellableLazy<SyntaxNode>(CreateFormattedRoot); }
public ActionResult Generate(Guid id, InvoiceSetupApiModel invoiceSetupApiModel) { Dictionary <string, object> parameters = ToDictionary(invoiceSetupApiModel); new Dictionary <string, object>() { { "InvoiceDate", invoiceSetupApiModel.InvoiceDate.ToDateTime().Value }, { "PayByDate", invoiceSetupApiModel.PayByDate.ToDateTime().Value }, }; TaskExecutor <InvoiceSetupGeneratorTask> executor = new TaskExecutor <InvoiceSetupGeneratorTask>(); executor.Execute(id, _userId, parameters); return(SendResponse(new ApiResponse(new { Id = Guid.NewGuid() }, ApiStatus.Success))); }
protected override void Unload() { CommandWindow.ConsoleInput.onInputText -= ReloadCallback; Provider.onServerDisconnected -= PlayerDisconnectCallback; Provider.onServerConnected -= PlayerConnectCallback; var executingAssembly = GetType().Assembly; HookManager.UnloadAll(); HookManager.UnregisterAll(); CommandManager.UnregisterAll(executingAssembly); EventManager.UnregisterAll(executingAssembly); ModuleManager.UnloadAll(); TaskExecutor.Stop(); }
// After ExceptionThrown is called, no other methods are called (unless we are running an assembly, // and then we get notified about xml transformations) public void ExceptionThrown(string assemblyFilename, Exception exception) { // The nunit runner uses TE.ConverExceptions whenever an exception occurs in infrastructure // code. When a test fails (and there's always an exception for a failing test, it builds the // TaskExceptions itself). ConvertExceptions uses the short name of the exception type, and // the nunit runner uses the full type. We're following their lead, but almost by coincidence. // We're using the JetBrains function here, and can't use it for a failing test, because we // get a text version of the thrown exceptions, rather than an actual Exception we could pass // into this method. // In other words - if a class fails due to a dodgy exception, the message has a short type name. // If a test fails due to an exception, the message has a fully qualified type name var state = CurrentState; server.TaskException(state.Task, TaskExecutor.ConvertExceptions(exception, out state.Message)); state.Result = TaskResult.Exception; }
private void button1_Click(object sender, EventArgs e) { foreach (var wave in sendWaves) { var waveTask = new SendWaves() { ExecuteAt = DateTime.Now.AddHours(-100), // Execute now, on we will create a correct ExecuteAt later vill = getSelectedVillage(), SendWaveModels = wave.ToList(), Priority = Files.Tasks.BotTask.TaskPriority.High }; TaskExecutor.AddTask(getSelectedAcc(), waveTask); } sendWaves.Clear(); UpdateTab(); }
//TODO: Have this as postCheck? just so it doesn't get constantly checked private void CheckSettlers(Account acc, Village vill, int currentLevel, DateTime finishBuilding) { if (this.task.Building == BuildingEnum.Residence && currentLevel >= 9 && acc.NewVillages.AutoSettleNewVillages && vill.Troops.Settlers == 0) { TaskExecutor.AddTaskIfNotExistInVillage(acc, vill, new TrainSettlers() { ExecuteAt = finishBuilding.AddSeconds(5), vill = vill, Priority = TaskPriority.Medium }); } }
internal PersistentDataStoreStatusManager( bool refreshOnRecovery, bool availableNow, Func <bool> statusPollFn, Action <DataStoreStatus> statusUpdater, TaskExecutor taskExecutor, Logger log ) { _refreshOnRecovery = refreshOnRecovery; _lastAvailable = new AtomicBoolean(availableNow); _statusPollFn = statusPollFn; _statusUpdater = statusUpdater; _taskExecutor = taskExecutor; _log = log; }
//Save button private void button1_Click(object sender, EventArgs e) { var acc = getSelectedAcc(); //change vill names list var changeVillNames = new List<(int, string)>(); for (int i = 0; i < tableModelMain.Rows.Count; i++) { var cells = tableModelMain.Rows[i].Cells; int column = 0; //Village id var id = Int32.Parse(cells[column].Text); var vill = acc.Villages.First(x => x.Id == id); //check if name is different. if it is, change the name var name = cells[++column].Text; if (name != vill.Name) { changeVillNames.Add((id, name)); } column++; UpdateVillageType(vill, cells, column); column++; UpdateBarracks(acc, vill, cells, column); column++; UpdateGB(acc, vill, cells, column); column++; UpdateStable(acc, vill, cells, column); column++; UpdateGS(acc, vill, cells, column); column++; UpdateWorkshop(acc, vill, cells, column); column++; vill.Settings.GetRes = cells[column].Checked; column++; vill.Settings.SendRes = cells[column].Checked; } //Change name of village/s if (changeVillNames.Count > 0) { TaskExecutor.AddTaskIfNotExists(acc, new ChangeVillageName() { ExecuteAt = DateTime.Now, ChangeList = changeVillNames }); } }
public override async Task <TaskRes> Execute(HtmlDocument htmlDoc, ChromeDriver wb, Files.Models.AccModels.Account acc) { // Check if the account has enough culture points if (acc.AccInfo.CulturePoints.MaxVillages <= acc.AccInfo.CulturePoints.VillageCount) { this.vill.Expansion.ExpensionAvailable = true; return(TaskRes.Executed); } this.vill.Expansion.ExpensionAvailable = false; //https://low4.ttwars.com/build.php?id=39&tt=2&kid=7274&a=6 //https://low4.ttwars.com/build.php?id=39&tt=2&kid=7272&a=6 if (acc.NewVillages.Locations.Count == 0) { if (acc.NewVillages.AutoFindVillages) // Find new village to settle { TaskExecutor.AddTaskIfNotExists(acc, new FindVillageToSettle() { ExecuteAt = DateTime.MinValue.AddHours(10), Priority = TaskPriority.Medium }); this.NextExecute = DateTime.MinValue.AddHours(11); } else { acc.Tasks.Remove(this); } return(TaskRes.Executed); } newVillage = acc.NewVillages.Locations.FirstOrDefault(); //acc.NewVillage.NewVillages.Remove(coords); //remove it after settling and changing the vill name?? string kid = MapHelper.KidFromCoordinates(newVillage.coordinates, acc).ToString(); await acc.Wb.Navigate($"{acc.AccInfo.ServerUrl}/build.php?id=39&tt=2&a=6&kid={kid}"); //TODO: check if enough resources!! newVillage.SettlersSent = true; var button = htmlDoc.GetElementbyId("btn_ok"); if (button != null) { wb.ExecuteScript($"document.getElementById('btn_ok').click()"); //Click send button } return(TaskRes.Executed); }
private static TaskResult Execute(IRemoteTaskServer server, TaskExecutionNode node, CSUnitTestTask test) { var fixture = (CSUnitTestFixtureTask) node.Parent.RemoteTask; object instance = fixture.Instance; Type type = instance.GetType(); MethodInfo testMI = type.GetMethod(test.TestMethod, new Type[0]); if (testMI == null) { server.TaskError(test, string.Format("Cannot find test method '{0}'", test.TestMethod)); return TaskResult.Error; } server.TaskProgress(test, ""); string expectedExceptionType; GetExpectedException(testMI, out expectedExceptionType); Exception exception = null; try { TaskExecutor.Invoke(instance, testMI); } catch (TargetInvocationException e) { exception = e.InnerException ?? e; } if (exception != null && exception.GetType().FullName == "csUnit.IgnoreException") { server.TaskFinished(test, exception.Message, TaskResult.Skipped); return TaskResult.Skipped; } if (expectedExceptionType != null && exception == null) { // failed, exception expected but not thrown server.TaskError(test, string.Format("Expected exception '{0}' was not thrown", expectedExceptionType)); return TaskResult.Error; } if (expectedExceptionType != null && expectedExceptionType == exception.GetType().FullName) { return TaskResult.Success; } if (exception != null) throw new TargetInvocationException(exception); return TaskResult.Success; }
public override async Task <TaskRes> Execute(Account acc) { var wb = acc.Wb.Driver; await acc.Wb.Navigate($"{acc.AccInfo.ServerUrl}/dorf2.php"); Random rnd = new Random(); int sec = rnd.Next(370, 380); TaskExecutor.AddTask(acc, new TTWarsGetRes() { ExecuteAt = DateTime.Now.AddSeconds(sec), Vill = AccountHelper.GetMainVillage(acc) }); TaskExecutor.AddTask(acc, new TrainExchangeRes() { ExecuteAt = DateTime.Now.AddSeconds(sec + 5), troop = acc.Villages[0].Troops.TroopToTrain ?? Classificator.TroopsEnum.Hero, Vill = Vill }); TaskExecutor.AddTask(acc, new TrainTroops() { ExecuteAt = DateTime.Now.AddSeconds(sec + 9), Troop = acc.Villages[0].Troops.TroopToTrain ?? Classificator.TroopsEnum.Hero, Vill = Vill, HighSpeedServer = true }); var script = "window.fireEvent('startPaymentWizard', {data:{activeTab: 'paymentFeatures'}});"; await DriverHelper.ExecuteScript(acc, script); script = "$$('.paymentWizardMenu').addClass('hide');$$('.buyGoldInfoStep').removeClass('active');$$('.buyGoldInfoStep#2').addClass('active');$$('.paymentWizardMenu#buyResources').removeClass('hide');"; await DriverHelper.ExecuteScript(acc, script); //gold prosButton buyResources6 //gold prosButton buyAnimal5 var buy = acc.Wb.Html.DocumentNode.Descendants("button").FirstOrDefault(x => x.HasClass("buyResources6")); if (buy == null) { acc.Wb.Log("Can't find the button with class buyResources6. Are you sure you are on vip/unl TTWars server?"); return(TaskRes.Executed); } var buyId = buy.GetAttributeValue("id", ""); wb.ExecuteScript($"document.getElementById('{buyId}').click()"); return(TaskRes.Executed); }
private async void NewTick() { try { if (acc.Tasks.Count == 0) { return; //No tasks } // Another task is already in progress. wait if (acc.Tasks.Any(x => x.Stage != TaskStage.Start)) { return; } var tasks = acc.Tasks.Where(x => x.ExecuteAt <= DateTime.Now).ToList(); if (tasks.Count == 0) { NoTasks(acc); return; } BotTask firstTask = tasks.FirstOrDefault(x => x.Priority == TaskPriority.High); if (firstTask == null) { firstTask = tasks.FirstOrDefault(x => x.Priority == TaskPriority.Medium); } if (firstTask == null) { firstTask = tasks.FirstOrDefault(); } firstTask.Stage = TaskStage.Executing; //If correct village is selected, otherwise change village if (firstTask.Vill != null) { var active = acc.Villages.FirstOrDefault(x => x.Active); if (active != null && active != firstTask.Vill) { await VillageHelper.SwitchVillage(acc, firstTask.Vill.Id); } } await TaskExecutor.Execute(acc, firstTask); } catch (Exception e) { } }
protected void CompleteSessionHandler(ActionExecutedContext filterContext) { using (RavenSession) { if (filterContext.Exception != null) { return; } if (RavenSession != null) { RavenSession.SaveChanges(); } } TaskExecutor.StartExecuting(); }
private void Execute() { var runnerContext = new RunnerContext(GetAnnouncer()) { Database = database, Task = task, Connection = connectionString, Target = migrationAssembly.CodeBase.Replace("file:///", string.Empty), Version = version }; Trace.TraceInformation("#\n# Executing migration task {0}...\n#\n", task); var localTask = new TaskExecutor(runnerContext); localTask.Execute(); Trace.TraceInformation("\n#\n# Task {0} complete!\n#", task); }
public override async Task <TaskRes> Execute(Account acc) { await acc.Wb.Navigate($"{acc.AccInfo.ServerUrl}/hero.php"); HeroHelper.ParseHeroPage(acc); TaskExecutor.RemoveSameTasks(acc, typeof(HeroUpdateInfo), this); if (acc.Hero.Settings.AutoRefreshInfo) { var ran = new Random(); this.NextExecute = DateTime.Now.AddMinutes(ran.Next(40, 80)); TaskExecutor.RemoveSameTasks(acc, this); } return(TaskRes.Executed); }
/// <summary> /// Méthode de gestion des traitements envoyés et reçus avec MapReduce /// </summary> /// <param name="input">Objet de transfert</param> /// <returns></returns> protected object ProcessMapReduce(DataInput input) { Logger.Write($"Traitement en cours pour la méthode {input.Method}"); TaskExecutor executor = WorkerFactory.GetWorker(input.Method); switch (input.MsgType) { case MessageType.Call: LazyNodeTranfert(input); break; case MessageType.Response: PrepareReduce(input, executor); break; } return(null); }
private void SendSettlersTask(Account acc) { var training = TroopsHelper.TrainingDuration(acc.Wb.Html); if (training < DateTime.Now) { training = DateTime.Now; } training = training.AddSeconds(5); acc.Wb.Log($"Bot will (try to) send settlers in {TimeHelper.InSeconds(training)} sec"); TaskExecutor.AddTaskIfNotExists(acc, new SendSettlers() { ExecuteAt = training, Vill = this.Vill }); }
internal DataSourceUpdateSinkImpl( FlagDataManager dataStore, bool isConfiguredOffline, TaskExecutor taskExecutor, Logger log ) { _dataStore = dataStore; _taskExecutor = taskExecutor; var initialStatus = new DataSourceStatus { State = isConfiguredOffline ? DataSourceState.SetOffline : DataSourceState.Initializing, StateSince = DateTime.Now, LastError = null }; _status = new StateMonitor <DataSourceStatus, StateAndError>(initialStatus, MaybeUpdateStatus, log); }
internal PollingDataSource( IDataSourceUpdateSink updateSink, User user, IFeatureFlagRequestor featureFlagRequestor, TimeSpan pollingInterval, TimeSpan initialDelay, TaskExecutor taskExecutor, Logger log) { this._featureFlagRequestor = featureFlagRequestor; this._updateSink = updateSink; this._user = user; this._pollingInterval = pollingInterval; this._initialDelay = initialDelay; this._taskExecutor = taskExecutor; this._log = log; _startTask = new TaskCompletionSource <bool>(); }
public void SetUp() { FillThreeChildren(); _childrenProviderFactory = new ChildrenProvider.Factory(); var taskExecutor = new TaskExecutor(new JoinableTaskContext().Factory); var enumFactory = new VariableInformationEnum.Factory(taskExecutor); var propertyFactory = new DebugProperty.Factory( enumFactory, _childrenProviderFactory, Substitute.For <DebugCodeContext.Factory>(), new VsExpressionCreator(), taskExecutor); _childrenProviderFactory.Initialize(propertyFactory.Create); _childrenProvider = _childrenProviderFactory.Create(new ListChildAdapter.Factory().Create(_children), _nameFlag, 0); }
private void RefreshVillage(Account acc, Village vill) { var executeAt = DateTime.Now.AddHours(-1); TaskExecutor.AddTask(acc, new UpdateDorf1() { ExecuteAt = executeAt, vill = vill }); TaskExecutor.AddTask(acc, new UpdateDorf2() { ExecuteAt = executeAt, vill = vill }); TaskExecutor.AddTask(acc, new UpdateTroops() { ExecuteAt = executeAt, vill = vill }); // Todo: refresh celebrities }
private void SendNewCommentEmail(Post post, PostComments.Comment comment, User postAuthor) { if (requestValues.IsAuthenticated) { return; // we don't send email for authenticated users } var viewModel = comment.MapTo <NewCommentEmailViewModel>(); viewModel.PostId = RavenIdResolver.Resolve(post.Id); viewModel.PostTitle = HttpUtility.HtmlDecode(post.Title); viewModel.PostSlug = SlugConverter.TitleToSlug(post.Title); viewModel.BlogName = DocumentSession.Load <BlogConfig>("Blog/Config").Title; viewModel.Key = post.ShowPostEvenIfPrivate.MapTo <string>(); var subject = string.Format("{2}Comment on: {0} from {1}", viewModel.PostTitle, viewModel.BlogName, comment.IsSpam ? "[Spam] " : string.Empty); TaskExecutor.ExcuteLater(new SendEmailTask(viewModel.Email, subject, "NewComment", postAuthor.Email, viewModel)); }
private void button3_Click(object sender, EventArgs e) //get only resources on UNL TTwars servers { var acc = getSelectedAcc(); int sec = 1; TaskExecutor.AddTask(acc, new TTWarsGetRes() { ExecuteAt = DateTime.Now.AddSeconds(sec) }); TaskExecutor.AddTask(acc, new TrainExchangeRes() { ExecuteAt = DateTime.Now.AddSeconds(sec + 5), troop = acc.Villages[0].Troops.TroopToTrain ?? Classificator.TroopsEnum.Hero }); TaskExecutor.AddTask(acc, new TrainTroops() { ExecuteAt = DateTime.Now.AddSeconds(sec + 11), Troop = acc.Villages[0].Troops.TroopToTrain ?? Classificator.TroopsEnum.Hero }); }
public override async Task <TaskRes> Execute(Account acc) { if (!TaskExecutor.IsLoginScreen(acc)) { await Task.Delay(AccountHelper.Delay() * 2); return(TaskRes.Executed); } var access = acc.Access.GetCurrentAccess(); if (acc.AccInfo.ServerUrl.Contains("ttwars")) { await DriverHelper.WriteByName(acc, "user", acc.AccInfo.Nickname); await DriverHelper.WriteByName(acc, "pw", access.Password); } else { await DriverHelper.WriteByName(acc, "name", acc.AccInfo.Nickname); await DriverHelper.WriteByName(acc, "password", access.Password); } await DriverHelper.ClickByName(acc, "s1"); if (TaskExecutor.IsLoginScreen(acc)) { // Wrong password/nickname acc.Wb.Log("Password is incorrect!"); acc.TaskTimer.Stop(); } else { await TaskExecutor.PageLoaded(acc); // check sitter account var auction = acc.Wb.Html.DocumentNode.SelectSingleNode("//a[contains(@class,'auction')]"); acc.Access.GetCurrentAccess().IsSittering = (auction != null && auction.HasClass("disable")); } return(TaskRes.Executed); }
public override async Task <TaskRes> Execute(Account acc) { var wb = acc.Wb.Driver; await acc.Wb.Navigate($"{acc.AccInfo.ServerUrl}/spieler.php?uid=1"); var vills = acc.Wb.Html.GetElementbyId("villages").Descendants("tr"); int addedFarms = 0; foreach (var vill in vills) { var name = vill.ChildNodes.First(x => x.HasClass("name")).InnerText; var pop = (int)Parser.RemoveNonNumeric(vill.Descendants().First(x => x.HasClass("inhabitants")).InnerHtml); if (pop > MinPop && pop < MaxPop) { var href = vill.Descendants("a").First(x => x.GetAttributeValue("href", "").StartsWith("karte.php?x=")).GetAttributeValue("href", "").Split('?')[1]; var xy = href.Split('&'); Coordinates coords = new Coordinates { x = (int)Parser.RemoveNonNumeric(xy[0].Split('=')[1]), y = (int)Parser.RemoveNonNumeric(xy[1].Split('=')[1]) }; var task = new AddFarm() { Coordinates = coords, ExecuteAt = DateTime.Now.AddMilliseconds(addedFarms), FarmListId = this.FL.Id, Troops = new List <TroopsRaw>() { new TroopsRaw() { Type = 1, Number = 10 } } //just add 10 of 1st troops }; TaskExecutor.AddTask(acc, task); addedFarms++; if (FL.NumOfFarms + addedFarms >= 100) { break; //no more slots FL slots! } } } return(TaskRes.Executed); }
public virtual ActionResult Comment(CommentInput input, int id, Guid key) { if (ModelState.IsValid) { var post = RavenSession .Include <Post>(x => x.CommentsId) .Load(id); if (post == null || post.IsPublicPost(key) == false) { return(HttpNotFound()); } var comments = RavenSession.Load <PostComments>(post.CommentsId); if (comments == null) { return(HttpNotFound()); } var commenter = RavenSession.GetCommenter(input.CommenterKey); if (commenter == null) { input.CommenterKey = Guid.NewGuid(); } ValidateCommentsAllowed(post, comments); ValidateCaptcha(input, commenter); if (ModelState.IsValid == false) { return(PostingCommentFailed(post, input, key)); } TaskExecutor.ExcuteLater(new AddCommentTask(input, Request.MapTo <AddCommentTask.RequestValues>(), id)); CommenterUtil.SetCommenterCookie(Response, input.CommenterKey.MapTo <string>()); OutputCacheManager.RemoveItem(SectionController.NameConst, MVC.Section.ActionNames.List); return(PostingCommentSucceeded(post, input)); } return(RedirectToAction("Details")); }
public async Task Navigate(string url) { if (string.IsNullOrEmpty(url)) { return; } int repeatCnt = 0; bool repeat; do { try { // Will throw exception after timeout this.Driver.Navigate().GoToUrl(url); repeat = false; } catch (Exception e) { if (acc.Wb == null) { return; } acc.Wb.Log($"Error navigation to {url} - probably due to proxy/Internet or due to chrome still being opened", e); repeat = true; if (5 <= ++repeatCnt && !string.IsNullOrEmpty(acc.Access.GetCurrentAccess().Proxy)) { // Change access repeatCnt = 0; var changeAccess = new ChangeAccess(); await changeAccess.Execute(acc); await Task.Delay(AccountHelper.Delay() * 5); } await Task.Delay(AccountHelper.Delay()); } }while (repeat); await Task.Delay(AccountHelper.Delay()); UpdateHtml(); await TaskExecutor.PageLoaded(acc); }
public static string Run() { var connectionString = ConfigurationManager.ConnectionStrings["Main"].ConnectionString; var migrationLog = new StringBuilder(); var announcer = new TextWriterAnnouncer(s => migrationLog.Append(s)); var runnerContext = new RunnerContext(announcer) { Database = "sqlserver", Connection = connectionString, Targets = new [] { typeof(MigrationsRunner).Assembly.FullName } }; var taskExecutor = new TaskExecutor(runnerContext); taskExecutor.Execute(); return(migrationLog.ToString()); }
private void oasisEnabled_CheckedChanged(object sender, EventArgs e) { var acc = GetSelectedAcc(); var vill = GetSelectedVillage(acc); vill.FarmingNonGold.OasisFarmingEnabled = oasisEnabled.Checked; if (oasisEnabled.Checked) { TaskExecutor.AddTaskIfNotExistInVillage(acc, vill, new AttackOasis() { Vill = vill }); } else // Remove all AttackOasis tasks for this village { TaskExecutor.RemoveTaskTypes(acc, typeof(AttackOasis), vill); } }
private void button3_Click(object sender, EventArgs e) { MessageBox.Show("Not yet implemented"); return; var acc = GetSelectedAcc(); var coords = new Coordinates(-52, -59); var waves = new List <SendWaveModel>(); for (int i = 0; i < 10; i++) { var attk = new SendWaveModel(); attk.Troops = new int[11]; if (i == 0) { attk.Arrival = DateTime.Now.AddHours(-1).AddMinutes(2); attk.Arrival = attk.Arrival.AddSeconds(60 - attk.Arrival.Second); acc.Wb.Log($"Arrive at {attk.Arrival}"); } else { attk.DelayMs = 1000; } attk.TargetCoordinates = coords; attk.MovementType = Classificator.MovementType.Reinforcement; attk.Troops[0] = 5555; waves.Add(attk); } var waveTask = new SendWaves() { ExecuteAt = DateTime.Now, Vill = AccountHelper.GetMainVillage(acc), SendWaveModels = waves.ToList(), Priority = Files.Tasks.BotTask.TaskPriority.High }; TaskExecutor.AddTask(acc, waveTask); }
private static void RunMigration(SqlConnection sqlConnection) { if ((sqlConnection != null) && (String.IsNullOrEmpty(sqlConnection.ConnectionString) == false)) { ConsoleAnnouncer consoleAnnouncer = new ConsoleAnnouncer { ShowSql = true }; RunnerContext runnerContext = new RunnerContext(consoleAnnouncer) { Targets = new[] { MigrationNamespace }, Database = "SqlServer", Connection = sqlConnection.ConnectionString, PreviewOnly = false }; TaskExecutor taskExecutor = new TaskExecutor(runnerContext); taskExecutor.Execute(); } }
void Start() { // Creates the socket socket = new WebSocket(url); // Setup the task executor tasker = new TaskExecutor(); // Bind events socket.OnOpen += onConnect; socket.OnMessage += onMessage; socket.OnClose += onClose ; }
public void EnqueueTask(TaskExecutor task, object data) { if (task == null) throw new ArgumentNullException("task"); EnqueueTaskInternal(new TaskItem(task, data)); }
public TaskItem(TaskExecutor task, object data) { if (task == null) throw new ArgumentNullException("task"); Task = task; UserData = data; }
internal FormattingResult(TreeData treeInfo, TokenStream tokenStream, TextSpan spanToFormat, TaskExecutor taskExecutor) : base(treeInfo, tokenStream, spanToFormat, taskExecutor) { }
public void Awake() { Instance = this; }