public void NGit_O2Platform()
        {
            var repoToClone = "UnitTests_TestRepo";
            var pathToRepo  = tempFolder.pathCombine(repoToClone);

            Assert.IsTrue(tempFolder.dirExists());
            Assert.IsEmpty(tempFolder.dirs());
            Assert.IsFalse(pathToRepo.dirExists());
            Assert.IsFalse(pathToRepo.isGitRepository());

            API_NGit_O2Platform ngit_O2 = null;

            Action checkRepo =
                () => {
                Assert.IsNotNull(ngit_O2);
                Assert.IsNull(ngit_O2.Git);
                Assert.IsNull(ngit_O2.Repository);

                ngit_O2.cloneOrPull(repoToClone);

                Assert.IsTrue(pathToRepo.dirExists());
                Assert.IsTrue(pathToRepo.isGitRepository());

                ngit_O2.open(pathToRepo);

                Assert.IsNotNull(ngit_O2.Git);
                Assert.IsNotNull(ngit_O2.Repository);

                ngit_O2.nGit().close();
            };

            //Test Clone
            ngit_O2 = new API_NGit_O2Platform(tempFolder);
            checkRepo();

            //Test Open
            ngit_O2 = new API_NGit_O2Platform(tempFolder);
            checkRepo();

            var result = ngit_O2.delete_Repository_And_Files();

            Assert.IsTrue(result);

            tempFolder.delete_Folder();
            Assert.IsFalse(tempFolder.dirExists());
        }
        public static void buildGui()
        {
            var topPanel = O2Gui.open <Panel>("Util - Sync and Compile O2 Repositories", 1000, 600);

            //var topPanel = panel.clear().add_Panel();

            topPanel.insert_LogViewer();
            var msBuildGui = topPanel.add_MSBuild_Gui();

            var nGit_O2 = new API_NGit_O2Platform();

            //for the O2 installer:
            nGit_O2.LocalGitRepositories = PublicDI.config.CurrentExecutableDirectory.pathCombine("..").fullPath();                  // by default it is one  above the current one

            gitSync =
                () => {
                nGit_O2.cloneOrPull("O2.FluentSharp")
                .cloneOrPull("O2.Platform.Projects")
                .cloneOrPull("O2.Platform.Scripts");
                "gitSync completed".info();
            };

            compileProjects =
                () => {
                msBuildGui.buildProjects(nGit_O2.LocalGitRepositories, startO2);
            };
            startO2 =
                () => {
                nGit_O2.LocalGitRepositories.pathCombine(@"O2.Platform.Projects\binaries\O2 Platform.exe").startProcess();
            };
            //msBuildGui.tableList.title("O2 Platform - MSBuild results");

            msBuildGui.topPanel.insert_Above(40, "Actions")
            .add_Link("Git Sync", () => gitSync())
            .append_Link("Compile Projects", () => compileProjects())
            .append_Link("Open Target Folder in Explorer", () => nGit_O2.LocalGitRepositories.startProcess())
            .append_Link("Start 'O2 Platform.exe'", () => startO2())
            .append_Label("Target Folder:").autoSize().top(2)
            .append_TextBox(nGit_O2.LocalGitRepositories).align_Right()
            .onTextChange((text) => nGit_O2.LocalGitRepositories = text);
        }
		public static void buildGui()
		{
			var topPanel = O2Gui.open<Panel>("Util - Sync and Compile O2 Repositories",1000,600); 
			//var topPanel = panel.clear().add_Panel();  
			 
			topPanel.insert_LogViewer(); 
			var msBuildGui = topPanel.add_MSBuild_Gui();   
			
			var nGit_O2 = new API_NGit_O2Platform();			
			
			//for the O2 installer:			
			nGit_O2.LocalGitRepositories 	  = PublicDI.config.CurrentExecutableDirectory.pathCombine("..").fullPath(); // by default it is one  above the current one
			
			gitSync = 
				()=>{
						nGit_O2	.cloneOrPull("O2.FluentSharp")
							  	.cloneOrPull("O2.Platform.Projects")
							   	.cloneOrPull("O2.Platform.Scripts"); 
						"gitSync completed".info();
					};
			
			compileProjects = 
				()=>{
						msBuildGui.buildProjects(nGit_O2.LocalGitRepositories, startO2);
					};
			startO2 =
				()=>{
						nGit_O2.LocalGitRepositories.pathCombine(@"O2.Platform.Projects\binaries\O2 Platform.exe").startProcess();
					};
			//msBuildGui.tableList.title("O2 Platform - MSBuild results");   
			
			msBuildGui.topPanel.insert_Above(40,"Actions")
					  .add_Link	 	 ("Git Sync", 		 ()=> gitSync())
					  .append_Link	 ("Compile Projects", ()=> compileProjects())		  
					  .append_Link	 ("Open Target Folder in Explorer", ()=> nGit_O2.LocalGitRepositories.startProcess())
					  .append_Link	 ("Start 'O2 Platform.exe'", ()=> startO2())
					  .append_Label  ("Target Folder:").autoSize().top(2)
					  .append_TextBox(nGit_O2.LocalGitRepositories).align_Right()
					  											   .onTextChange((text)=> nGit_O2.LocalGitRepositories = text);

		}