private void AddExample(ObjectsToBeSerialized obtbs) { ListViewItem li = new ListViewItem(ExampleCreation.GetEnumItemDescription(obtbs)); li.ImageIndex = 0; li.Tag = obtbs; this.listView1.Items.Add(li); }
/// <summary> /// /// </summary> /// <param name="obj"></param> /// <returns></returns> public static Object CreateObject(ObjectsToBeSerialized obj) { switch (obj) { case ObjectsToBeSerialized.ComplexDummyClass: return CreateComplexDummy(); case ObjectsToBeSerialized.ComplexDummyClassExt: return CreateComplexDummyExt(); case ObjectsToBeSerialized.Hashtable1000: return CreateHashtable(1000); case ObjectsToBeSerialized.SimpleDummyClass: return CreateSimpleDummyClass(false); case ObjectsToBeSerialized.SimpleDummyClassCircRef: return CreateSimpleDummyClass(true); case ObjectsToBeSerialized.StringArray1000: return CreateStringArray(1000); case ObjectsToBeSerialized.External: return CreateExternalObject(); default: return null; } }