void NotifyFileRemovedFromProject(ProjectFile file) { file.SetProject(null); if (DependencyResolutionEnabled) { if (unresolvedDeps.Contains(file)) { unresolvedDeps.Remove(file); } foreach (ProjectFile f in file.DependentChildren) { f.DependsOnFile = null; if (!string.IsNullOrEmpty(f.DependsOn)) { unresolvedDeps.Add(f); } } file.DependsOnFile = null; } SetDirty(); NotifyModified("Files"); OnFileRemovedFromProject(new ProjectFileEventArgs(this, file)); }
void NotifyFileAddedToProject(ProjectFile file) { if (file.Project != null) { throw new InvalidOperationException("ProjectFile already belongs to a project"); } file.SetProject(this); ResolveDependencies(file); SetDirty(); NotifyModified("Files"); OnFileAddedToProject(new ProjectFileEventArgs(this, file)); }
void NotifyFileAddedToProject (ProjectFile file) { if (file.Project != null) throw new InvalidOperationException ("ProjectFile already belongs to a project"); file.SetProject (this); ResolveDependencies (file); SetDirty (); NotifyModified ("Files"); OnFileAddedToProject (new ProjectFileEventArgs (this, file)); }
void NotifyFileRemovedFromProject (ProjectFile file) { file.SetProject (null); if (DependencyResolutionEnabled) { if (unresolvedDeps.Contains (file)) unresolvedDeps.Remove (file); foreach (ProjectFile f in file.DependentChildren) { f.DependsOnFile = null; if (!string.IsNullOrEmpty (f.DependsOn)) unresolvedDeps.Add (f); } file.DependsOnFile = null; } SetDirty (); NotifyModified ("Files"); OnFileRemovedFromProject (new ProjectFileEventArgs (this, file)); }