Ejemplo n.º 1
0
 /// <summary>
 /// remove list entry by Customer
 /// </summary>
 /// <param name="distributedList"></param>
 public void RemoveListValue(IDistributedList <object> distributedList)
 {
     distributedList.WriteThruOptions = new WriteThruOptions(WriteMode.WriteThru, WriteThruProviderName);
     distributedList.Remove(new Customer()
     {
         CustomerID = CustomerID,
     });
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Remove an object in distributed list by instance of object
        /// </summary>
        /// <param name="customer">Instance of object to be deleted from distributed list</param>
        private static void RemoveObjectFromList(Customer customer)
        {
            IDistributedList <Customer> list = _cache.DataTypeManager.GetList <Customer>(_datatype);
            // Remove the existing customer
            // Expensive operation use carefully
            bool removed = list.Remove(customer);

            //Print output on console.
            Console.WriteLine("\nObject is" + ((removed) ? " " : " not ") + "removed from distributed List.");
        }