Exemple #1
0
        private async void LoadLinks(Link newLink = null)
        {
            List <Link> links = await LinkService.GetAllLinks();

            if (links == null)
            {
                return;
            }

            foreach (Link link in links)
            {
                Links.Add(link);
            }

            if (newLink != null)
            {
                bool exists = Links.Any(l => l.LinkId == newLink.LinkId);
                if (!exists)
                {
                    Links.Add(newLink);
                }
            }
        }