Beispiel #1
0
        public void Read(string file, IDirectiveRunner runner)
        {
            var document = new XmlDocument();
            document.Load(_solution.Directory.AppendPath(file));

            Read(document, runner);
        }
 public DirectiveProcessor(IFileSystem fileSystem, ISolution solution, IDirectiveRunner runner, IDirectiveParser parser)
 {
     _fileSystem = fileSystem;
     _solution = solution;
     _runner = runner;
     _parser = parser;
 }
Beispiel #3
0
 public DirectiveProcessor(IFileSystem fileSystem, ISolution solution, IDirectiveRunner runner, IDirectiveParser parser)
 {
     _fileSystem = fileSystem;
     _solution   = solution;
     _runner     = runner;
     _parser     = parser;
 }
        public void SetUp()
        {
            theRoot = new XmlDocument().WithRoot("directives");

            theRunner = MockRepository.GenerateMock<IDirectiveRunner>();

        }
        public void Read(string file, IDirectiveRunner runner)
        {
            var document = new XmlDocument();

            document.Load(_solution.Directory.AppendPath(file));

            Read(document, runner);
        }
Beispiel #6
0
        public static void Read(XmlDocument document, IDirectiveRunner runner)
        {
            foreach (XmlElement element in document.DocumentElement.SelectNodes("runner"))
            {
                var file = element.GetAttribute("file");
                var alias = element.HasAttribute("alias")
                                ? element.GetAttribute("alias") : Path.GetFileNameWithoutExtension(file);

                runner.CreateRunner(file, alias);
            }

            foreach (XmlElement element in document.DocumentElement.SelectNodes("copy"))
            {
                var file = element.GetAttribute("file");
                var location = element.HasAttribute("location") ? element.GetAttribute("location") : null;
                var nuget = element.HasAttribute("nuget") ? element.GetAttribute("nuget") : null;

                runner.Copy(file, location, nuget);
            }
        }
        public static void Read(XmlDocument document, IDirectiveRunner runner)
        {
            foreach (XmlElement element in document.DocumentElement.SelectNodes("runner"))
            {
                var file  = element.GetAttribute("file");
                var alias = element.HasAttribute("alias")
                                ? element.GetAttribute("alias") : Path.GetFileNameWithoutExtension(file);

                runner.CreateRunner(file, alias);
            }

            foreach (XmlElement element in document.DocumentElement.SelectNodes("copy"))
            {
                var file     = element.GetAttribute("file");
                var location = element.HasAttribute("location") ? element.GetAttribute("location") : null;
                var nuget    = element.HasAttribute("nuget") ? element.GetAttribute("nuget") : null;

                runner.Copy(file, location, nuget);
            }
        }
        public void SetUp()
        {
            theRoot = new XmlDocument().WithRoot("directives");

            theRunner = MockRepository.GenerateMock <IDirectiveRunner>();
        }