Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change nullability of public IXmlNamespaceResolver parameters where appropriate #41079

Merged
merged 1 commit into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ public override object ReadContentAsObject()
return base.ReadContentAsObject();
}

public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver)
public override object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver)
{
int origPos = _pos;
try
Expand Down Expand Up @@ -4229,7 +4229,7 @@ private XmlValueConverter GetValueConverter(XmlTypeCode typeCode)
return xsst.ValueConverter;
}

private object ValueAs(BinXmlToken token, Type returnType, IXmlNamespaceResolver namespaceResolver)
private object ValueAs(BinXmlToken token, Type returnType, IXmlNamespaceResolver? namespaceResolver)
{
object value;
CheckValueTokenBounds();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public override string ReadContentAsString()
return _coreReader.ReadContentAsString();
}

public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver)
public override object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver)
{
CheckAsync();
return _coreReader.ReadContentAs(returnType, namespaceResolver);
Expand Down Expand Up @@ -801,7 +801,7 @@ public override Task<string> ReadContentAsStringAsync()
return task;
}

public override Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
public override Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver)
{
CheckAsync();
var task = _coreReader.ReadContentAsAsync(returnType, namespaceResolver);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public virtual string ReadContentAsString()

// Concatenates values of textual nodes of the current content, ignoring comments and PIs, expanding entity references,
// and converts the content to the requested type. Stops at start tags and end tags.
public virtual object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver)
public virtual object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver)
{
if (!CanReadContentAs())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public virtual Task<string> ReadContentAsStringAsync()

// Concatenates values of textual nodes of the current content, ignoring comments and PIs, expanding entity references,
// and converts the content to the requested type. Stops at start tags and end tags.
public virtual async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
public virtual async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver)
{
if (!CanReadContentAs())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ public override string ReadContentAsString()
}
}

public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver)
public override object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver)
{
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public override async Task<string> ReadContentAsStringAsync()
}
}

public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver)
{
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ public override string ReadContentAsString()
}
}

public override object ReadContentAs(Type returnType, IXmlNamespaceResolver namespaceResolver)
public override object ReadContentAs(Type returnType, IXmlNamespaceResolver? namespaceResolver)
{
if (!CanReadContentAs(this.NodeType))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public override async Task<string> ReadContentAsStringAsync()
}
}

public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver)
public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver)
{
if (!CanReadContentAs(this.NodeType))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ internal XPathExpression() { }

public abstract void SetContext(XmlNamespaceManager nsManager);

public abstract void SetContext(IXmlNamespaceResolver nsResolver);
public abstract void SetContext(IXmlNamespaceResolver? nsResolver);

public abstract XPathResultType ReturnType { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ public virtual XPathNodeIterator Select(string xpath)
return this.Select(XPathExpression.Compile(xpath));
}

public virtual XPathNodeIterator Select(string xpath, IXmlNamespaceResolver resolver)
public virtual XPathNodeIterator Select(string xpath, IXmlNamespaceResolver? resolver)
{
return this.Select(XPathExpression.Compile(xpath, resolver));
}
Expand All @@ -1206,7 +1206,7 @@ public virtual object Evaluate(string xpath)
return Evaluate(XPathExpression.Compile(xpath), null);
}

public virtual object Evaluate(string xpath, IXmlNamespaceResolver resolver)
public virtual object Evaluate(string xpath, IXmlNamespaceResolver? resolver)
{
return this.Evaluate(XPathExpression.Compile(xpath, resolver));
}
Expand Down