public MultipleSerializableId(IEnumerable <Element> elements) { foreach (Element element in elements) { StringIDs.Add(element.UniqueId); IDs.Add(element.Id.IntegerValue); } }
public MultipleSerializableId(IEnumerable <Element> elements) { InitializeDataMembers(); foreach (Element element in elements) { StringIDs.Add(element.UniqueId); IntIDs.Add(element.Id.IntegerValue); } }
/// <summary> /// Ctor used by the serialisation engine /// </summary> /// <param name="info"></param> /// <param name="context"></param> public MultipleSerializableId(SerializationInfo info, StreamingContext context) { int numberOfElements = info.GetInt32("numberOfElements"); for (int i = 0; i < numberOfElements; i++) { string stringID = (string)info.GetValue("stringID-" + i, typeof(string)); int intID = (int)info.GetValue("intID-" + i, typeof(int)); StringIDs.Add(stringID); IDs.Add(intID); } }