コード例 #1
0
 /// <summary>
 /// Adds a Digital processor to this manager instance.
 /// </summary>
 /// <param name="proc">The processor to add.</param>
 public void AddDigital(DigitalProcessor proc)
 {
     using (var secure = new CCriticalSection())
     {
         if (DigitalProcessors == null)
         {
             DigitalProcessors = new List <DigitalProcessor>();
         }
         DigitalProcessors.Add(proc);
         Debug.PrintLine("Added digital XML processor.");
     }
 }
コード例 #2
0
        /// <summary>
        /// Writes a single DigitalElement to the XML Document in memory.
        /// </summary>
        /// <param name="item">The DigitalElement to write.</param>
        /// <returns>True if successful, false if it fails.</returns>
        public bool WriteDigitals(DigitalProcessor item)
        {
            var status = true;

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