Beispiel #1
0
 /// <summary>
 /// Adds a Serial processor to this manager instance.
 /// </summary>
 /// <param name="proc">The processor to add.</param>
 public void AddSerial(SerialProcessor proc)
 {
     using (var secure = new CCriticalSection())
     {
         if (SerialProcessors == null)
         {
             SerialProcessors = new List <SerialProcessor>();
         }
         SerialProcessors.Add(proc);
         Debug.PrintLine("Added serial XML processor.");
     }
 }
        /// <summary>
        /// Writes a single SerialElement to the XML Document in memory.
        /// </summary>
        /// <param name="item">The SerialElement to write.</param>
        /// <returns>True if successful, false if it fails.</returns>
        public bool WriteSerials(SerialProcessor item)
        {
            bool status = true;

            for (var i = 0; i < item.Elements.Count; i++)
            {
                if (WriteElement(item.Elements[i]) == false)
                {
                    status = false;
                }
            }
            return(status);
        }