コード例 #1
0
ファイル: Solution.cs プロジェクト: sushantjha8/roslyn
        /// <summary>
        /// Create a new solution instance with the project specified updated to include
        /// the specified project reference.
        /// </summary>
        public Solution AddProjectReference(ProjectId projectId, ProjectReference projectReference)
        {
            var newState = _state.AddProjectReferences(projectId, SpecializedCollections.SingletonEnumerable(projectReference));

            if (newState == _state)
            {
                return(this);
            }

            return(new Solution(newState));
        }
コード例 #2
0
        /// <summary>
        /// Create a new solution instance with the project specified updated to include
        /// the specified project references.
        /// </summary>
        public Solution AddProjectReferences(ProjectId projectId, IEnumerable <ProjectReference> projectReferences)
        {
            var newState = _state.AddProjectReferences(projectId, projectReferences);

            if (newState == _state)
            {
                return(this);
            }

            return(new Solution(newState));
        }