/// <summary> /// Creates a new solution instance with the document specified updated to have the new name. /// </summary> public Solution WithDocumentName(DocumentId documentId, string name) { var newState = _state.WithDocumentName(documentId, name); if (newState == _state) { return(this); } return(new Solution(newState)); }