Make this C# code more DRY
I propose this:

internal ILink Parse(Uri endpoint) {
    ...
    foreach (LinkXPath source in sources) {
        UpdateIfNecessary(document, ref result.Title, () =&gt; GetFragment(document, source.Title));
        UpdateIfNecessary(document, ref result.Description, () =&gt; GetFragment(document, source.Title));
        UpdateIfNecessary(document, ref result.Article, () =&gt; GetFragment(document, source.Article));
    }
    ...
}

private static void UpdateIfNecessary(Document document, ref string field, Func&lt;string&gt; getValue) {
    if(!string.IsNullOrEmpty(field)) {
        return;
    }
    field = getValue();
}


UpdateIfNecessary receives a lambda so it only evaluates the new value if necessary.

The field is passed by reference, so any change to the parameter in the method is reflected in the underlying argument variable in the calling method.