コード例 #1
0
        public static ScenarioDirectory Create(string scenario)
        {
            var name = Path.Combine(rootDirectory, scenario);

            FileSystem.EnsureDirectoryDeleted(name);
            FileSystem.EnsureDirectoryCreated(name);
            return(new ScenarioDirectory(name));
        }
コード例 #2
0
        private ScriptFile(string scenario, bool createWorkingDirectory)
        {
            File.Delete(this.path = Path.Combine(directory, this.name = string.Concat(scenario, ".csx")));
            File.Delete(this.log  = Path.Combine(directory, string.Concat(scenario, ".log")));

            if (createWorkingDirectory)
            {
                FileSystem.EnsureDirectoryDeleted(Path.Combine(directory, scenario));
                FileSystem.EnsureDirectoryCreated(Path.Combine(directory, scenario));
            }
        }
コード例 #3
0
        public static ScenarioDirectory Create(string scenario)
        {
            var name = Path.Combine(rootDirectory, scenario);

            if (name == null)
            {
                throw new Exception("Invalid directory");
            }
            Debug.WriteLine($"Scenarios Dir [{name.Length}]: {name}");
            FileSystem.EnsureDirectoryDeleted(name);
            FileSystem.EnsureDirectoryCreated(name);
            return(new ScenarioDirectory(name));
        }