Exemplo n.º 1
0
 internal static bool IsSame(ProjectTarget self, ProjectTarget other) {
     if (self == null) {
         return other == null;
     } else if (other != null) {
         return self.TargetProject == other.TargetProject;
     }
     return false;
 }
        private void ProfileProjectTarget(SessionNode session, ProjectTarget projectTarget, bool openReport) {
            var targetGuid = projectTarget.TargetProject;
            
            var dte = (EnvDTE.DTE)GetGlobalService(typeof(EnvDTE.DTE));
            EnvDTE.Project projectToProfile = null;
            foreach (EnvDTE.Project project in dte.Solution.Projects) {
                var kind = project.Kind;

                if (String.Equals(kind, NodejsProfilingPackage.NodeProjectGuid, StringComparison.OrdinalIgnoreCase)) {
                    var guid = project.Properties.Item("Guid").Value as string;

                    Guid guidVal;
                    if (Guid.TryParse(guid, out guidVal) && guidVal == projectTarget.TargetProject) {
                        projectToProfile = project;
                        break;
                    }
                }
            }

            if (projectToProfile != null) {
                var t = ProfileProject(session, projectToProfile, openReport);
            } else {
                MessageBox.Show("Project could not be found in current solution.", Resources.NodejsToolsForVS);
            }
        }
Exemplo n.º 3
0
 internal ProjectTarget Clone() {
     var res = new ProjectTarget();
     res.TargetProject = TargetProject;
     res.FriendlyName = FriendlyName;
     return res;
 }
 /// <summary>
 /// Create a ProjectTargetView with values from a ProjectTarget.
 /// </summary>
 public ProjectTargetView(ProjectTarget project) {
     _name = project.FriendlyName;
     _guid = project.TargetProject;
 }