SetProject() private method

private SetProject ( Project project ) : void
project Project
return void
Exemplo 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));
        }
Exemplo 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));
        }
Exemplo 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));
		}
Exemplo 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));
		}