Skip to content

Commit

Permalink
Fix TestXmlReferenceResolver semantics for missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Mar 8, 2021
1 parent 425dcad commit f971df1
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public override int GetHashCode()
return RuntimeHelpers.GetHashCode(this);
}

public override Stream? OpenRead(string resolvedPath)
public override Stream OpenRead(string resolvedPath)
{
if (!XmlReferences.TryGetValue(resolvedPath, out var content))
{
Expand All @@ -34,8 +34,13 @@ public override int GetHashCode()
return new MemoryStream(Encoding.UTF8.GetBytes(content));
}

public override string ResolveReference(string path, string baseFilePath)
public override string? ResolveReference(string path, string baseFilePath)
{
if (!XmlReferences.ContainsKey(path))
{
return null;
}

return path;
}
}
Expand Down

0 comments on commit f971df1

Please sign in to comment.