Exemplo n.º 1
0
 public MultipleSerializableId(IEnumerable <Element> elements)
 {
     foreach (Element element in elements)
     {
         StringIDs.Add(element.UniqueId);
         IDs.Add(element.Id.IntegerValue);
     }
 }
Exemplo n.º 2
0
        public MultipleSerializableId(IEnumerable <Element> elements)
        {
            InitializeDataMembers();

            foreach (Element element in elements)
            {
                StringIDs.Add(element.UniqueId);
                IntIDs.Add(element.Id.IntegerValue);
            }
        }
Exemplo n.º 3
0
        /// <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);
            }
        }