Exemple #1
0
        public void CopyTo(OptionsNode opt)
        {
            if (opt == null)
            {
                return;
            }

            foreach (FieldInfo f in m_OptionFields.Values)
            {
                if (m_FieldsDefined.Contains(f.Name))
                {
                    f.SetValue(opt, f.GetValue(this));
                    opt.m_FieldsDefined.Add(f.Name);
                }
            }
        }
        public override void Parse(XmlNode node)
        {
            m_Name = Helper.AttributeValue(node, "name", m_Name);
            m_Path = Helper.AttributeValue(node, "path", m_Path);

            m_FullPath = m_Path;
            try
            {
                m_FullPath = Helper.ResolvePath(m_FullPath);
            }
            catch
            {
                throw new WarningException("Could not resolve solution path: {0}", m_Path);
            }

            Kernel.Instance.CWDStack.Push();
            try
            {
                Helper.SetCurrentDir(m_FullPath);

                foreach (XmlNode child in node.ChildNodes)
                {
                    IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
                    if (dataNode is OptionsNode)
                    {
                        m_Options = (OptionsNode)dataNode;
                    }
                    else if (dataNode is FilesNode)
                    {
                        m_Files = (FilesNode)dataNode;
                    }
                    else if (dataNode is ConfigurationNode)
                    {
                        m_Configurations[((ConfigurationNode)dataNode).Name] = dataNode;
                    }
                    else if (dataNode is ProjectNode)
                    {
                        m_Projects[((ProjectNode)dataNode).Name] = dataNode;
                    }
                }
            }
            finally
            {
                Kernel.Instance.CWDStack.Pop();
            }
        }
 public ConfigurationNode()
 {
     m_Options = new OptionsNode();
 }
        public override void Parse(XmlNode node)
        {
            m_Name = Helper.AttributeValue(node, "name", m_Name);
            m_Path = Helper.AttributeValue(node, "path", m_Path);

            m_FullPath = m_Path;
            try
            {
                m_FullPath = Helper.ResolvePath(m_FullPath);
            }
            catch
            {
                throw new WarningException("Could not resolve solution path: {0}", m_Path);
            }

            Kernel.Instance.CWDStack.Push();
            try
            {
                Helper.SetCurrentDir(m_FullPath);

                foreach(XmlNode child in node.ChildNodes)
                {
                    IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
                    if(dataNode is OptionsNode)
                        m_Options = (OptionsNode)dataNode;
                    else if(dataNode is FilesNode)
                        m_Files = (FilesNode)dataNode;
                    else if(dataNode is ConfigurationNode)
                        m_Configurations[((ConfigurationNode)dataNode).Name] = dataNode;
                    else if(dataNode is ProjectNode)
                        m_Projects[((ProjectNode)dataNode).Name] = dataNode;
                }
            }
            finally
            {
                Kernel.Instance.CWDStack.Pop();
            }
        }
        public void CopyTo(OptionsNode opt)
        {
            if(opt == null)
                return;

            foreach(FieldInfo f in m_OptionFields.Values)
            {
                if(m_FieldsDefined.Contains(f.Name))
                {
                    f.SetValue(opt, f.GetValue(this));
                    opt.m_FieldsDefined.Add(f.Name);
                }
            }
        }
 public ConfigurationNode()
 {
     m_Options = new OptionsNode();
 }