using System;
using System.Collections.Generic;

namespace VirtualCanvasTestCode.Extensions
{
    public static partial class UniqueExtensions
    {
        public static void AddRange<T>(this ICollection<T> destination, IEnumerable<T> source)
        {
            try
            {
                List<T> list = destination as List<T>;

                if (list != null)
                {
                    list.AddRange(source);
                }
                else
                {
                    foreach (T item in source)
                    {
                        destination.Add(item);
                    }
                }
            }
            catch (System.Exception ex)
            {
                String msg = ex.Message;

            }
        }


    }
}