void LoadPropertySets() { if (sectionLines != null) { SlnPropertySet curSet = null; for (int n = 0; n < sectionLines.Count; n++) { var line = sectionLines [n]; if (string.IsNullOrEmpty(line.Trim())) { continue; } var i = line.IndexOf('.'); if (i == -1) { throw new InvalidSolutionFormatException(baseIndex + n); } var id = line.Substring(0, i); if (curSet == null || id != curSet.Id) { curSet = new SlnPropertySet(id); nestedPropertySets.Add(curSet); } curSet.ReadLine(line.Substring(i + 1), baseIndex + n); } sectionLines = null; } }
void LoadSolutionConfigurations(SlnPropertySet sec, Solution solution, ProgressMonitor monitor) { if (sec == null) { return; } foreach (var pair in sec) { string configId = FromSlnConfigurationId(pair.Key); SolutionConfiguration config = solution.Configurations [configId]; if (config == null) { config = CreateSolutionConfigurationFromId(configId); solution.Configurations.Add(config); } } }
public void SetContent(IEnumerable <KeyValuePair <string, string> > lines) { sectionLines = new List <string> (lines.Select(p => p.Key + " = " + p.Value)); properties = null; nestedPropertySets = null; }
public void Clear() { properties = null; nestedPropertySets = null; sectionLines = null; }