Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -124,7 +124,7 @@ public bool GetProxyForUrl(
{
_autoDetectionFailed = false;
if (Interop.WinHttp.WinHttpGetProxyForUrl(
sessionHandle,
sessionHandle!,
uri.AbsoluteUri,
ref autoProxyOptions,
out proxyInfo))
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.Net.Http/ref/System.Net.Http.cs
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ public partial class TransferCodingHeaderValue : System.ICloneable
protected TransferCodingHeaderValue(System.Net.Http.Headers.TransferCodingHeaderValue source) { }
public TransferCodingHeaderValue(string value) { }
public System.Collections.Generic.ICollection<System.Net.Http.Headers.NameValueHeaderValue> Parameters { get { throw null; } }
public string? Value { get { throw null; } }
public string Value { get { throw null; } }
public override bool Equals(object? obj) { throw null; }
public override int GetHashCode() { throw null; }
public static System.Net.Http.Headers.TransferCodingHeaderValue Parse(string? input) { throw null; }
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.Net.Http/src/System.Net.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<NoWarn>$(NoWarn);0436;CS1573</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);HTTP_DLL</DefineConstants>
<TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public class TransferCodingHeaderValue : ICloneable
{
// Use ObjectCollection<T> since we may have multiple parameters with the same name.
private ObjectCollection<NameValueHeaderValue>? _parameters;
private string? _value;
private string _value = null!; // empty constructor only used internally and value set with non null

public string? Value
public string Value
{
get { return _value; }
}
Expand Down Expand Up @@ -154,7 +154,7 @@ public override bool Equals(object? obj)
public override int GetHashCode()
{
// The value string is case-insensitive.
return StringComparer.OrdinalIgnoreCase.GetHashCode(_value!) ^ NameValueHeaderValue.GetHashCode(_parameters);
return StringComparer.OrdinalIgnoreCase.GetHashCode(_value) ^ NameValueHeaderValue.GetHashCode(_parameters);
}

// Implement ICloneable explicitly to allow derived types to "override" the implementation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<StringResourcesPath>../../src/Resources/Strings.resx</StringResourcesPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-OSX</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS</TargetFrameworks>
<Nullable>annotations</Nullable>
</PropertyGroup>
<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
Expand Down