SetProject() private method

private SetProject ( Project project ) : void
project Project
return void
Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
		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));
		}
Esempio n. 4
0
		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));
		}