Ejemplo n.º 1
0
        public void CanClear_DetailCollection()
        {
            DetailCollection collection = new DetailCollection();
            collection.Add("hello");

            collection.Clear();

            Assert.That(collection.Count, Is.EqualTo(0));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Clear Grid and Listbox
 /// </summary>
 /// <returns></returns>
 /// 2019/07/13, Vinoth N,  Initial Version
 private void Clear()
 {
     LineCollection.Clear();
     DetailCollection.Clear();
     ErrorCollection.Clear();
     counterStatus.Content = "";
     b_Download.IsEnabled  = false;
     tbk_counter.Text      = "0";
 }
Ejemplo n.º 3
0
        public void CanClear_DetailCollection()
        {
            DetailCollection collection = new DetailCollection();

            collection.Add("hello");

            collection.Clear();

            Assert.That(collection.Count, Is.EqualTo(0));
        }
Ejemplo n.º 4
0
        /// <summary>Is invoked when an item is beeing saved.</summary>
        /// <param name="item">The item that is beeing saved.</param>
        protected virtual void OnTrackingLinks(ContentItem item)
        {
            var referencedItems    = FindLinkedObjects(item).ToList();
            DetailCollection links = item.GetDetailCollection(LinkDetailName, false);

            if (referencedItems.Count > 0)
            {
                if (links == null)
                {
                    links = item.GetDetailCollection(LinkDetailName, true);
                }
                links.Replace(referencedItems);
            }
            else if (links != null && links.Count > 0)
            {
                links.Clear();
            }
        }