Example #1
0
        /// <summary>
        /// Creates a new solution instance with the document specified updated to have a syntax tree
        /// rooted by the specified syntax node.
        /// </summary>
        public Solution WithDocumentSyntaxRoot(DocumentId documentId, SyntaxNode root, PreservationMode mode = PreservationMode.PreserveValue)
        {
            var newState = _state.WithDocumentSyntaxRoot(documentId, root, mode);

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

            return(new Solution(newState));
        }