コード例 #1
0
ファイル: Solution.cs プロジェクト: sushantjha8/roslyn
        /// <summary>
        /// Create a new <see cref="Solution"/> instance with the corresponding <see cref="Project"/>s updated to include
        /// the documents specified by <paramref name="documentInfos"/>.
        /// </summary>
        /// <returns>A new <see cref="Solution"/> with the documents added.</returns>
        public Solution AddDocuments(ImmutableArray <DocumentInfo> documentInfos)
        {
            var newState = _state.AddDocuments(documentInfos);

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

            return(new Solution(newState));
        }