Example #1
0
 private void BuildEvents_ProjectConfigurationChanged(Community.VisualStudio.Toolkit.Project prj)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     if (!prj.IsXSharp())
     {
         return;
     }
     foreach (var project in XSharpProjectNode.AllProjects)
     {
         if (string.Compare(project.Url, prj?.FullPath, true) == 0)
         {
             project.CreateProjectOptions();
         }
     }
 }
 private void SolutionEvents_OnAfterOpenProject(Community.VisualStudio.Toolkit.Project project)
 {
     XSolution.WriteOutputMessage("SolutionEvents_OnAfterOpenProject " + project.FullPath ?? "(none)");
     //if (project.IsXSharp())
     //{
     //var xProject = XSolution.FindProject(project.FullPath);
     //if (xProject != null)
     //{
     //    addProjectFiles(xProject, project);
     //    if (XSolution.IsOpen)
     //    {
     //        ModelWalker.AddProject(xProject);
     //        ModelWalker.Walk();
     //    }
     //}
     //}
 }
Example #3
0
        internal async Task <PhysicalFile> WriteFileAsync(string content, string path, Project project)
        {
            using (var sw = new StreamWriter(path))
            {
                await sw.WriteAsync(content);
            }

            var file = await PhysicalFile.FromFileAsync(path);

            if (file == null)
            {
                file = (await project.AddExistingFilesAsync(path)).Single();
            }

            return(file);
        }
 private void SolutionEvents_OnAfterOpenProject(Community.VisualStudio.Toolkit.Project obj)
 {
     Logger.SingleLine();
     Logger.Information("Opened project: " + obj?.FullPath ?? "");
     Logger.SingleLine();
 }
 private void SolutionEvents_OnBeforeCloseProject(Community.VisualStudio.Toolkit.Project obj)
 {
     Logger.SingleLine();
     Logger.Information("Closing project: " + obj?.FullPath ?? "");
     Logger.SingleLine();
 }