public override void AddSectionToInf(Inf inf, InfSection section)
        {
            var sourceDisksFiles = new SourceDisksFiles(section, Logger);
            inf.SourceDisksFiles = sourceDisksFiles;

            base.AddSectionToInf(inf, sourceDisksFiles);
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
 public virtual void AddSectionToInf(Inf inf, InfSection section)
 {
     inf.AddSection(section);
 }
Ejemplo n.º 5
0
 public void AddSection(InfSection section)
 {
     sections.Add(section.Section, section);
 }
Ejemplo n.º 6
0
 public SourceDisksNames(InfSection section)
     : base(section.Section, section.Content)
 {
     ParseSourceDisks();
 }
Ejemplo n.º 7
0
		public SourceDisksFiles(InfSection section, ILogger logger)
			: base(section.Section, section.Content)
		{
			Logger = logger;
			SourceFiles = ParseFiles(Content);
		}
Ejemplo n.º 8
0
 public FileSection(InfSection section)
     : base(section.Section, section.Content)
 {
 }