public static ElementTestClass Create(string id)
        {
            ElementTestClass element = new ElementTestClass();

            element.ID = id;
            return(element);
        }
示例#2
0
        public static ArrayTestClass Create()
        {
            ArrayTestClass target = new ArrayTestClass();

            target.StringArray = new string[] { "1", "2", "3" };
            target.Elements    = new ElementTestClass[] { ElementTestClass.Create("1"), ElementTestClass.Create("2"), ElementTestClass.Create("3") };
            return(target);
        }
        public static CollectionTestClass CreateCollectionContainingNulls()
        {
            CollectionTestClass target = new CollectionTestClass();

            target.ElementList = new ArrayList(new ElementTestClass[] { ElementTestClass.Create("1"), null, ElementTestClass.Create("3") });
            target.List        = new ArrayList(new string[] { "1", null, "3" });
            return(target);
        }
        public static HashTestClass CreateHashtableWithElements()
        {
            SortedList list = new SortedList();

            list.Add("1", ElementTestClass.Create("1"));
            list.Add("2", ElementTestClass.Create("2"));
            list.Add("3", ElementTestClass.Create("3"));

            HashTestClass hash = new HashTestClass();

            hash.ElementHash = list;
            return(hash);
        }
		public static ElementTestClass Create(string id)
		{
			ElementTestClass element = new ElementTestClass();
			element.ID = id;
			return element;
		}