public bool ParseNextLine(string line) { if (sectionDefinition != null && LastProcessingStatus == State.InProgress) { if (line == sectionEndTag) { LastProcessingStatus = State.Succeeded; LastSuccessfullyProcessedSection = sectionDefinition; sectionDefinition = null; return(false); } KeyValuePair <string, string> result; if (LineParserHelper.TryParseKeyValuePair(line, out result)) { sectionDefinition.Properties[result.Key] = result.Value; return(true); } LastProcessingStatus = State.Failed; } sectionDefinition = null; return(false); }
public static Dictionary <string, SectionDefinition> CreateGlobal(IEnumerable <ProjectDefinition> projects) { SectionDefinition solutionConfigurationPlatformSection = CreateGlobalSection("preSolution", ("Debug|Any CPU", "Debug|Any CPU"), ("Release|Any CPU", "Release|Any CPU")); return(new Dictionary <string, SectionDefinition> {
public bool TryParseFirstLine(string line) { KeyValuePair <string, string> result; if (!line.StartsWith(sectionBeginTag) || !LineParserHelper.TryParseSectionLine(line, out result)) { return(false); } sectionDefinition = new SectionDefinition(result.Key, result.Value); LastProcessingStatus = State.InProgress; return(true); }
public void StartSection(string sectionId, string initializeType) { InnerProjectSections[sectionId] = new SectionDefinition(sectionId, initializeType); }
public void AddGlobalSection(SectionDefinition globalSection) { solutionFile.Global.Add(globalSection); }