Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 // 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)));
        }
Exemplo n.º 5
0
        private void ReceiveUpdates()
        {
            _resetEvent.Wait();

            while (!_cancel.IsCancellationRequested)
            {
                var enveloppe = _getMarketUpdates.ReceiveMultipartMessage()
                                .GetMessageFromPublisher <ISequenceItem <TDto> >();

                Updates.Add(enveloppe.Message.Position, enveloppe.Message);
            }
        }
Exemplo n.º 6
0
        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;
            }
        }
Exemplo n.º 7
0
    public void activate(Updates updates)
    {
        switch (updates)
        {
        case Updates.DoubleGun:
            doubleGun.activate();
            break;

        case Updates.MiniGun:
            _minigun.activate();
            break;
        }
    }
Exemplo n.º 8
0
    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));
            }
        }
Exemplo n.º 10
0
        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));
        }
Exemplo n.º 11
0
        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);
        }
Exemplo n.º 12
0
        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;
        }
Exemplo n.º 13
0
        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"));
        }
Exemplo n.º 14
0
        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;
        }
Exemplo n.º 15
0
        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();
        }
Exemplo n.º 16
0
 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);
                });
            }
Exemplo n.º 18
0
        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)));
        }
Exemplo n.º 19
0
        public ApiManager(string accessToken)
        {
            AccessToken = accessToken;

            Message = new Message
            {
                AccessToken = AccessToken
            };

            Updates = new Updates
            {
                AccessToken = AccessToken
            };
        }
Exemplo n.º 20
0
 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;
 }
Exemplo n.º 21
0
        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);
        }
Exemplo n.º 22
0
        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);
        }
Exemplo n.º 23
0
    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;
        }
    }
Exemplo n.º 25
0
        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));
        }
Exemplo n.º 26
0
        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;
        }
    }
Exemplo n.º 29
0
 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;
 }
Exemplo n.º 30
0
 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);
                }
            }
        }
Exemplo n.º 32
0
        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);
        }
Exemplo n.º 33
0
        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;
        }
Exemplo n.º 34
0
 public void to_pass(Updates up)
 {
     _up = up;
 }
Exemplo n.º 35
0
 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;
     }
 }