/// <inheritdoc cref="Fluxup.Core.IUpdateInfo{TUpdateEntry}.FetchReleaseNotes()"/> public virtual async Task <string[]> FetchReleaseNotes() { var count = Updates.LongCount(); var releaseNotes = new string[count]; for (var i = 0; i < count; i++) { releaseNotes[i] = await Updates[i].FetchReleaseNote() ?? $"No release note for update {Updates[i].Version}."; } return(releaseNotes); }
public ManageUpdatesPage() { InitializeComponent(); InitializeProgressControls(); tableLayoutPanel1.Visible = false; UpdateButtonEnablement(); dataGridViewUpdates.Sort(ColumnDate, ListSortDirection.Descending); informationLabel.Click += informationLabel_Click; Updates.RegisterCollectionChanged(UpdatesCollectionChanged); Updates.CheckForUpdatesStarted += CheckForUpdates_CheckForUpdatesStarted; Updates.CheckForUpdatesCompleted += CheckForUpdates_CheckForUpdatesCompleted; }
// Used by ReadInnerXml(), ReadInnerText(), and set_Value() // Deletes all the child nodes and adds the nodeCache nodes, does nothing if nodeCache is null private void ReplaceChildren(NodeCache nodeCache) { if (nodeCache != null) { ANode[] nodes = EnumerateANodes(ANode.children()).ToArray(); using (new Updates()) { Updates.Do(new Delete(null, Seq.get(nodes, nodes.Length))); Updates.Do(new Insert(null, nodeCache.value(), false, true, false, false, DbNode)); } } }
private XenServerPatchAlert GetAlertFromFile(string fileName, out bool hasUpdateXml) { var alertFromIso = GetAlertFromIsoFile(fileName, out hasUpdateXml); if (alertFromIso != null) { return(alertFromIso); } // couldn't find an alert from the information in the iso file, try matching by name return(Updates.FindPatchAlertByName(Path.GetFileNameWithoutExtension(fileName))); }
private void ReceiveUpdates() { _resetEvent.Wait(); while (!_cancel.IsCancellationRequested) { var enveloppe = _getMarketUpdates.ReceiveMultipartMessage() .GetMessageFromPublisher <ISequenceItem <TDto> >(); Updates.Add(enveloppe.Message.Position, enveloppe.Message); } }
public UpdateInfo(SemanticVersion applicationVersion, params ReleaseEntry[] updates) { Updates = updates; //See if there is any update that is newer then the current version HasUpdate = Updates.Any(x => x.Version > applicationVersion); //Get the newest version if we have an update to apply if (HasUpdate) { NewVersion = Updates.OrderByDescending(x => x.Version).FirstOrDefault()?.Version; } }
public void activate(Updates updates) { switch (updates) { case Updates.DoubleGun: doubleGun.activate(); break; case Updates.MiniGun: _minigun.activate(); break; } }
public Boolean getActive(Updates updates) { switch (updates) { case Updates.DoubleGun: return(doubleGun.active); case Updates.MiniGun: return(_minigun.active); } return(false); }
public IActionResult UpdateAReleifToTeacher([FromBody] Updates updates) { var Result = _reliefServices.UpdateARelief(updates); if (Result.GetType() == typeof(string)) { return(BadRequest(Result)); } else { return(Ok(Result)); } }
public void WriteByte(int offset, byte value) { // If contigious region, append to previous changeset var latest = Updates.LastOrDefault(); if (latest != null && IsContigious(offset, latest)) { latest.Values.Add(value); return; } Updates.Add(new Changeset(offset, value)); }
public void NoInfoForCurrentVersion() { // Arrange var serverVersions = GetAVersionWithGivenNumberOfPatches(200); var master = GetAMockHost(serverVersions.First().Version.ToString(), serverVersions.First().BuildNumber + "to_make_it_not_match"); SetXenServerVersionsInUpdates(serverVersions); // assert var minimalPatches = Updates.GetMinimalPatches(master.Object.Connection); Assert.Null(minimalPatches); }
public static void Update(EliteAPI api) { //Update GUI. Player.Location.isZoning = api.Player.X == 0 && api.Player.Y == 0 && api.Player.Z == 0; if (Player.Location.isZoning && Player.hasDialogue) { Player.hasDialogue = false; } Updates.UpdateLabels(api); NailClipr.GUI_ACCEPT.Enabled = Player.hasDialogue; }
public IActionResult Callback([FromBody] Updates updates) { switch (updates.Type) { case "confirmation": return(Ok(_configuration["Config:Confirmation"])); case "message_new": { // Десериализация var msg = Message.FromJson(new VkResponse(updates.Object)); var peerId = msg.PeerId; if (msg.Text == "/log") { LogMessage(updates, msg); break; } if (JoinGroupTest(peerId, msg, updates.GroupId)) { break; } var user = _usersState.GetUser(peerId.Value); if (user == null || user != null && !user.RequestToJoinGroptSent) { FirstTimeEnter(peerId, updates.GroupId); } else { SendMessage(peerId, "Если хочешь вступить в эту супер илитную групку, то отвечай на вопросы! " + "И используй кнопки! 😠"); SendMessage(peerId, user.LastQuestion, user.LastKeyboard); } break; } case "group_join": { var peerId = GroupJoin.FromJson(new VkResponse(updates.Object)).UserId; FirstTimeEnter(peerId, updates.GroupId); break; } } return(Ok("ok")); }
public async Task RefreshUpdates() { Updates.Clear(); Updates.LoadState = LoadState.Loading; var updates = await userService.GetFriendUpdates("", "", "100"); foreach (var update in updates.Update) { Updates.Add(new UpdateViewModel(update)); } Updates.LoadState = LoadState.Loaded; }
private void Cleanup() { if (Updates.PendingInstallPath != null && System.IO.File.Exists(Updates.PendingInstallPath)) { Updates.PerformFileSwap(Updates.PendingInstallPath); } Exit(); // Clean up Veldrid resources _gd?.WaitForIdle(); _controller?.Dispose(); }
private void DeleteAllAllertAction_Completed(ActionBase sender) { foreach (var alert in Updates.UpdateAlerts) { if (alert.IsDismissed()) { Updates.RemoveUpdate(alert); } } Program.Invoke(Program.MainWindow, () => { Rebuild(); }); }
public void Update(ITerrain terrain, Player player, Area visibleArea) { if (IsEmpty) { return; } if (!visibleArea.IntersectsWith(BoundingBox)) { // nem lathato cella if (Updates.Count <= 0) { return; } // ha van benne update akkor csak a tipust tartjuk meg es az osszes update-et toroljuk DirtyLayers.AddMany(Updates.Select(u => u.Type).Distinct()); Updates.Clear(); return; } if (DirtyLayers.Count > 0) { // itt az egesz cellat elkuldjuk ha valamelyik tipus modosult foreach (var type in DirtyLayers) { var packet = terrain.BuildLayerUpdatePacket(type, BoundingBox); player.Session.SendPacket(packet); } //torlunk mindent Updates.Clear(); DirtyLayers.Clear(); return; } // itt a kis teruleteket vizsgaljuk meg,h lathato-e // ha igen akkor kikuldjuk es toroljuk a cellabol Updates.RemoveAll(info => { if (!info.IntersectsWith(visibleArea)) { return(false); } var packet = info.CreateUpdatePacket(terrain); player.Session.SendPacket(packet); return(true); }); }
public void FourtyOnePatchToBeInstalledForCurrentVersion() { // Arrange var serverVersions = GetAVersionWithGivenNumberOfPatches(100); RemoveANumberOfPatchesPseudoRandomly(serverVersions.First().MinimalPatches, 49); var pool_patches = new List <Pool_patch>(); for (int ii = 0; ii < 10; ii++) { pool_patches.Add(new Pool_patch() { uuid = serverVersions.First().MinimalPatches[ii].Uuid }); } var notMinimalPatchesInVersion = serverVersions.First().Patches.Where(p => !serverVersions.First().MinimalPatches.Exists(mp => mp.Uuid == p.Uuid)).ToList(); for (int ii = 0; ii < 5; ii++) { pool_patches.Add(new Pool_patch() { uuid = notMinimalPatchesInVersion[ii].Uuid }); } var master = GetAMockHost(serverVersions.First().Version.ToString(), serverVersions.First().BuildNumber, pool_patches); SetXenServerVersionsInUpdates(serverVersions); // Assert var minimalPatches = Updates.GetMinimalPatches(master.Object.Connection); Assert.NotNull(minimalPatches); Assert.AreEqual(51, minimalPatches.Count); var upgradeSequence = Updates.GetPatchSequenceForHost(master.Object, minimalPatches); Assert.NotNull(upgradeSequence); Assert.AreEqual(41, upgradeSequence.Count); foreach (var patch in upgradeSequence) { Assert.IsTrue(serverVersions.First().MinimalPatches.Contains(patch) && !pool_patches.Exists(p => p.uuid == patch.Uuid)); } Assert.False(upgradeSequence.Exists(seqpatch => !serverVersions.First().MinimalPatches.Contains(seqpatch))); Assert.True(upgradeSequence.Exists(seqpatch => !pool_patches.Exists(pp => pp.uuid == seqpatch.Uuid))); }
public ApiManager(string accessToken) { AccessToken = accessToken; Message = new Message { AccessToken = AccessToken }; Updates = new Updates { AccessToken = AccessToken }; }
public ManageUpdatesPage() { InitializeComponent(); InitializeProgressControls(); tableLayoutPanel1.Visible = false; UpdateButtonEnablement(); dataGridViewUpdates.Sort(ColumnDate, ListSortDirection.Descending); informationLabel.Click += informationLabel_Click; Updates.RegisterCollectionChanged(UpdatesCollectionChanged); Updates.RestoreDismissedUpdatesStarted += Updates_RestoreDismissedUpdatesStarted; Updates.CheckForUpdatesStarted += CheckForUpdates_CheckForUpdatesStarted; Updates.CheckForUpdatesCompleted += CheckForUpdates_CheckForUpdatesCompleted; pictureBox1.Image = SystemIcons.Information.ToBitmap(); PageWasRefreshed = false; }
async Task <Updates> CheckUpdates() { string json = await HttpGetAsync("https://raw.githubusercontent.com/VladTheJunior/ResourceManagerUpdates/master/Updates.json"); Updates res = new Updates(); try { res = JsonSerializer.Deserialize <Updates>(json); } catch { } return(res); }
public async Task <long> Next(string scope) { UpdateDefinition <IdDto> def = Updates.Inc(x => x.Value, 1); FilterDefinition <IdDto> filter = Filters.Eq(x => x.Scope, scope); IdDto response = await Collection .FindOneAndUpdateAsync(filter, def, new FindOneAndUpdateOptions <IdDto, IdDto> { ReturnDocument = ReturnDocument.After, IsUpsert = true }); return(response.Value); }
protected void Page_Load(object sender, EventArgs e) { ILinkedInService service = _linkedInService; try { Updates updates = service.GetNetworkUpdates(NetworkUpdateTypes.ConnectionUpdate, 20, 1, DateTime.MinValue, DateTime.MinValue); console.Text += Utilities.SerializeToXml <Updates>(updates); } catch (LinkedInException lie) { console.Text += lie.Message; } }
protected void Page_Load(object sender, EventArgs e) { LinkedInService service = new LinkedInService(base.Authorization); try { Updates updates = service.GetNetworkUpdates(NetworkUpdateTypes.PostedAJob, 20, 1, DateTime.MinValue, DateTime.MinValue); console.Text += Utilities.SerializeToXml <Updates>(updates); } catch (LinkedInException lie) { console.Text += lie.Message; } }
protected override Problem RunCheck() { var action = Updates.CreateDownloadUpdatesXmlAction(Updates.CheckForUpdatesUrl); try { action.RunExternal(action.Session); } catch { log.WarnFormat("Could not download check for update file."); } return(action.Succeeded ? null : new CfuNotAvailableProblem(this)); }
public void Reset() { Initialized = false; eventId = 0; lastUpdateTime = DateTime.UtcNow; Sites.Clear(); Coords.Clear(); Types.Clear(); Styles.Clear(); Sizes.Clear(); Services.Clear(); Updates.Clear(); }
public void EnableKeyTracking(bool enable) { if (enable) { Updates += KeyUpdate; gameObject.SetActive(true); } else { Updates -= KeyUpdate; if (Updates.GetInvocationList().Length == 0) { gameObject.SetActive(false); } } }
protected void Page_Load(object sender, EventArgs e) { ILinkedInService service = _linkedInService; try { // Returns an error Updates updates = service.GetNetworkUpdates(NetworkUpdateTypes.ConnectionUpdate | NetworkUpdateTypes.ChangedAPicture, 20, 0, DateTime.Now.AddDays(-1), DateTime.Now); console.Text += Utilities.SerializeToXml <Updates>(updates); } catch (LinkedInException lie) { console.Text += lie.Message; } }
public ManageUpdatesPage() { InitializeComponent(); InitializeProgressControls(); tableLayoutPanel1.Visible = false; UpdateButtonEnablement(); dataGridViewUpdates.Sort(ColumnDate, ListSortDirection.Descending); informationLabel.Click += informationLabel_Click; m_updateCollectionChangedWithInvoke = Program.ProgramInvokeHandler(UpdatesCollectionChanged); Updates.RegisterCollectionChanged(m_updateCollectionChangedWithInvoke); Updates.RestoreDismissedUpdatesStarted += Updates_RestoreDismissedUpdatesStarted; Updates.CheckForUpdatesStarted += CheckForUpdates_CheckForUpdatesStarted; Updates.CheckForUpdatesCompleted += CheckForUpdates_CheckForUpdatesCompleted; toolStripSplitButtonDismiss.DefaultItem = dismissAllToolStripMenuItem; toolStripSplitButtonDismiss.Text = dismissAllToolStripMenuItem.Text; }
private void Main_KeyDown(object sender, KeyEventArgs e) { if (e.Control == true && e.KeyCode == Keys.F) { button9.PerformClick(); } if (e.Control == true && e.KeyCode == Keys.C) { button10.PerformClick(); } if (e.Control == true && e.KeyCode == Keys.T) { button11.PerformClick(); } if (e.Control == true && e.KeyCode == Keys.B) { button12.PerformClick(); } if (e.Control == true && e.KeyCode == Keys.O) { button8.PerformClick(); } if (e.Control == true && e.KeyCode == Keys.F1) { Support.PerformClick(); } if (e.Control == true && e.KeyCode == Keys.F2) { TTNV.PerformClick(); } if (e.Control == true && e.KeyCode == Keys.F3) { Updates.PerformClick(); } if (e.Control == true && e.KeyCode == Keys.F4) { Addac.PerformClick(); } if (e.Control == true && e.KeyCode == Keys.F5) { Pass.PerformClick(); } if (e.Control == true && e.KeyCode == Keys.X) { Logout.PerformClick(); } }
private void MarkRead(Updates updatesInstance) { bool hasUnread = false; if (updatesInstance != null) { foreach (var item in updatesInstance.LatestUpdates) { if (item != null && item.IsUnread) { hasUnread = true; } } if (hasUnread && updatesInstance.HighWatermark > 0) { // Mark as read for next time. JeffWilcox.FourthAndMayor.FourSquare.Instance.SetNotificationsHighWatermark( updatesInstance.HighWatermark, null, null); } } }
public void DeserializeTest() { Collection<NetworkStatsProperty> networkStats = new Collection<NetworkStatsProperty>(); networkStats.Add(new NetworkStatsProperty { Key = "degree-1-count", Value = Constants.NetworkStatsDegreeOne.ToString() }); networkStats.Add(new NetworkStatsProperty { Key = "degree-2-count", Value = Constants.NetworkStatsDegreeTwo.ToString() }); Updates updates = new Updates(); updates.Items = new Collection<Update>(); updates.Items.Add(EntitiesConstants.Update_One); updates.Items.Add(EntitiesConstants.Update_Two); updates.Items.Add(EntitiesConstants.Update_Three); updates.NumberOfResults = Constants.NumberOfUpdates; Network expected = new Network { NetworkStats = networkStats, Updates = updates }; Network actual = LinkedIn.Utility.Utilities.DeserializeXml<Network>(this.networkRequest); Assert.AreEqual(expected.Updates.NumberOfResults, actual.Updates.NumberOfResults); Assert.AreEqual(expected.Updates.Items[0].UpdateType, actual.Updates.Items[0].UpdateType); Assert.AreEqual(expected.Updates.Items[0].UpdateContent.Person.Id, actual.Updates.Items[0].UpdateContent.Person.Id); Assert.AreEqual(expected.NetworkStats[0].Value, actual.NetworkStats[0].Value); }
public List<Message> Map(Updates updates) { if (updates == null) return null; List<Message> messages = new List<Message>(updates.Items.Count); foreach (Update update in updates.Items) { if (update.UpdateType.ToLower() != "stat") continue; LinkedInMessage message = new LinkedInMessage(); DateTime postedOn = DateTime.SpecifyKind(ConvertFromUnixTimestamp(update.Timestamp), DateTimeKind.Utc); message.PostedOn = TimeZoneInfo.ConvertTime(postedOn, TimeZoneInfo.Local); message.Source = SocialNetworks.LinkedIn; message.UserName = update.UpdateContent.Person.Name; message.Text = update.UpdateContent.Person.CurrentStatus; message.UserImageUrl = update.UpdateContent.Person.PictureUrl; messages.Add(message); } return messages; }
public void to_pass(Updates up) { _up = up; }
public void ProcessUpdates(Updates update) { logger.info("processing updates: {0}", update); switch (update.Constructor) { case Constructor.updatesTooLong: ProcessUpdate((UpdatesTooLongConstructor)update); break; case Constructor.updateShortMessage: ProcessUpdate((UpdateShortMessageConstructor)update); break; case Constructor.updateShortChatMessage: ProcessUpdate((UpdateShortChatMessageConstructor)update); break; case Constructor.updateShort: ProcessUpdate((UpdateShortConstructor)update); break; case Constructor.updatesCombined: ProcessUpdate((UpdatesCombinedConstructor)update); break; case Constructor.updates: ProcessUpdate((UpdatesConstructor)update); break; } }