You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary>/// Same as DocumentEditor.ReplaceNode but nicer types./// </summary>/// <typeparam name="T">The type of the node.</typeparam>/// <param name="editor">The <see cref="DocumentEditor"/>.</param>/// <param name="node">The <see cref="SyntaxNode"/>.</param>/// <param name="replacement">The replacement factory.</param>/// <returns>The <see cref="DocumentEditor"/> that was passed in.</returns>publicstaticDocumentEditorReplaceNode<T>(thisDocumentEditoreditor,Tnode,Func<T,SyntaxNode>replacement)whereT:SyntaxNode{if(editorisnull){thrownewArgumentNullException(nameof(editor));}if(nodeisnull){thrownewArgumentNullException(nameof(node));}if(replacementisnull){thrownewArgumentNullException(nameof(replacement));}editor.ReplaceNode(node,(x,_)=>replacement((T)x));returneditor;}
Activity