AvalonStudio.Projects.Solution.AddProject C# (CSharp) Method

AddProject() public method

public AddProject ( IProject project ) : IProject
project IProject
return IProject
		public IProject AddProject(IProject project)
		{
			var currentProject = Projects.FirstOrDefault(p => p.Name == project.Name);

			if (currentProject != null) return currentProject;
			ProjectReferences.Add(CurrentDirectory.MakeRelativePath(project.Location));
			Projects.InsertSorted(project);
			currentProject = project;

			return currentProject;
		}