Ejemplo n.º 1
0
        /// <summary>
        /// upd  CFile by Changes
        /// </summary>

        protected static List <CFile> ChangeInFiles(CWhatIsChange Changes, List <CFile> Files)
        {
            List <CFile> OUTFile = new List <CFile>();

            foreach (CFile F in Files)
            {
                CFile File = new CFile();
                if (F.Filename == Changes.FullFileName)
                {
                    File.Filename = Changes.FullFileName;
                    File.Sections = new List <CSection>();
                    File.Sections = ChangeInSection(Changes, F.Sections);
                }
                else
                {
                    File = F;
                }

                OUTFile.Add(File);
            }
            return(OUTFile);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// upb CSection by Changes
        /// </summary>
        protected static List <CSection> ChangeInSection(CWhatIsChange Changes, List <CSection> Sections)
        {
            List <CSection> OUTSection = new List <CSection>();

            foreach (CSection C in Sections)
            {
                CSection Section = new CSection();

                if (C.SectionName == Changes.Section)
                {
                    Section.SectionName = Changes.ModifiedSection;
                    Section.KeyValue    = new List <CKeyValue>();
                    Section.KeyValue    = ChangeKeyValue(Changes, C.KeyValue);
                }
                else
                {
                    Section = C;
                }
                OUTSection.Add(Section);
            }
            return(OUTSection);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// upd configurations by Changes
        /// </summary>
        public static List <CConfiguration> ChangeInConfigurations(CWhatIsChange Changes, List <CConfiguration> Configurations)
        {
            List <CConfiguration> OUTConfigs = new List <CConfiguration>();

            foreach (CConfiguration C in Configurations)
            {
                CConfiguration Config = new CConfiguration();
                if (C.ConfigurationName == Changes.Configuration)
                {
                    Config.RunExeName        = Changes.RunExeName;
                    Config.ConfigurationName = Changes.Configuration;
                    Config.Files             = new List <CFile>();
                    Config.Files             = ChangeInFiles(Changes, C.Files);
                }
                else
                {
                    Config = C;
                }
                OUTConfigs.Add(Config);
            }
            return(OUTConfigs);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// upb kes and value in CKeysValues by Changes
        /// </summary>
        protected static List <CKeyValue> ChangeKeyValue(CWhatIsChange Changes, List <CKeyValue> KeysValues)
        {
            List <CKeyValue> OUTKeysValues = new List <CKeyValue>();

            foreach (CKeyValue KVD in KeysValues)
            {
                CKeyValue KeyValueDesc = new CKeyValue();

                if (KVD.Key == Changes.Key)
                {
                    KeyValueDesc.Key   = Changes.ModifiedKey;
                    KeyValueDesc.Value = Changes.ModifiedValue;
                    if (Changes.Description != null)
                    {
                        if ((Changes.ModifiedDescription != null) && (Changes.ModifiedDescription != ""))
                        {
                            if (!Changes.ModifiedDescription.StartsWith(";"))
                            {
                                KeyValueDesc.Description = ";" + Changes.ModifiedDescription;
                            }
                            else
                            {
                                KeyValueDesc.Description = Changes.ModifiedDescription;
                            }
                        }
                    }
                }
                else
                {
                    KeyValueDesc = KVD;
                }

                OUTKeysValues.Add(KeyValueDesc);
            }

            return(OUTKeysValues);
        }