Ejemplo n.º 1
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            IsInitialized = false;

            XPathDocument  doc = new XPathDocument(reader);
            XPathNavigator nav = doc.CreateNavigator();

            XPathNavigator iter = nav.SelectSingleNode("/Metadata");

            //read component metadata definition id
            ComponentMetadataDefinitionID = iter.GetAttribute("ComponentMetadataDefinitionID", String.Empty);
            m_tempLabel = iter.GetAttribute("Label", String.Empty);

            //read attribute indicating if component should wait for all predecessors
            var wait = iter.GetAttribute("WaitsForAllPredecessors", String.Empty);

            if (String.IsNullOrEmpty(wait) || (wait != Boolean.TrueString && wait != Boolean.FalseString)) //if value has not been found set it to true
            {
                m_tempWaitsForAllPredecessors = true;                                                      //default value
            }
            else
            {
                m_tempWaitsForAllPredecessors = Convert.ToBoolean(wait);
            }

            //read iospec and config wrapper from xml
            m_tempIoSpec        = IOSpec.ReadIOSpec(nav.SelectSingleNode("/Metadata/IOSpec"));
            m_tempConfigWrapper = ConfigWrapper.ReadConfig(nav);
        }
Ejemplo n.º 2
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            XPathDocument  doc = new XPathDocument(reader);
            XPathNavigator nav = doc.CreateNavigator();

            XPathNavigator iter = nav.SelectSingleNode("/Metadata");

            Label = iter.GetAttribute("Label", String.Empty);

            //read attribute indicating if component should wait for all predecessors
            var wait = iter.GetAttribute("WaitsForAllPredecessors", String.Empty);

            if (String.IsNullOrEmpty(wait) || (wait != Boolean.TrueString && wait != Boolean.FalseString)) //if value has not been found set it to true
            {
                WaitsForAllPredecessors = true;                                                            //default value
            }
            else
            {
                WaitsForAllPredecessors = Convert.ToBoolean(wait);
            }

            //read iospec
            m_IOSpec = IOSpec.ReadIOSpec(nav.SelectSingleNode("/Metadata/IOSpec"));
        }