static void Main(string[] args) { try { //Run as Orxe2Setup.exe C:\Vicky\Connexions 201907 44300 T1 //var folderBasePath = args[0].Trim(); //var branchNumber = args[1].Trim(); //var portNumber = args[2].Trim(); //var environmentToPoint = args[3] != null && args[3] != "" ? args[3].Trim() : "T1"; var folderBasePath = @"<FOLDERSBASEPATH>"; var branchNumber = "<BRANCHNUMBER ex: 201909>"; var portNumber = "<SSLPORTNUMBER ex: 44312 >"; var environmentToPoint = "<Environment to point ex:T3>"; #region Grunt.Target File Maipulation //Handling file write for Grunt.targets Console.WriteLine(":::::: Rewriting Grunt.targets File ::::::"); FileHandlingOfGruntTargets fileHandlingOfGruntTargets = new FileHandlingOfGruntTargets(folderBasePath, branchNumber); fileHandlingOfGruntTargets.HandleFile(); Console.WriteLine("\n"); #endregion #region Web.Config File Maipulation //Handling file write for Web.config Console.WriteLine(":::::: Rewriting Web.config File ::::::"); FileHandlingOfWebConfig fileHandlingOfWebConfig = new FileHandlingOfWebConfig(folderBasePath, branchNumber, environmentToPoint); fileHandlingOfWebConfig.HandleFile(); Console.WriteLine("\n"); #endregion #region SSO Web.Config File Maipulation //Handling file write for SSO Web.config Console.WriteLine(":::::: Rewriting SSO Web.config File ::::::"); FileHandlingOfSSOWebConfig fileHandlingOfSSOWebConfig = new FileHandlingOfSSOWebConfig(folderBasePath, portNumber); fileHandlingOfSSOWebConfig.HandleFile(); #endregion } catch (Exception ex) { Console.WriteLine("Some Error Occurred. Details - " + ex.Message); Console.WriteLine("STACK TRACE - " + ex.StackTrace); Console.Read(); } }
static void Main(string[] args) { try { //Run as Orxe2Setup.exe C:\Saurabh\CLTS\AppDev 202001 44381 T1 var folderBasePath = args[0].Trim(); var branchNumber = args[1].Trim(); var portNumber = args[2].Trim(); var environmentToPoint = args[3] != null && args[3] != "" ? args[3].Trim() : "T1"; //For Development Purpose //var folderBasePath = @"C:\Saurabh\CLTS\AppDev"; //var branchNumber = "202001"; //var portNumber = "44381"; //var environmentToPoint = "T1"; #region Grunt.Target File Maipulation //Handling file write for Grunt.targets Console.WriteLine(":::::: Rewriting Grunt.targets File ::::::"); FileHandlingOfGruntTargets fileHandlingOfGruntTargets = new FileHandlingOfGruntTargets(folderBasePath, branchNumber); fileHandlingOfGruntTargets.HandleFile(); Console.WriteLine("\n"); #endregion #region Web.Config File Maipulation //Handling file write for Web.config Console.WriteLine(":::::: Rewriting Web.config File ::::::"); FileHandlingOfWebConfig fileHandlingOfWebConfig = new FileHandlingOfWebConfig(folderBasePath, branchNumber, environmentToPoint); fileHandlingOfWebConfig.HandleFile(); Console.WriteLine("\n"); #endregion #region SSO Web.Config File Maipulation //Handling file write for SSO Web.config Console.WriteLine(":::::: Rewriting SSO Web.config File ::::::"); FileHandlingOfSSOWebConfig fileHandlingOfSSOWebConfig = new FileHandlingOfSSOWebConfig(folderBasePath, portNumber); fileHandlingOfSSOWebConfig.HandleFile(); Console.WriteLine("\n"); #endregion #region GruntFile.JS File Maipulation //Handling file write for GruntFile.js Console.WriteLine(":::::: Rewriting GruntFile.js Web.config File ::::::"); FileHandlingOfGruntFileJs fileHandlingOfGruntFileJs = new FileHandlingOfGruntFileJs(folderBasePath, branchNumber); fileHandlingOfGruntFileJs.HandleFile(); Console.WriteLine("\n"); #endregion #region Replacing Portal.CSPROJ.USER file //Handling file write for Portal.csproj.user Console.WriteLine(":::::: Adding Portal.csproj.user File ::::::"); FileHandlingPortalCsproj fileHandlingOfCsprojFile = new FileHandlingPortalCsproj(folderBasePath, branchNumber); fileHandlingOfCsprojFile.HandleFile(); Console.WriteLine("\n"); #endregion Console.WriteLine("Successfully Handled All File Handling"); } catch (Exception ex) { Console.WriteLine("Some Error Occurred Please Try Again"); Console.WriteLine("Details of Error - " + ex.Message); Console.WriteLine("STACK TRACE - " + ex.StackTrace); Console.Read(); } }