public static SimpleCollections CreateBig() { var obj = new SimpleCollections { Addresses = new List <string>() { "Addr1", "", "Addr3" }, Dictionary1 = new Dictionary <string, int>() { { "NULL", 0 }, { "one", 1 }, { "40", 40 } }, Dictionary2 = new Dictionary <int, string>() { { 1, "1" }, { 2, "2" }, { 3, "3" } }, SortedDictionary = new SortedDictionary <int, string>() { { 10, "ten" }, { 20, "20" }, { 4, "four" } }, //SortedList = new SortedList<int, string>() // { // {10, "ten"}, // {20, "20"}, // {4, "four"}, // {3, "zero"} // }, Ages = new int[] { 30, 27, 17, 70 }, Names = new string[] { "Salar", "BOIS", "Codeplex" }, }; obj.Ages = new int[short.MaxValue]; for (int i = 0; i < byte.MaxValue; i++) { obj.Ages[i] = i + 10; obj.Addresses.Add("add-" + i); obj.Dictionary1.Add("D1-" + i, i + 500); obj.Dictionary2.Add(i + 200, "D2-" + i); obj.SortedDictionary.Add(i + 200, "SD-" + i); } return(obj); }
//[ProtoMember(7)] //[DataMember] //public SortedList<int, string> SortedList { get; set; } public static SimpleCollections CreateSimple() { var obj = new SimpleCollections { Addresses = new List <string>() { "Addr1", "", "Addr3" }, Dictionary1 = new Dictionary <string, int>() { { "NULL", 0 }, { "one", 1 }, { "40", 40 } }, Dictionary2 = new Dictionary <int, string>() { { 1, "1" }, { 2, "2" }, { 3, "3" } }, SortedDictionary = new SortedDictionary <int, string>() { { 10, "ten" }, { 20, "20" }, { 4, "four" } }, //SortedList = new SortedList<int, string>() // { // {10, "ten"}, // {20, "20"}, // {4, "four"}, // {3, "zero"} // }, Ages = new int[] { 30, 27, 17, 70 }, Names = new string[] { "Salar", "BOIS", "Codeplex" }, }; return(obj); }
//[ProtoMember(7)] //[DataMember] //public SortedList<int, string> SortedList { get; set; } public static SimpleCollections CreateSimple() { var obj = new SimpleCollections { Addresses = new List<string>() {"Addr1", "", "Addr3"}, Dictionary1 = new Dictionary<string, int>() { {"NULL", 0}, {"one", 1}, {"40", 40} }, Dictionary2 = new Dictionary<int, string>() { {1, "1"}, {2, "2"}, {3, "3"} }, SortedDictionary = new SortedDictionary<int, string>() { {10, "ten"}, {20, "20"}, {4, "four"} }, //SortedList = new SortedList<int, string>() // { // {10, "ten"}, // {20, "20"}, // {4, "four"}, // {3, "zero"} // }, Ages = new int[] {30, 27, 17, 70}, Names = new string[] {"Salar", "BOIS", "Codeplex"}, }; return obj; }
public static SimpleCollections CreateBig() { var obj = new SimpleCollections { Addresses = new List<string>() {"Addr1", "", "Addr3"}, Dictionary1 = new Dictionary<string, int>() { {"NULL", 0}, {"one", 1}, {"40", 40} }, Dictionary2 = new Dictionary<int, string>() { {1, "1"}, {2, "2"}, {3, "3"} }, SortedDictionary = new SortedDictionary<int, string>() { {10, "ten"}, {20, "20"}, {4, "four"} }, //SortedList = new SortedList<int, string>() // { // {10, "ten"}, // {20, "20"}, // {4, "four"}, // {3, "zero"} // }, Ages = new int[] {30, 27, 17, 70}, Names = new string[] {"Salar", "BOIS", "Codeplex"}, }; obj.Ages = new int[short.MaxValue]; for (int i = 0; i < byte.MaxValue; i++) { obj.Ages[i] = i + 10; obj.Addresses.Add("add-" + i); obj.Dictionary1.Add("D1-" + i, i + 500); obj.Dictionary2.Add(i + 200, "D2-" + i); obj.SortedDictionary.Add(i + 200, "SD-" + i); } return obj; }