Exemplo n.º 1
0
 internal void SaveCLIOptions(SSoTmeCLIHandler sSoTmeCLIHandler)
 {
     this.CLIAccount           = sSoTmeCLIHandler.account;
     this.CLIInput             = sSoTmeCLIHandler.input;
     this.CLIInputFileContents = sSoTmeCLIHandler.inputFileContents;
     this.CLIInputFileSetXml   = sSoTmeCLIHandler.inputFileSetXml;
     this.CLIOutput            = sSoTmeCLIHandler.output;
     this.CLIParams            = sSoTmeCLIHandler.parameters;
     this.CLITranspiler        = sSoTmeCLIHandler.transpiler;
     this.CLIWaitTimeout       = sSoTmeCLIHandler.waitTimeout;
 }
Exemplo n.º 2
0
        static int Main(string[] args)
        {
            // Thread.Sleep(20000);
            var returnValue = -1;
            var handler     = SSoTmeCLIHandler.CreateHandler(args);

            if (!handler.SuppressTranspile)
            {
                returnValue = handler.TranspileProject();
            }

            if (returnValue != 0)
            {
                Console.WriteLine("\n\nPress any key to continue.");
                Console.ReadKey();
            }
            return(returnValue);
        }
Exemplo n.º 3
0
        internal void Rebuild(SSoTmeProject project)
        {
            Console.WriteLine("\n\nRE-transpiling: " + this.RelativePath + ": " + this.Name);
            Console.WriteLine("CommandLine:> ssotme {0}", this.CommandLine);
            var transpileRootDI = new DirectoryInfo(Path.Combine(project.RootPath, this.RelativePath.Trim("\\/".ToCharArray())));

            if (!transpileRootDI.Exists)
            {
                transpileRootDI.Create();
            }

            Environment.CurrentDirectory = transpileRootDI.FullName;
            var cliHandler = SSoTmeCLIHandler.CreateHandler(this.CommandLine);
            var cliResult  = cliHandler.TranspileProject(this);

            if (cliResult != 0)
            {
                throw new Exception("Error RE-Transpiling");
            }
        }
Exemplo n.º 4
0
        public void LoadInputAndOuputFiles(SSoTmeProject project, bool includeContents)
        {
            var cliHandler = SSoTmeCLIHandler.CreateHandler(this.CommandLine);

            if (!includeContents)
            {
                foreach (var fsf in cliHandler.FileSet.FileSetFiles)
                {
                    fsf.ClearContents();
                }
                cliHandler.inputFileSetXml = String.Empty;
                cliHandler.SSoTmeProject   = null;
            }

            if (!ReferenceEquals(this.MatchedTranspiler, null))
            {
                cliHandler.SSoTmeProject = project;
                cliHandler.LoadOutputFiles(this.MatchedTranspiler.LowerHyphenName, this.GetProjectRelativePath(project), includeContents);
                cliHandler.SSoTmeProject = null;
            }
            this.CLIHandler = cliHandler;
        }