Example #1
0
 internal Microsoft.Expression.Extensibility.Project.IProject GetProject(Microsoft.Expression.Project.IProject project)
 {
     if (project == null)
     {
         return(null);
     }
     Microsoft.Expression.Extensibility.Project.IProject project1 = null;
     if (!this.projectCache.TryGetValue(project, out project1))
     {
         project1 = new Microsoft.Expression.Extensibility.Project.Project(project);
         this.projectCache[project] = project1;
     }
     return(project1);
 }
Example #2
0
        public Microsoft.Expression.Extensibility.Project.IProjectItem AddItem(string documentItemPath, string itemType)
        {
            if (!this.IsValid)
            {
                return(null);
            }
            Microsoft.Expression.Project.IProject project = this.project;
            DocumentCreationInfo documentCreationInfo     = new DocumentCreationInfo()
            {
                SourcePath      = documentItemPath,
                CreationOptions = CreationOptions.None,
                BuildTaskInfo   = new BuildTaskInfo(itemType, null)
            };

            return(Microsoft.Expression.Extensibility.Project.ProjectItem.FromProjectItem(this, project.AddItem(documentCreationInfo)));
        }
Example #3
0
 public void OnProjectClosing(Microsoft.Expression.Project.IProject closingProject, bool removeFromCache)
 {
     foreach (Microsoft.Expression.Extensibility.Project.IProject value in this.projectCache.Values)
     {
         Microsoft.Expression.Extensibility.Project.Project project = (Microsoft.Expression.Extensibility.Project.Project)value;
         if (!project.InternalProject.Equals(closingProject))
         {
             continue;
         }
         project.Close();
         break;
     }
     if (removeFromCache)
     {
         this.projectCache.Remove(closingProject);
     }
 }
Example #4
0
 internal Project(Microsoft.Expression.Project.IProject project)
 {
     this.project = project;
 }
Example #5
0
 internal static Microsoft.Expression.Extensibility.Project.IProject FromProject(Microsoft.Expression.Project.IProject project)
 {
     return(new Microsoft.Expression.Extensibility.Project.Project(project));
 }
Example #6
0
 internal void Close()
 {
     this.project = null;
 }