示例#1
0
        static Dictionary <string, O> ApplyReplacementsToOld <O>(this Replacements replacements, Dictionary <string, O> oldDictionary, string replacementsKey)
        {
            if (!replacements.ContainsKey(replacementsKey))
            {
                return(oldDictionary);
            }

            Dictionary <string, string> dic = replacements[replacementsKey];

            return(oldDictionary.SelectDictionary(a => dic.TryGetC(a) ?? a, v => v));
        }
示例#2
0
        public override void RunFinished()
        {
            base.RunFinished();

            // rename the feature folder to match the name of the feature as VS
            // does not support substitution in folder names
            if (folderItem != null && Replacements.ContainsKey(ItemPropertyValues.RootName))
            {
                folderItem.Properties.Item("FileName").Value = Replacements[ItemPropertyValues.RootName];
            }
        }
示例#3
0
        static Dictionary <string, O> ApplyReplacementsToOldCleaning <O>(this Replacements replacements, Dictionary <string, O> oldDictionary, string replacementsKey)
        {
            if (!replacements.ContainsKey(replacementsKey))
            {
                return(oldDictionary);
            }

            Dictionary <string, string> dic = replacements[replacementsKey];

            var cleanDic = dic.SelectDictionary(n => ObjectName.Parse(n).Name, n => ObjectName.Parse(n).Name);

            return(oldDictionary.SelectDictionary(a => cleanDic.TryGetC(a) ?? a, v => v));
        }