Esempio n. 1
0
        private static KeyedItemCollection <string, MyClass> Clone(KeyedItemCollection <string, MyClass> init)
        {
            var collection = ItemCollectionTest.CreateNew();

            if (init != null)
            {
                foreach (var item in init)
                {
                    collection.Add(item);
                }
            }

            return(collection);
        }
Esempio n. 2
0
 private void TestHelper(string actionName, Action <KeyedItemCollection <string, MyClass> > action, bool isReadonlyExceptionExpected, KeyedItemCollection <string, MyClass> collection = null)
 {
     LogHelper.Log("Testing {0} ", actionName);
     this.TestHelper2(action, ItemCollectionTest.Clone(collection));
 }
Esempio n. 3
0
 // run the delegate
 private void TestHelper2(Action <KeyedItemCollection <string, MyClass> > action, KeyedItemCollection <string, MyClass> collection)
 {
     action(collection);
 }