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

Update Microsoft.Net.Compilers.Toolset #31403

Merged
merged 4 commits into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
</PropertyGroup>
<PropertyGroup Label="Manual">
<!-- Packages from dotnet/roslyn -->
<MicrosoftNetCompilersToolsetVersion>3.8.0-5.20519.18</MicrosoftNetCompilersToolsetVersion>
<MicrosoftNetCompilersToolsetVersion>3.10.0-1.final</MicrosoftNetCompilersToolsetVersion>
<!-- DiagnosticAdapter package pinned temporarily until migrated/deprecated -->
<MicrosoftExtensionsDiagnosticAdapterVersion>5.0.0-preview.4.20180.4</MicrosoftExtensionsDiagnosticAdapterVersion>
<!-- Build tool dependencies -->
Expand Down
6 changes: 3 additions & 3 deletions src/Hosting/TestHost/src/TestWebSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public override async Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byt
ThrowIfInputClosed();
ValidateSegment(buffer);
// TODO: InvalidOperationException if any receives are currently in progress.

Message? receiveMessage = _receiveMessage;
_receiveMessage = null;
if (receiveMessage == null)
Expand Down Expand Up @@ -148,7 +148,7 @@ public override async Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byt
Array.Copy(receiveMessage.Buffer.Array!, receiveMessage.Buffer.Offset, buffer.Array!, buffer.Offset, count);
if (!endOfMessage)
{
receiveMessage.Buffer = new ArraySegment<byte>(receiveMessage.Buffer.Array, receiveMessage.Buffer.Offset + count, receiveMessage.Buffer.Count - count);
receiveMessage.Buffer = new ArraySegment<byte>(receiveMessage.Buffer.Array!, receiveMessage.Buffer.Offset + count, receiveMessage.Buffer.Count - count);
_receiveMessage = receiveMessage;
}
endOfMessage = endOfMessage && receiveMessage.EndOfMessage;
Expand Down Expand Up @@ -257,7 +257,7 @@ private class ReceiverSenderBuffer
private bool _disposed;
private readonly SemaphoreSlim _sem;
private readonly Queue<Message> _messageQueue;

public ReceiverSenderBuffer()
{
_sem = new SemaphoreSlim(0);
Expand Down
3 changes: 1 addition & 2 deletions src/Http/Headers/src/BaseHeaderParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public sealed override bool TryParseValue(StringSegment value, ref int index, ou
return SupportsMultipleValues;
}

T result;
var length = GetParsedValueLength(value, current, out result);
var length = GetParsedValueLength(value, current, out var result);

if (length == 0)
{
Expand Down
11 changes: 4 additions & 7 deletions src/Http/Headers/src/HttpHeaderParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public bool SupportsMultipleValues

// If a parser returns 'null', it means there was no value, but that's valid (e.g. "Accept: "). The caller
// can ignore the value.
T result;
if (!TryParseValue(value, ref index, out result))
if (!TryParseValue(value, ref index, out var result))
{
throw new FormatException(string.Format(CultureInfo.InvariantCulture,
"The header contains invalid values at index {0}: '{1}'", index, value.Value ?? "<null>"));
Expand Down Expand Up @@ -75,15 +74,14 @@ protected virtual bool TryParseValues(IList<string>? values, bool strict, [NotNu

while (!string.IsNullOrEmpty(value) && index < value.Length)
{
T output;
if (TryParseValue(value, ref index, out output))
if (TryParseValue(value, ref index, out var output))
{
// The entry may not contain an actual value, like " , "
if (output != null)
{
if (results == null)
{
results = new List<T>(); // Allocate it only when used
results = new List<T>(); // Allocate it only when used
}
results.Add(output);
}
Expand Down Expand Up @@ -133,8 +131,7 @@ protected virtual IList<T> ParseValues(IList<string>? values, bool strict)

while (!string.IsNullOrEmpty(value) && index < value.Length)
{
T output;
if (TryParseValue(value, ref index, out output))
if (TryParseValue(value, ref index, out var output))
{
// The entry may not contain an actual value, like " , "
if (output != null)
Expand Down