public override void AddSectionToInf(Inf inf, InfSection section) { var sourceDisksFiles = new SourceDisksFiles(section, Logger); inf.SourceDisksFiles = sourceDisksFiles; base.AddSectionToInf(inf, sourceDisksFiles); }
private IInfSectionParser GetSectionHandler(InfSection section) { IInfSectionParser parser; string key; if (section.Section.HasType) key = section.Section.Type; else key = section.Section.Name; if (registeredInfSectionParsers.ContainsKey(key)) parser = registeredInfSectionParsers[key]; else parser = new GenericSectionParser(); Logger.Debug("Handling INF Section [" + section.Section + "] With Section Parser '" + parser.GetType().Name + "'"); return parser; }
private IList<InfSection> SplitInfContents(string contents) { var regEx = new Regex(@"\[(?<section>.*?)\]", RegexOptions.Multiline); string[] splitContents = regEx.Split(contents); IList<InfSection> infSections = new List<InfSection>(); for (int i = 1; i <= splitContents.Length-1; i += 2) { string section = splitContents[i]; string content = splitContents[i + 1]; Logger.Debug("Found INF Section: " + section); var infSection = new InfSection(section, content); infSections.Add(infSection); } return infSections; }
public virtual void AddSectionToInf(Inf inf, InfSection section) { inf.AddSection(section); }
public void AddSection(InfSection section) { sections.Add(section.Section, section); }
public SourceDisksNames(InfSection section) : base(section.Section, section.Content) { ParseSourceDisks(); }
public SourceDisksFiles(InfSection section, ILogger logger) : base(section.Section, section.Content) { Logger = logger; SourceFiles = ParseFiles(Content); }
public FileSection(InfSection section) : base(section.Section, section.Content) { }