Example #1
0
 private 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,
                           string.Format(LocalizableStrings.InvalidPropertySetFormatString, '.'));
             }
             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;
     }
 }
Example #2
0
 public void SetContent(IEnumerable <KeyValuePair <string, string> > lines)
 {
     _sectionLines       = new List <string>(lines.Select(p => p.Key + " = " + p.Value));
     _properties         = null;
     _nestedPropertySets = null;
 }
Example #3
0
 public void Clear()
 {
     _properties         = null;
     _nestedPropertySets = null;
     _sectionLines       = null;
 }