diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/AutomaticProgressReporter.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/AutomaticProgressReporter.cs
index 41659284027..006a2cbe62c 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/AutomaticProgressReporter.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/AutomaticProgressReporter.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -144,7 +142,7 @@ public static AutomaticProgressReporter Create(
cancellationToken);
}
- private void OnTimer(object state)
+ private void OnTimer(object? state)
{
try
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/Connection.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/Connection.cs
index 1b8e5d14e93..6049ea6988f 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/Connection.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/Connection.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -30,12 +28,12 @@ public sealed class Connection : IConnection
///
/// Occurs when an unrecoverable fault has been caught.
///
- public event EventHandler Faulted;
+ public event EventHandler? Faulted;
///
/// Occurs when a message has been received.
///
- public event EventHandler MessageReceived;
+ public event EventHandler? MessageReceived;
///
/// Gets the message dispatcher.
@@ -50,7 +48,7 @@ public sealed class Connection : IConnection
///
/// Gets the negotiated protocol version, or if not yet connected.
///
- public SemanticVersion ProtocolVersion { get; private set; }
+ public SemanticVersion? ProtocolVersion { get; private set; }
///
/// Instantiates a new instance of the class.
@@ -271,7 +269,7 @@ public async Task SendAsync(Message message, CancellationToken cancellationToken
/// Thrown if
/// is cancelled.
/// Thrown if not connected.
- public Task SendRequestAndReceiveResponseAsync(
+ public Task SendRequestAndReceiveResponseAsync(
MessageMethod method,
TOutbound payload,
CancellationToken cancellationToken)
@@ -294,7 +292,7 @@ public Task SendRequestAndReceiveResponseAsync(
return MessageDispatcher.DispatchRequestAsync(method, payload, cancellationToken);
}
- private void OnMessageReceived(object sender, MessageEventArgs e)
+ private void OnMessageReceived(object? sender, MessageEventArgs e)
{
if (_logger.IsEnabled)
{
@@ -304,7 +302,7 @@ private void OnMessageReceived(object sender, MessageEventArgs e)
MessageReceived?.Invoke(this, e);
}
- private void OnFaulted(object sender, ProtocolErrorEventArgs e)
+ private void OnFaulted(object? sender, ProtocolErrorEventArgs e)
{
Faulted?.Invoke(this, e);
}
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/IConnection.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/IConnection.cs
index 39eb9394acb..32f156c4dfa 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/IConnection.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/IConnection.cs
@@ -16,12 +16,12 @@ public interface IConnection : IDisposable
///
/// Occurs when an unrecoverable fault has been caught.
///
- event EventHandler Faulted;
+ event EventHandler? Faulted;
///
/// Occurs when a message has been received.
///
- event EventHandler MessageReceived;
+ event EventHandler? MessageReceived;
///
/// Gets the message dispatcher.
@@ -70,7 +70,7 @@ public interface IConnection : IDisposable
/// Thrown if
/// is cancelled.
/// Thrown if not connected.
- Task SendRequestAndReceiveResponseAsync(
+ Task SendRequestAndReceiveResponseAsync(
MessageMethod method,
TOutbound payload,
CancellationToken cancellationToken)
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/IMessageDispatcher.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/IMessageDispatcher.cs
index 2197445fe8e..764cc0ac559 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/IMessageDispatcher.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/IMessageDispatcher.cs
@@ -80,7 +80,7 @@ Message CreateMessage(MessageType type, MessageMethod method, TPayload
/// A task that represents the asynchronous operation.
/// The task result () returns a
/// from the target.
- Task DispatchRequestAsync(
+ Task DispatchRequestAsync(
MessageMethod method,
TOutbound payload,
CancellationToken cancellationToken)
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/IPlugin.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/IPlugin.cs
index 5b472d2125b..786a34fab33 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/IPlugin.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/IPlugin.cs
@@ -13,12 +13,12 @@ public interface IPlugin : IDisposable
///
/// Occurs before the plugin closes.
///
- event EventHandler BeforeClose;
+ event EventHandler? BeforeClose;
///
/// Occurs when the plugin has closed.
///
- event EventHandler Closed;
+ event EventHandler? Closed;
///
/// Gets the connection for the plugin.
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/IPluginManager.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/IPluginManager.cs
index 5c16e5635b5..cfa63908fea 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/IPluginManager.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/IPluginManager.cs
@@ -37,6 +37,6 @@ Task> CreatePluginsAsync(
///
///
/// A PluginCreationResult
- Task> TryGetSourceAgnosticPluginAsync(PluginDiscoveryResult pluginDiscoveryResult, OperationClaim requestedOperationClaim, CancellationToken cancellationToken);
+ Task> TryGetSourceAgnosticPluginAsync(PluginDiscoveryResult pluginDiscoveryResult, OperationClaim requestedOperationClaim, CancellationToken cancellationToken);
}
}
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/IReceiver.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/IReceiver.cs
index f9555b0d2ad..a692d3bef59 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/IReceiver.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/IReceiver.cs
@@ -13,12 +13,12 @@ public interface IReceiver : IDisposable
///
/// Occurs when an unrecoverable fault has been caught.
///
- event EventHandler Faulted;
+ event EventHandler? Faulted;
///
/// Occurs when a message has been received.
///
- event EventHandler MessageReceived;
+ event EventHandler? MessageReceived;
///
/// Closes the connection.
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/InboundRequestContext.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/InboundRequestContext.cs
index aa201c91c26..5cc97929c78 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/InboundRequestContext.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/InboundRequestContext.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Threading;
using System.Threading.Tasks;
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/JsonSerializationUtilities.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/JsonSerializationUtilities.cs
index f329f1d4e68..8922f5feb0e 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/JsonSerializationUtilities.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/JsonSerializationUtilities.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
#if NET5_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
@@ -48,14 +46,14 @@ static JsonSerializationUtilities()
///
/// The deserialization type.
/// JSON to deserialize.
- /// An instance of .
+ /// An instance of , or if the JSON represents a null value.
/// Thrown if
/// is either or an empty string.
#if NET5_0_OR_GREATER
[RequiresUnreferencedCode("Uses Newtonsoft.Json reflection-based deserialization.")]
[RequiresDynamicCode("Uses Newtonsoft.Json reflection-based deserialization.")]
#endif
- public static T Deserialize(string json)
+ public static T? Deserialize(string json)
where T : class
{
if (string.IsNullOrEmpty(json))
@@ -115,13 +113,13 @@ public static void Serialize(JsonWriter writer, object value)
///
/// The deserialization type.
/// A JSON object.
- /// An instance of .
+ /// An instance of , or if the JSON represents a null value.
/// Thrown if is .
#if NET5_0_OR_GREATER
[RequiresUnreferencedCode("Uses Newtonsoft.Json reflection-based deserialization.")]
[RequiresDynamicCode("Uses Newtonsoft.Json reflection-based deserialization.")]
#endif
- public static T ToObject(JObject jObject)
+ public static T? ToObject(JObject jObject)
{
if (jObject == null)
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/MessageDispatcher.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/MessageDispatcher.cs
index fb693ee5ff0..7037a4c53a6 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/MessageDispatcher.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/MessageDispatcher.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Concurrent;
#if NET5_0_OR_GREATER
@@ -20,7 +18,7 @@ namespace NuGet.Protocol.Plugins
///
public sealed class MessageDispatcher : IMessageDispatcher, IResponseHandler
{
- private IConnection _connection;
+ private IConnection? _connection;
private readonly IIdGenerator _idGenerator;
private bool _isClosed;
private bool _isDisposed;
@@ -279,7 +277,7 @@ public Task DispatchProgressAsync(Message request, Progress progress, Cancellati
/// from the target.
/// Thrown if
/// is cancelled.
- public Task DispatchRequestAsync(
+ public Task DispatchRequestAsync(
MessageMethod method,
TOutbound payload,
CancellationToken cancellationToken)
@@ -349,7 +347,7 @@ public Task DispatchResponseAsync(
/// Sets the connection to be used for dispatching messages.
///
/// A connection instance. Can be .
- public void SetConnection(IConnection connection)
+ public void SetConnection(IConnection? connection)
{
if (_connection == connection)
{
@@ -385,9 +383,7 @@ private async Task DispatchAsync(
CancellationToken cancellationToken)
where TOutgoing : class
{
- InboundRequestContext requestContext;
-
- if (!_inboundRequestContexts.TryGetValue(request.RequestId, out requestContext))
+ if (!_inboundRequestContexts.TryGetValue(request.RequestId, out _))
{
return;
}
@@ -459,7 +455,7 @@ private async Task DispatchWithExistingContextAsync(
await connection.SendAsync(response, cancellationToken);
}
- private async Task DispatchWithNewContextAsync(
+ private async Task DispatchWithNewContextAsync(
IConnection connection,
MessageType type,
MessageMethod method,
@@ -525,7 +521,7 @@ private async Task DispatchWithNewContextAsync(
return null;
}
- private void OnMessageReceived(object sender, MessageEventArgs e)
+ private void OnMessageReceived(object? sender, MessageEventArgs e)
{
// Capture _connection as SetConnection(...) could null it out later.
var connection = _connection;
@@ -535,9 +531,7 @@ private void OnMessageReceived(object sender, MessageEventArgs e)
return;
}
- OutboundRequestContext requestContext;
-
- if (_outboundRequestContexts.TryGetValue(e.Message.RequestId, out requestContext))
+ if (_outboundRequestContexts.TryGetValue(e.Message.RequestId, out var requestContext))
{
switch (e.Message.Type)
{
@@ -593,9 +587,7 @@ private void OnMessageReceived(object sender, MessageEventArgs e)
private void HandleInboundCancel(Message message)
{
- InboundRequestContext requestContext;
-
- if (_inboundRequestContexts.TryGetValue(message.RequestId, out requestContext))
+ if (_inboundRequestContexts.TryGetValue(message.RequestId, out var requestContext))
{
requestContext.Cancel();
}
@@ -614,14 +606,14 @@ private void HandleInboundFault(Message fault)
var payload = MessageUtilities.DeserializePayload(fault);
- throw new ProtocolException(payload.Message);
+ throw new ProtocolException(payload?.Message);
}
private void HandleInboundRequest(Message message)
{
var cancellationToken = CancellationToken.None;
- IRequestHandler requestHandler = null;
- ProtocolException exception = null;
+ IRequestHandler? requestHandler = null;
+ ProtocolException? exception = null;
try
{
@@ -643,15 +635,13 @@ private void HandleInboundRequest(Message message)
}
else
{
- requestContext.BeginFaultAsync(message, exception);
+ requestContext.BeginFaultAsync(message, exception!);
}
}
private IRequestHandler GetInboundRequestHandler(MessageMethod method)
{
- IRequestHandler handler;
-
- if (!RequestHandlers.TryGet(method, out handler))
+ if (!RequestHandlers.TryGet(method, out var handler))
{
throw new ProtocolException(
string.Format(CultureInfo.CurrentCulture, Strings.Plugin_RequestHandlerDoesNotExist, method));
@@ -662,9 +652,7 @@ private IRequestHandler GetInboundRequestHandler(MessageMethod method)
private OutboundRequestContext GetOutboundRequestContext(string requestId)
{
- OutboundRequestContext requestContext;
-
- if (!_outboundRequestContexts.TryGetValue(requestId, out requestContext))
+ if (!_outboundRequestContexts.TryGetValue(requestId, out var requestContext))
{
throw new ProtocolException(
string.Format(CultureInfo.CurrentCulture, Strings.Plugin_RequestContextDoesNotExist, requestId));
@@ -675,9 +663,7 @@ private OutboundRequestContext GetOutboundRequestContext(string requestId)
private void RemoveInboundRequestContext(string requestId)
{
- InboundRequestContext requestContext;
-
- if (_inboundRequestContexts.TryRemove(requestId, out requestContext))
+ if (_inboundRequestContexts.TryRemove(requestId, out var requestContext))
{
requestContext.Dispose();
}
@@ -685,9 +671,7 @@ private void RemoveInboundRequestContext(string requestId)
private void RemoveOutboundRequestContext(string requestId)
{
- OutboundRequestContext requestContext;
-
- if (_outboundRequestContexts.TryRemove(requestId, out requestContext))
+ if (_outboundRequestContexts.TryRemove(requestId, out var requestContext))
{
requestContext.Dispose();
}
@@ -698,7 +682,7 @@ private InboundRequestContext CreateInboundRequestContext(
CancellationToken cancellationToken)
{
return new InboundRequestContext(
- _connection,
+ _connection!,
message.RequestId,
cancellationToken,
_inboundRequestProcessingContext,
@@ -713,7 +697,7 @@ private OutboundRequestContext CreateOutboundRequestContext(
- _connection,
+ _connection!,
message,
timeout,
isKeepAlive,
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/GetOperationClaimsResponse.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/GetOperationClaimsResponse.cs
index 34bca5dd94b..671bf4a173a 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/GetOperationClaimsResponse.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/GetOperationClaimsResponse.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Globalization;
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/HandshakeRequest.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/HandshakeRequest.cs
index 88e58a1a507..86e84f01a34 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/HandshakeRequest.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/HandshakeRequest.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Globalization;
using Newtonsoft.Json;
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/HandshakeResponse.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/HandshakeResponse.cs
index e343c970c26..092870f1eb4 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/HandshakeResponse.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/Messages/HandshakeResponse.cs
@@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using Newtonsoft.Json;
using NuGet.Versioning;
@@ -26,6 +27,13 @@ public sealed class HandshakeResponse
[System.Text.Json.Serialization.JsonConverter(typeof(StjSemanticVersionConverter))]
public SemanticVersion? ProtocolVersion { get; }
+ ///
+ /// Gets a value indicating whether the handshake succeeded. When ,
+ /// is guaranteed to be non-.
+ ///
+ [MemberNotNullWhen(true, nameof(ProtocolVersion))]
+ internal bool IsSuccess => ResponseCode == MessageResponseCode.Success;
+
///
/// Initializes a new instance of the class.
///
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/NoOpDisposePlugin.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/NoOpDisposePlugin.cs
index 8edccd67388..c26c3608ba3 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/NoOpDisposePlugin.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/NoOpDisposePlugin.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
namespace NuGet.Protocol.Plugins
@@ -17,7 +15,7 @@ public sealed class NoOpDisposePlugin : IPlugin
///
/// Occurs before the plugin closes.
///
- public event EventHandler BeforeClose
+ public event EventHandler? BeforeClose
{
add
{
@@ -32,7 +30,7 @@ public event EventHandler BeforeClose
///
/// Occurs when the plugin has closed.
///
- public event EventHandler Closed
+ public event EventHandler? Closed
{
add
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/NsjRawJsonStringConverter.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/NsjRawJsonStringConverter.cs
index 662384a76f0..ae6946c41a0 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/NsjRawJsonStringConverter.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/NsjRawJsonStringConverter.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Globalization;
using Newtonsoft.Json;
@@ -14,7 +12,7 @@ internal sealed class NsjRawJsonStringConverter : JsonConverter
{
public override bool CanConvert(Type objectType) => objectType == typeof(string);
- public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
+ public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
{
if (reader.TokenType == JsonToken.Null)
{
@@ -31,7 +29,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
return obj.ToString(Formatting.None);
}
- public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
+ public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
{
if (value is string s)
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/OutboundRequestContext.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/OutboundRequestContext.cs
index e2c11b05738..d57facc440b 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/OutboundRequestContext.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/OutboundRequestContext.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Threading;
@@ -19,9 +17,9 @@ public abstract class OutboundRequestContext : IDisposable
public CancellationToken CancellationToken { get; protected set; }
///
- /// Gets the request ID.
+ /// Gets the request ID. Never null, protected constructor sets it.
///
- public string RequestId { get; protected set; }
+ public string RequestId { get; protected set; } = null!;
///
/// Disposes of this instance.
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/OutboundRequestContext`1.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/OutboundRequestContext`1.cs
index a41d3ee5baf..84c2cb31706 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/OutboundRequestContext`1.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/OutboundRequestContext`1.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Diagnostics;
#if NET5_0_OR_GREATER
@@ -28,14 +26,14 @@ public sealed class OutboundRequestContext : OutboundRequestContext
private bool _isKeepAlive;
private readonly IPluginLogger _logger;
private readonly Message _request;
- private readonly TaskCompletionSource _taskCompletionSource;
+ private readonly TaskCompletionSource _taskCompletionSource;
private readonly TimeSpan? _timeout;
- private readonly Timer _timer;
+ private readonly Timer? _timer;
///
/// Gets the completion task.
///
- public Task CompletionTask => _taskCompletionSource.Task;
+ public Task CompletionTask => _taskCompletionSource.Task;
///
/// Initializes a new class.
@@ -105,7 +103,7 @@ internal OutboundRequestContext(
_connection = connection;
_request = request;
- _taskCompletionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ _taskCompletionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
_timeout = timeout;
_isKeepAlive = isKeepAlive;
RequestId = request.RequestId;
@@ -167,7 +165,8 @@ public override void HandleProgress(Message progress)
if (_timeout.HasValue && _isKeepAlive)
{
- _timer.Change(_timeout.Value, Timeout.InfiniteTimeSpan);
+ // _timer is non-null whenever _timeout.HasValue (see constructor).
+ _timer!.Change(_timeout.Value, Timeout.InfiniteTimeSpan);
}
}
@@ -210,7 +209,7 @@ public override void HandleFault(Message fault)
var payload = MessageUtilities.DeserializePayload(fault);
- throw new ProtocolException(payload.Message);
+ throw new ProtocolException(payload?.Message);
}
protected override void Dispose(bool disposing)
@@ -256,7 +255,7 @@ private void Close()
}
}
- private void OnTimeout(object state)
+ private void OnTimeout(object? state)
{
Debug.WriteLine($"Request {_request.RequestId} timed out.");
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/Plugin.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/Plugin.cs
index d1436cc0f99..d021fb22b27 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/Plugin.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/Plugin.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.IO;
using System.Threading;
@@ -16,7 +14,7 @@ public sealed class Plugin : IPlugin
{
private bool _isClosed;
private readonly TimeSpan _idleTimeout;
- private readonly Timer _idleTimer;
+ private readonly Timer? _idleTimer;
private readonly object _idleTimerLock;
private bool _isDisposed;
private readonly bool _isOwnProcess;
@@ -25,27 +23,27 @@ public sealed class Plugin : IPlugin
///
/// Occurs before the plugin closes.
///
- public event EventHandler BeforeClose;
+ public event EventHandler? BeforeClose;
///
/// Occurs when the plugin has closed.
///
- public event EventHandler Closed;
+ public event EventHandler? Closed;
///
/// Occurs when a plugin process has exited.
///
- public event EventHandler Exited;
+ public event EventHandler? Exited;
///
/// Occurs when a plugin or plugin connection has faulted.
///
- public event EventHandler Faulted;
+ public event EventHandler? Faulted;
///
/// Occurs when a plugin has been idle for the configured idle timeout period.
///
- public event EventHandler Idle;
+ public event EventHandler? Idle;
///
/// Gets the connection for the plugin
@@ -87,7 +85,7 @@ public Plugin(string filePath, IConnection connection, IPluginProcess process, b
{
}
- internal Plugin(string filePath, IConnection connection, IPluginProcess process, bool isOwnProcess, TimeSpan idleTimeout, string id)
+ internal Plugin(string filePath, IConnection connection, IPluginProcess process, bool isOwnProcess, TimeSpan idleTimeout, string? id)
{
if (string.IsNullOrEmpty(filePath))
{
@@ -216,22 +214,22 @@ private void FireClosed()
}
}
- private void OnExited(object sender, IPluginProcess pluginProcess)
+ private void OnExited(object? sender, IPluginProcess pluginProcess)
{
Exited?.Invoke(this, new PluginEventArgs(this));
}
- private void OnFaulted(object sender, ProtocolErrorEventArgs e)
+ private void OnFaulted(object? sender, ProtocolErrorEventArgs e)
{
Faulted?.Invoke(this, new FaultedPluginEventArgs(this, e.Exception));
}
- private void OnIdleTimer(object state)
+ private void OnIdleTimer(object? state)
{
Idle?.Invoke(this, new PluginEventArgs(this));
}
- private void OnMessageReceived(object sender, MessageEventArgs e)
+ private void OnMessageReceived(object? sender, MessageEventArgs e)
{
lock (_idleTimerLock)
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginDiscoverer.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginDiscoverer.cs
index a3f0e61712c..e85ac65bdd3 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginDiscoverer.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginDiscoverer.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.IO;
@@ -20,10 +18,10 @@ namespace NuGet.Protocol.Plugins
public sealed class PluginDiscoverer : IPluginDiscoverer
{
private bool _isDisposed;
- private List _pluginFiles;
- private readonly string _netCoreOrNetFXPluginPaths;
- private readonly string _nuGetPluginPaths;
- private IEnumerable _results;
+ private List? _pluginFiles;
+ private readonly string? _netCoreOrNetFXPluginPaths;
+ private readonly string? _nuGetPluginPaths;
+ private IEnumerable? _results;
private readonly SemaphoreSlim _semaphore;
private readonly IEnvironmentVariableReader _environmentVariableReader;
@@ -96,7 +94,7 @@ public async Task> DiscoverAsync(Cancellation
if (!string.IsNullOrEmpty(_netCoreOrNetFXPluginPaths))
{
// NUGET_NETFX_PLUGIN_PATHS, NUGET_NETCORE_PLUGIN_PATHS have been set.
- var filePaths = _netCoreOrNetFXPluginPaths.Split(new[] { Path.PathSeparator }, StringSplitOptions.RemoveEmptyEntries);
+ var filePaths = _netCoreOrNetFXPluginPaths!.Split(new[] { Path.PathSeparator }, StringSplitOptions.RemoveEmptyEntries);
_pluginFiles = GetPluginFiles(filePaths, cancellationToken);
}
else if (!string.IsNullOrEmpty(_nuGetPluginPaths))
@@ -111,7 +109,11 @@ public async Task> DiscoverAsync(Cancellation
var directories = new List { PluginDiscoveryUtility.GetNuGetHomePluginsPath() };
#if IS_DESKTOP
// Internal plugins are only supported for .NET Framework scenarios, namely msbuild.exe
- directories.Add(PluginDiscoveryUtility.GetInternalPlugins());
+ var internalPlugins = PluginDiscoveryUtility.GetInternalPlugins();
+ if (internalPlugins != null)
+ {
+ directories.Add(internalPlugins);
+ }
#endif
var filePaths = PluginDiscoveryUtility.GetConventionBasedPlugins(directories);
_pluginFiles = GetPluginFiles(filePaths, cancellationToken);
@@ -148,7 +150,7 @@ public async Task> DiscoverAsync(Cancellation
return _results;
}
- private static List GetPluginFiles(IEnumerable filePaths, CancellationToken cancellationToken)
+ private static List GetPluginFiles(IEnumerable? filePaths, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -210,7 +212,7 @@ internal List GetPluginsInNuGetPluginPaths()
}
else if (Directory.Exists(path))
{
- List plugins = GetNetToolsPluginsInDirectory(path);
+ List? plugins = GetNetToolsPluginsInDirectory(path);
if (plugins != null)
{
@@ -241,7 +243,7 @@ internal List GetPluginsInPath()
{
if (PathValidator.IsValidLocalPath(path) || PathValidator.IsValidUncPath(path))
{
- List plugins = GetNetToolsPluginsInDirectory(path);
+ List? plugins = GetNetToolsPluginsInDirectory(path);
if (plugins != null)
{
@@ -253,9 +255,9 @@ internal List GetPluginsInPath()
return pluginFiles;
}
- private static List GetNetToolsPluginsInDirectory(string directoryPath)
+ private static List? GetNetToolsPluginsInDirectory(string directoryPath)
{
- List pluginFiles = null;
+ List? pluginFiles = null;
if (!Directory.Exists(directoryPath))
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginDiscoveryUtility.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginDiscoveryUtility.cs
index 518043d9998..a5121ede880 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginDiscoveryUtility.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginDiscoveryUtility.cs
@@ -1,6 +1,4 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.IO;
@@ -11,7 +9,7 @@ namespace NuGet.Protocol.Plugins
{
public static class PluginDiscoveryUtility
{
- public static Lazy InternalPluginDiscoveryRoot { get; set; }
+ public static Lazy? InternalPluginDiscoveryRoot { get; set; }
private static string NuGetPluginsDirectory = "Plugins";
@@ -20,7 +18,7 @@ public static class PluginDiscoveryUtility
/// The internal plugins located next to the NuGet assemblies.
///
/// Internal plugins
- public static string GetInternalPlugins()
+ public static string? GetInternalPlugins()
{
return InternalPluginDiscoveryRoot?.Value ??
GetNuGetPluginsDirectoryRelativeToNuGetAssembly(typeof(PluginDiscoveryUtility).Assembly.Location); // NuGet.*.dll
@@ -32,7 +30,7 @@ public static string GetInternalPlugins()
/// The MsBuildExe directory path. Needs to be a valid path. file:// not supported.
/// The NuGet plugins directory, null if is null
/// The MSBuild.exe is in MSBuild\Current\Bin, the Plugins directory is in Common7\IDE\CommonExtensions\Microsoft\NuGet\Plugins
- public static string GetInternalPluginRelativeToMSBuildDirectory(string msbuildDirectoryPath)
+ public static string? GetInternalPluginRelativeToMSBuildDirectory(string msbuildDirectoryPath)
{
if (string.IsNullOrEmpty(msbuildDirectoryPath))
{
@@ -53,11 +51,11 @@ public static string GetInternalPluginRelativeToMSBuildDirectory(string msbuildD
///
/// The path to a NuGet assembly in CommonExtensions\NuGet, needs to be a valid path. file:// not supported
/// The NuGet plugins directory in CommonExtensions\NuGet\Plugins, null if the is null
- public static string GetNuGetPluginsDirectoryRelativeToNuGetAssembly(string nugetAssemblyPath)
+ public static string? GetNuGetPluginsDirectoryRelativeToNuGetAssembly(string nugetAssemblyPath)
{
return !string.IsNullOrEmpty(nugetAssemblyPath) ?
Path.Combine(
- Path.GetDirectoryName(nugetAssemblyPath),
+ Path.GetDirectoryName(nugetAssemblyPath)!,
NuGetPluginsDirectory
) :
null;
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginFactory.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginFactory.cs
index 3674e4644d3..57ef14feb42 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginFactory.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginFactory.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -28,8 +26,6 @@ public class PluginFactory : IPluginFactory
private readonly ConcurrentDictionary>> _plugins;
private readonly IEnvironmentVariableReader _environmentVariableReader;
- internal PluginFactory() { }
-
///
/// Instantiates a new class.
///
@@ -41,6 +37,15 @@ public PluginFactory(TimeSpan pluginIdleTimeout)
{
}
+ // Parameterless constructor used by Moq to mock this type.
+ [Obsolete("This constructor exists only for Moq via reflection. Do not call directly.", error: true)]
+ internal PluginFactory()
+ {
+ _logger = null!;
+ _plugins = null!;
+ _environmentVariableReader = null!;
+ }
+
internal PluginFactory(TimeSpan pluginIdleTimeout, IEnvironmentVariableReader environmentVariableReader)
{
_environmentVariableReader = environmentVariableReader ?? throw new ArgumentNullException(nameof(environmentVariableReader));
@@ -207,10 +212,10 @@ private async Task CreatePluginAsync(
{
// Process ID is unavailable until we start the process; however, we want to wire up this event before
// attempting to start the process in case the process immediately exits.
- EventHandler onExited = null;
- Connection connection = null;
+ EventHandler? onExited = null;
+ Connection? connection = null;
- onExited = (object eventSender, IPluginProcess exitedProcess) =>
+ onExited = (object? eventSender, IPluginProcess exitedProcess) =>
{
exitedProcess.Exited -= onExited;
@@ -381,9 +386,7 @@ private void Dispose(IPlugin plugin)
UnregisterEventHandlers(plugin as Plugin);
- Lazy> lazyTask;
-
- if (_plugins.TryRemove(plugin.FilePath, out lazyTask))
+ if (_plugins.TryRemove(plugin.FilePath, out Lazy>? lazyTask))
{
if (lazyTask.IsValueCreated && lazyTask.Value.Status == TaskStatus.RanToCompletion)
{
@@ -402,7 +405,7 @@ private void Dispose(IPlugin plugin)
}
}
- private void OnPluginFaulted(object sender, FaultedPluginEventArgs e)
+ private void OnPluginFaulted(object? sender, FaultedPluginEventArgs e)
{
var message = string.Format(
CultureInfo.CurrentCulture,
@@ -415,12 +418,12 @@ private void OnPluginFaulted(object sender, FaultedPluginEventArgs e)
Dispose(e.Plugin);
}
- private void OnPluginExited(object sender, PluginEventArgs e)
+ private void OnPluginExited(object? sender, PluginEventArgs e)
{
Dispose(e.Plugin);
}
- private void OnPluginIdle(object sender, PluginEventArgs e)
+ private void OnPluginIdle(object? sender, PluginEventArgs e)
{
if (_logger.IsEnabled)
{
@@ -458,7 +461,7 @@ private static void SendCloseRequest(IPlugin plugin)
}
}
- private void UnregisterEventHandlers(Plugin plugin)
+ private void UnregisterEventHandlers(Plugin? plugin)
{
if (plugin != null)
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginManager.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginManager.cs
index b9eeff3d3ab..a22be134ef4 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginManager.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginManager.cs
@@ -1,12 +1,11 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using System.Threading;
@@ -137,7 +136,7 @@ public async Task> CreatePluginsAsync(
if (pluginCreationResult.Item1)
{
- pluginCreationResults.Add(pluginCreationResult.Item2);
+ pluginCreationResults.Add(pluginCreationResult.Item2!);
}
}
}
@@ -154,7 +153,7 @@ public async Task> CreatePluginsAsync(
/// The requested operation claim
/// cancellation token
/// A plugin creation result, null if the requested plugin cannot handle the given operation claim
- public Task> TryGetSourceAgnosticPluginAsync(PluginDiscoveryResult pluginDiscoveryResult, OperationClaim requestedOperationClaim, CancellationToken cancellationToken)
+ public Task> TryGetSourceAgnosticPluginAsync(PluginDiscoveryResult pluginDiscoveryResult, OperationClaim requestedOperationClaim, CancellationToken cancellationToken)
{
if (pluginDiscoveryResult == null)
{
@@ -184,12 +183,12 @@ public Task> TryGetSourceAgnosticPluginAsync(P
/// service index
/// cancellation token
/// A plugin creation result, null if the requested plugin cannot handle the given operation claim
- private async Task> TryCreatePluginAsync(
+ private async Task> TryCreatePluginAsync(
PluginDiscoveryResult result,
OperationClaim requestedOperationClaim,
PluginRequestKey requestKey,
- string packageSourceRepository,
- string serviceIndex,
+ string? packageSourceRepository,
+ string? serviceIndex,
CancellationToken cancellationToken)
{
// This is a non cancellable task.
@@ -200,7 +199,7 @@ private async Task> TryCreatePluginAsync(
// We could consider handling each of this operations more cleverly,
// but simplicity and readability is prioritized
cancellationToken = CancellationToken.None;
- PluginCreationResult pluginCreationResult = null;
+ PluginCreationResult? pluginCreationResult = null;
var cacheEntry = new PluginCacheEntry(_pluginsCacheDirectoryPath.Value, result.PluginFile.Path, requestKey.PackageSourceRepository);
ConcurrencyUtilities.ExecuteWithFileLocked(cacheEntry.CacheFileName, cacheEntry.LoadFromFile);
@@ -255,7 +254,7 @@ await utilities.Value.DoOncePerPluginLifetimeAsync(
}
else
{
- pluginCreationResult = new PluginCreationResult(result.Message);
+ pluginCreationResult = new PluginCreationResult(result.Message!);
}
}
catch (Exception e)
@@ -269,7 +268,7 @@ await utilities.Value.DoOncePerPluginLifetimeAsync(
}
}
- return new Tuple(pluginCreationResult != null, pluginCreationResult);
+ return new Tuple(pluginCreationResult != null, pluginCreationResult);
}
private async Task> PerformOneTimePluginInitializationAsync(IPlugin plugin, CancellationToken cancellationToken)
@@ -297,6 +296,13 @@ await utilities.Value.DoOncePerPluginLifetimeAsync(
return utilities;
}
+ [MemberNotNull(nameof(EnvironmentVariableReader))]
+ [MemberNotNull(nameof(_discoverer))]
+ [MemberNotNull(nameof(_pluginsCacheDirectoryPath))]
+ [MemberNotNull(nameof(_connectionOptions))]
+ [MemberNotNull(nameof(_pluginFactory))]
+ [MemberNotNull(nameof(_pluginOperationClaims))]
+ [MemberNotNull(nameof(_pluginUtilities))]
private void Initialize(IEnvironmentVariableReader reader,
Lazy pluginDiscoverer,
Func pluginFactoryCreator,
@@ -324,11 +330,11 @@ private void Initialize(IEnvironmentVariableReader reader,
private static async Task> GetPluginOperationClaimsAsync(
IPlugin plugin,
- string packageSourceRepository,
- string serviceIndex,
+ string? packageSourceRepository,
+ string? serviceIndex,
CancellationToken cancellationToken)
{
- if (plugin.Connection.ProtocolVersion.Equals(Plugins.ProtocolConstants.Version100) && (string.IsNullOrEmpty(packageSourceRepository) || serviceIndex == null))
+ if (plugin.Connection.ProtocolVersion?.Equals(Plugins.ProtocolConstants.Version100) == true && (string.IsNullOrEmpty(packageSourceRepository) || serviceIndex == null))
{
throw new ArgumentException("Cannot invoke get operation claims with null arguments on a " + Plugins.ProtocolConstants.Version100 + " plugin");
}
@@ -354,7 +360,7 @@ private PluginDiscoverer InitializeDiscoverer()
private bool IsPluginPossiblyAvailable()
{
- string pluginEnvVariable;
+ string? pluginEnvVariable;
#if IS_DESKTOP
pluginEnvVariable = EnvironmentVariableReader.GetEnvironmentVariable(EnvironmentVariableConstants.DesktopPluginPaths);
@@ -365,13 +371,13 @@ private bool IsPluginPossiblyAvailable()
return !string.IsNullOrEmpty(pluginEnvVariable);
}
- private void OnPluginClosed(object sender, EventArgs e)
+ private void OnPluginClosed(object? sender, EventArgs e)
{
if (sender is IPlugin plugin)
{
plugin.Closed -= OnPluginClosed;
- _pluginUtilities.TryRemove(plugin.Id, out Lazy utilities);
+ _pluginUtilities.TryRemove(plugin.Id, out _);
}
}
@@ -437,7 +443,7 @@ internal PluginRequestKey(string pluginFilePath, string packageSourceRepository)
PackageSourceRepository = packageSourceRepository;
}
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
return Equals(obj as PluginRequestKey);
}
@@ -447,7 +453,7 @@ public override int GetHashCode()
return HashCodeCombiner.GetHashCode(PluginFilePath, PackageSourceRepository);
}
- public bool Equals(PluginRequestKey other)
+ public bool Equals(PluginRequestKey? other)
{
if (ReferenceEquals(this, other))
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginMulticlientUtilities.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginMulticlientUtilities.cs
index c3314851332..ab815615ab1 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginMulticlientUtilities.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginMulticlientUtilities.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Concurrent;
using System.Threading;
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginPackageDownloader.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginPackageDownloader.cs
index a549ef4caf9..7166dbd9ff5 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginPackageDownloader.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginPackageDownloader.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -152,7 +150,7 @@ public async Task CopyNupkgFileToAsync(string destinationFilePath, Cancell
cancellationToken.ThrowIfCancellationRequested();
- string filePath = null;
+ string? filePath = null;
try
{
@@ -206,10 +204,10 @@ public async Task GetPackageHashAsync(string hashAlgorithm, Cancellation
if (response != null && response.ResponseCode == MessageResponseCode.Success)
{
- return response.Hash;
+ return response.Hash!;
}
- return null;
+ return null!; // This is a fallback in case the plugin fails to provide a hash. This should never happen in practice. It is not worth the risk to annotate this method as null.
}
///
@@ -236,7 +234,7 @@ public void SetExceptionHandler(Func> handleExceptionAsync
/// Sets a throttle for package downloads.
///
/// A throttle. Can be .
- public void SetThrottle(SemaphoreSlim throttle)
+ public void SetThrottle(SemaphoreSlim? throttle)
{
// Do nothing. Plugins are not implemented on macOS.
}
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginPackageReader.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginPackageReader.cs
index b8d7848989b..750d40695e7 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginPackageReader.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginPackageReader.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -25,12 +23,12 @@ namespace NuGet.Protocol.Plugins
///
public sealed class PluginPackageReader : PackageReaderBase
{
- private readonly ConcurrentDictionary>> _fileStreams;
- private IEnumerable _files;
+ private readonly ConcurrentDictionary>> _fileStreams;
+ private IEnumerable? _files;
private readonly SemaphoreSlim _getFilesSemaphore;
private readonly SemaphoreSlim _getNuspecReaderSemaphore;
private bool _isDisposed;
- private NuspecReader _nuspecReader;
+ private NuspecReader? _nuspecReader;
private readonly PackageIdentity _packageIdentity;
private readonly string _packageSourceRepository;
private readonly IPlugin _plugin;
@@ -70,7 +68,7 @@ public PluginPackageReader(IPlugin plugin, PackageIdentity packageIdentity, stri
_packageSourceRepository = packageSourceRepository;
_getFilesSemaphore = new SemaphoreSlim(initialCount: 1, maxCount: 1);
_getNuspecReaderSemaphore = new SemaphoreSlim(initialCount: 1, maxCount: 1);
- _fileStreams = new ConcurrentDictionary>>(StringComparer.OrdinalIgnoreCase);
+ _fileStreams = new ConcurrentDictionary>>(StringComparer.OrdinalIgnoreCase);
_tempDirectoryPath = new Lazy(GetTemporaryDirectoryPath);
}
@@ -107,14 +105,14 @@ public override async Task GetStreamAsync(string path, CancellationToken
var lazyCreator = _fileStreams.GetOrAdd(
path,
- p => new Lazy>(
+ p => new Lazy>(
() => GetStreamInternalAsync(p)));
await lazyCreator.Value;
if (lazyCreator.Value.Result == null)
{
- return null;
+ return null!;
}
return lazyCreator.Value.Result.Create();
@@ -293,7 +291,7 @@ public override async Task> CopyFilesAsync(
switch (response.ResponseCode)
{
case MessageResponseCode.Success:
- return response.CopiedFiles;
+ return response.CopiedFiles!;
case MessageResponseCode.Error:
throw new PluginException(
@@ -364,7 +362,7 @@ public override NuGetVersion GetMinClientVersion()
/// .
/// Thrown if
/// is cancelled.
- public override async Task GetMinClientVersionAsync(CancellationToken cancellationToken)
+ public override async Task GetMinClientVersionAsync(CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -952,7 +950,7 @@ public override async Task CopyNupkgAsync(
}
}
- return null;
+ return null!;
}
protected override void Dispose(bool disposing)
@@ -1002,7 +1000,7 @@ private async Task> GetFileGroupsAsync(
// Use the known framework or if the folder did not parse, use the Any framework and consider it a sub folder
var framework = GetFrameworkFromPath(path, allowSubFolders);
- List items = null;
+ List? items = null;
if (!groups.TryGetValue(framework, out items))
{
items = new List();
@@ -1017,7 +1015,7 @@ private async Task> GetFileGroupsAsync(
.Select(framework => new FrameworkSpecificGroup(framework, groups[framework].OrderBy(e => e, StringComparer.OrdinalIgnoreCase)));
}
- private async Task GetStreamInternalAsync(
+ private async Task GetStreamInternalAsync(
string pathInPackage)
{
var packageId = _packageIdentity.Id;
@@ -1040,7 +1038,7 @@ private async Task GetStreamInternalAsync(
switch (response.ResponseCode)
{
case MessageResponseCode.Success:
- return new FileStreamCreator(response.CopiedFiles.Single());
+ return new FileStreamCreator(response.CopiedFiles!.Single());
case MessageResponseCode.Error:
throw new PluginException(
@@ -1079,7 +1077,7 @@ private async Task> GetFilesInternalAsync(CancellationToken
switch (response.ResponseCode)
{
case MessageResponseCode.Success:
- return response.Files;
+ return response.Files!;
case MessageResponseCode.Error:
throw new PluginException(
@@ -1105,7 +1103,7 @@ private async Task> GetFilesInternalAsync(CancellationToken
private void CreatePackageDownloadMarkerFile(string nupkgFilePath)
{
- var directory = Path.GetDirectoryName(nupkgFilePath);
+ var directory = Path.GetDirectoryName(nupkgFilePath)!;
var resolver = new VersionFolderPathResolver(directory);
var fileName = resolver.GetPackageDownloadMarkerFileName(_packageIdentity.Id);
var filePath = Path.Combine(directory, fileName);
@@ -1122,7 +1120,7 @@ private static string GetTemporaryDirectoryPath()
return tempDirectoryPath;
}
- public override Task GetPrimarySignatureAsync(CancellationToken token)
+ public override Task GetPrimarySignatureAsync(CancellationToken token)
{
return TaskResult.Null();
}
@@ -1151,10 +1149,10 @@ public override bool CanVerifySignedPackages(SignedPackageVerifierSettings verif
return false;
}
- public override string GetContentHash(CancellationToken token, Func GetUnsignedPackageHash = null)
+ public override string GetContentHash(CancellationToken token, Func? GetUnsignedPackageHash = null)
{
// Plugin Download doesn't support signed packages so simply return null... and even then they aren't always packages.
- return null;
+ return null!;
}
private sealed class FileStreamCreator : IDisposable
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginProcess.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginProcess.cs
index e60e302be6a..83b5d3a3f4a 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/PluginProcess.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/PluginProcess.cs
@@ -1,10 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
namespace NuGet.Protocol.Plugins
@@ -15,21 +14,26 @@ namespace NuGet.Protocol.Plugins
public sealed class PluginProcess : IPluginProcess
{
private int? _exitCode;
- private bool _hasStarted;
private int? _id;
private bool _isDisposed;
private readonly Process _process;
- private readonly ProcessStartInfo _startInfo;
+ private readonly ProcessStartInfo? _startInfo;
+
+ // When HasStarted is false, _startInfo is guaranteed non-null
+ // (parameterless ctor sets HasStarted=true; the only way it can be false is the
+ // ProcessStartInfo ctor, which assigns _startInfo).
+ [MemberNotNullWhen(false, nameof(_startInfo))]
+ private bool HasStarted { get; set; }
///
/// Occurs when a process exits.
///
- public event EventHandler Exited;
+ public event EventHandler? Exited;
///
/// Occurs when a line of output has been received.
///
- public event EventHandler LineRead;
+ public event EventHandler? LineRead;
public int? ExitCode
{
@@ -41,7 +45,7 @@ public int? ExitCode
}
}
- internal string FilePath => _process.MainModule.FileName;
+ internal string FilePath => _process.MainModule!.FileName;
///
/// Gets the process ID if the process was started; otherwise, .
@@ -64,7 +68,7 @@ public int? Id
public PluginProcess()
{
_process = Process.GetCurrentProcess();
- _hasStarted = true;
+ HasStarted = true;
}
///
@@ -140,7 +144,7 @@ public void Kill()
public void Start()
{
- if (_hasStarted)
+ if (HasStarted)
{
throw new InvalidOperationException();
}
@@ -151,17 +155,17 @@ public void Start()
_process.EnableRaisingEvents = true;
_process.StartInfo = _startInfo;
- _hasStarted = true;
+ HasStarted = true;
_process.Start();
}
- private void OnOutputDataReceived(object sender, DataReceivedEventArgs e)
+ private void OnOutputDataReceived(object? sender, DataReceivedEventArgs e)
{
LineRead?.Invoke(sender, new LineReadEventArgs(e.Data));
}
- private void OnProcessExited(object sender, EventArgs e)
+ private void OnProcessExited(object? sender, EventArgs e)
{
if (sender is Process process)
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/Receiver.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/Receiver.cs
index 38a1db6d6c7..2b11e0c2b8b 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/Receiver.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/Receiver.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
namespace NuGet.Protocol.Plugins
@@ -25,12 +23,12 @@ public abstract class Receiver : IReceiver
///
/// Occurs when an unrecoverable fault has been caught.
///
- public event EventHandler Faulted;
+ public event EventHandler? Faulted;
///
/// Occurs when a message has been received.
///
- public event EventHandler MessageReceived;
+ public event EventHandler? MessageReceived;
///
/// Closes the connection.
@@ -60,7 +58,7 @@ public void Dispose()
protected abstract void Dispose(bool disposing);
- protected void FireFaultEvent(Exception exception, Message message)
+ protected void FireFaultEvent(Exception exception, Message? message)
{
var ex = new ProtocolException(Strings.Plugin_ProtocolException, exception);
var eventArgs = message == null
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers.cs
index 1a14af54c60..021281c9a6c 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers.cs
@@ -1,10 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Concurrent;
+using System.Diagnostics.CodeAnalysis;
namespace NuGet.Protocol.Plugins
{
@@ -74,7 +73,7 @@ public bool TryAdd(MessageMethod method, IRequestHandler handler)
/// A message method.
/// An existing request handler.
/// if the request handler exists; otherwise, .
- public bool TryGet(MessageMethod method, out IRequestHandler handler)
+ public bool TryGet(MessageMethod method, [NotNullWhen(true)] out IRequestHandler? handler)
{
return _handlers.TryGetValue(method, out handler);
}
@@ -86,9 +85,7 @@ public bool TryGet(MessageMethod method, out IRequestHandler handler)
/// if a request handler was removed; otherwise, .
public bool TryRemove(MessageMethod method)
{
- IRequestHandler handler;
-
- return _handlers.TryRemove(method, out handler);
+ return _handlers.TryRemove(method, out _);
}
}
}
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/CloseRequestHandler.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/CloseRequestHandler.cs
index 96b145f008c..b200ca8175d 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/CloseRequestHandler.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/CloseRequestHandler.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Threading;
using System.Threading.Tasks;
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/GetCredentialsRequestHandler.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/GetCredentialsRequestHandler.cs
index 0517aaaaa83..281253683e2 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/GetCredentialsRequestHandler.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/GetCredentialsRequestHandler.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Concurrent;
#if NET5_0_OR_GREATER
@@ -25,10 +23,10 @@ public sealed class GetCredentialsRequestHandler : IRequestHandler, IDisposable
{
private const string _basicAuthenticationType = "Basic";
- private readonly ICredentialService _credentialService;
+ private readonly ICredentialService? _credentialService;
private bool _isDisposed;
private readonly IPlugin _plugin;
- private readonly IWebProxy _proxy;
+ private readonly IWebProxy? _proxy;
private readonly ConcurrentDictionary _repositories;
///
@@ -46,8 +44,8 @@ public sealed class GetCredentialsRequestHandler : IRequestHandler, IDisposable
/// is .
public GetCredentialsRequestHandler(
IPlugin plugin,
- IWebProxy proxy,
- ICredentialService credentialService)
+ IWebProxy? proxy,
+ ICredentialService? credentialService)
{
if (plugin == null)
{
@@ -139,10 +137,11 @@ public async Task HandleResponseAsync(
cancellationToken.ThrowIfCancellationRequested();
- var requestPayload = MessageUtilities.DeserializePayload(request);
+ // Deserialized payload is non-null for well-formed handler requests.
+ var requestPayload = MessageUtilities.DeserializePayload(request)!;
var packageSource = GetPackageSource(requestPayload.PackageSourceRepository);
- GetCredentialsResponse responsePayload = null;
+ GetCredentialsResponse responsePayload;
if (packageSource.IsHttp &&
string.Equals(
@@ -150,7 +149,7 @@ public async Task HandleResponseAsync(
packageSource.Source,
StringComparison.OrdinalIgnoreCase))
{
- ICredentials credential = null;
+ ICredentials? credential;
using (var progressReporter = AutomaticProgressReporter.Create(
_plugin.Connection,
@@ -181,12 +180,13 @@ public async Task HandleResponseAsync(
}
else
{
- networkCredential = credential?.GetCredential(packageSource.SourceUri, null);
+ // authType is documented as nullable in implementations even though BCL types it as non-null.
+ var resolvedCredential = credential?.GetCredential(packageSource.SourceUri, authType: null!);
responsePayload = new GetCredentialsResponse(
- networkCredential != null ? MessageResponseCode.Success : MessageResponseCode.NotFound,
- networkCredential?.UserName,
- networkCredential?.Password);
+ resolvedCredential != null ? MessageResponseCode.Success : MessageResponseCode.NotFound,
+ resolvedCredential?.UserName,
+ resolvedCredential?.Password);
}
}
else
@@ -200,7 +200,7 @@ public async Task HandleResponseAsync(
await responseHandler.SendResponseAsync(request, responsePayload, cancellationToken);
}
- private async Task GetCredentialAsync(
+ private async Task GetCredentialAsync(
PackageSource packageSource,
HttpStatusCode statusCode,
CancellationToken cancellationToken)
@@ -215,7 +215,7 @@ private async Task GetCredentialAsync(
return await GetPackageSourceCredential(requestType, packageSource, cancellationToken);
}
- private async Task GetPackageSourceCredential(
+ private async Task GetPackageSourceCredential(
CredentialRequestType requestType,
PackageSource packageSource,
CancellationToken cancellationToken)
@@ -257,7 +257,7 @@ private async Task GetPackageSourceCredential(
return credentials;
}
- private async Task GetProxyCredentialAsync(
+ private async Task GetProxyCredentialAsync(
PackageSource packageSource,
CancellationToken cancellationToken)
{
@@ -276,7 +276,8 @@ private async Task GetProxyCredentialAsync(
message,
cancellationToken);
- return proxyCredentials?.GetCredential(proxyUri, _basicAuthenticationType);
+ // IWebProxy.GetProxy returns non-null in practice when proxy resolution succeeds.
+ return proxyCredentials?.GetCredential(proxyUri!, _basicAuthenticationType);
}
return null;
@@ -300,9 +301,7 @@ private static CredentialRequestType GetCredentialRequestType(HttpStatusCode sta
private PackageSource GetPackageSource(string packageSourceRepository)
{
- SourceRepository sourceRepository;
-
- if (_repositories.TryGetValue(packageSourceRepository, out sourceRepository))
+ if (_repositories.TryGetValue(packageSourceRepository, out var sourceRepository))
{
return sourceRepository.PackageSource;
}
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/GetServiceIndexRequestHandler.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/GetServiceIndexRequestHandler.cs
index e9ed37090f5..3a1faf7f61c 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/GetServiceIndexRequestHandler.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/GetServiceIndexRequestHandler.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Concurrent;
#if NET5_0_OR_GREATER
@@ -123,19 +121,19 @@ public async Task HandleResponseAsync(
cancellationToken.ThrowIfCancellationRequested();
- var getRequest = MessageUtilities.DeserializePayload(request);
- SourceRepository sourceRepository;
- ServiceIndexResourceV3 serviceIndex = null;
+ // Deserialized payload is non-null for well-formed handler requests.
+ var getRequest = MessageUtilities.DeserializePayload(request)!;
+ ServiceIndexResourceV3? serviceIndex = null;
GetServiceIndexResponse responsePayload;
- if (_repositories.TryGetValue(getRequest.PackageSourceRepository, out sourceRepository))
+ if (_repositories.TryGetValue(getRequest.PackageSourceRepository, out var sourceRepository))
{
serviceIndex = await sourceRepository.GetResourceAsync(cancellationToken);
}
if (serviceIndex == null)
{
- responsePayload = new GetServiceIndexResponse(MessageResponseCode.NotFound, serviceIndexJson: (string)null);
+ responsePayload = new GetServiceIndexResponse(MessageResponseCode.NotFound, serviceIndexJson: (string?)null);
}
else
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/LogRequestHandler.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/LogRequestHandler.cs
index f5173bfbb9e..0ac114317da 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/LogRequestHandler.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/LogRequestHandler.cs
@@ -1,12 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
-#if NET5_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
-#endif
using System.Threading;
using System.Threading.Tasks;
using NuGet.Common;
@@ -83,7 +79,8 @@ public async Task HandleResponseAsync(
cancellationToken.ThrowIfCancellationRequested();
- var logRequest = MessageUtilities.DeserializePayload(request);
+ // Deserialized payload is non-null for well-formed handler requests.
+ var logRequest = MessageUtilities.DeserializePayload(request)!;
MessageResponseCode responseCode;
if (logRequest.LogLevel >= _logLevel)
@@ -107,6 +104,7 @@ public async Task HandleResponseAsync(
///
/// A logger.
/// Thrown if is .
+ [MemberNotNull(nameof(_logger))]
public void SetLogger(ILogger logger)
{
if (logger == null)
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/MonitorNuGetProcessExitRequestHandler.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/MonitorNuGetProcessExitRequestHandler.cs
index 7fb6f295c28..0ac594e3d34 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/MonitorNuGetProcessExitRequestHandler.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/MonitorNuGetProcessExitRequestHandler.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.Collections.Concurrent;
using System.Diagnostics;
@@ -99,9 +97,10 @@ public async Task HandleResponseAsync(
cancellationToken.ThrowIfCancellationRequested();
- var monitorRequest = MessageUtilities.DeserializePayload(request);
+ // Deserialized payload is non-null for well-formed handler requests.
+ var monitorRequest = MessageUtilities.DeserializePayload(request)!;
- Process process = null;
+ Process? process = null;
try
{
@@ -131,7 +130,7 @@ public async Task HandleResponseAsync(
await responseHandler.SendResponseAsync(request, response, cancellationToken);
}
- private void OnProcessExited(object sender, EventArgs e)
+ private void OnProcessExited(object? sender, EventArgs e)
{
_plugin.Close();
}
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/SymmetricHandshake.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/SymmetricHandshake.cs
index cf833c2f9e9..78c63854fd3 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/SymmetricHandshake.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestHandlers/SymmetricHandshake.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
#if NET5_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
@@ -23,9 +21,9 @@ public sealed class SymmetricHandshake : IRequestHandler, IDisposable
private readonly TimeSpan _handshakeTimeout;
private bool _isDisposed;
private readonly SemanticVersion _minimumProtocolVersion;
- private HandshakeRequest _outboundHandshakeRequest;
+ private HandshakeRequest? _outboundHandshakeRequest;
private readonly SemanticVersion _protocolVersion;
- private TaskCompletionSource _responseSentTaskCompletionSource;
+ private readonly TaskCompletionSource _responseSentTaskCompletionSource;
private readonly CancellationTokenSource _timeoutCancellationTokenSource;
///
@@ -116,7 +114,7 @@ public void Dispose()
/// if the handshake was successful; otherwise, .
/// Thrown if
/// is cancelled.
- public async Task HandshakeAsync(CancellationToken cancellationToken)
+ public async Task HandshakeAsync(CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -127,7 +125,7 @@ public async Task HandshakeAsync(CancellationToken cancellation
_outboundHandshakeRequest,
cancellationToken);
- if (response != null && response.ResponseCode == MessageResponseCode.Success)
+ if (response?.IsSuccess == true)
{
if (IsSupportedVersion(response.ProtocolVersion))
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestIdGenerator.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestIdGenerator.cs
index 7d2a3d97533..e1fc50051d8 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/RequestIdGenerator.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/RequestIdGenerator.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
namespace NuGet.Protocol.Plugins
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/Sender.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/Sender.cs
index 89a439e1d5e..0ce8421f2b4 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/Sender.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/Sender.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.IO;
using System.Threading;
@@ -26,7 +24,7 @@ public sealed class Sender : ISender
private bool _isDisposed;
private readonly object _sendLock;
private readonly TextWriter _textWriter;
- private readonly IEnvironmentVariableReader _environmentVariableReader;
+ private readonly IEnvironmentVariableReader? _environmentVariableReader;
///
/// Instantiates a new class.
@@ -38,7 +36,7 @@ public Sender(TextWriter writer)
{
}
- internal Sender(TextWriter writer, IEnvironmentVariableReader environmentVariableReader)
+ internal Sender(TextWriter writer, IEnvironmentVariableReader? environmentVariableReader)
{
if (writer == null)
{
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/StandardInputReceiver.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/StandardInputReceiver.cs
index 0ce0de5a542..285cbf9bead 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/StandardInputReceiver.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/StandardInputReceiver.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using System.IO;
using System.Threading;
@@ -23,8 +21,8 @@ public sealed class StandardInputReceiver : Receiver
{
private readonly TextReader _reader;
private readonly CancellationTokenSource _receiveCancellationTokenSource;
- private Task _receiveThread;
- private readonly IEnvironmentVariableReader _environmentVariableReader;
+ private Task? _receiveThread;
+ private readonly IEnvironmentVariableReader? _environmentVariableReader;
///
/// Instantiates a new class.
@@ -36,7 +34,7 @@ public StandardInputReceiver(TextReader reader)
{
}
- internal StandardInputReceiver(TextReader reader, IEnvironmentVariableReader environmentVariableReader)
+ internal StandardInputReceiver(TextReader reader, IEnvironmentVariableReader? environmentVariableReader)
{
if (reader == null)
{
@@ -109,15 +107,15 @@ public override void Connect()
TaskScheduler.Default);
}
- private void Receive(object state)
+ private void Receive(object? state)
{
- Message message = null;
+ Message? message = null;
try
{
- var cancellationToken = (CancellationToken)state;
+ var cancellationToken = (CancellationToken)state!;
- string line;
+ string? line;
// Reading from the standard input stream is a blocking call; while we're
// in a read call we can't respond to cancellation requests.
diff --git a/src/NuGet.Core/NuGet.Protocol/Plugins/StandardOutputReceiver.cs b/src/NuGet.Core/NuGet.Protocol/Plugins/StandardOutputReceiver.cs
index 21b94e058ad..db041ae569f 100644
--- a/src/NuGet.Core/NuGet.Protocol/Plugins/StandardOutputReceiver.cs
+++ b/src/NuGet.Core/NuGet.Protocol/Plugins/StandardOutputReceiver.cs
@@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-#nullable disable
-
using System;
using NuGet.Common;
using NuGet.Shared;
@@ -20,7 +18,7 @@ public sealed class StandardOutputReceiver : Receiver
{
private bool _hasConnected;
private readonly IPluginProcess _process;
- private readonly IEnvironmentVariableReader _environmentVariableReader;
+ private readonly IEnvironmentVariableReader? _environmentVariableReader;
///
/// Instantiates a new class.
@@ -32,7 +30,7 @@ public StandardOutputReceiver(IPluginProcess process)
{
}
- internal StandardOutputReceiver(IPluginProcess process, IEnvironmentVariableReader environmentVariableReader)
+ internal StandardOutputReceiver(IPluginProcess process, IEnvironmentVariableReader? environmentVariableReader)
{
if (process == null)
{
@@ -100,27 +98,28 @@ public override void Connect()
_hasConnected = true;
}
- private void OnLineRead(object sender, LineReadEventArgs e)
+ private void OnLineRead(object? sender, LineReadEventArgs e)
{
- Message message = null;
+ Message? message = null;
// Top-level exception handler for a worker pool thread.
try
{
- if (!IsClosed && !string.IsNullOrEmpty(e.Line))
+ string? line = e.Line;
+ if (!IsClosed && line != null && line.Length > 0)
{
if (NuGetFeatureFlags.UseSystemTextJsonDeserializationFeatureSwitch)
{
- message = System.Text.Json.JsonSerializer.Deserialize(e.Line, PluginJsonContext.Default.Message);
+ message = System.Text.Json.JsonSerializer.Deserialize(line, PluginJsonContext.Default.Message);
}
else if (NuGetFeatureFlags.IsSystemTextJsonDeserializationEnabledByEnvironment(_environmentVariableReader))
{
- message = System.Text.Json.JsonSerializer.Deserialize(e.Line, PluginJsonContext.Default.Message);
+ message = System.Text.Json.JsonSerializer.Deserialize(line, PluginJsonContext.Default.Message);
}
else
{
#pragma warning disable IL2026, IL3050 // Legacy Newtonsoft.Json code path is unreachable when feature switch is true; ILC trims this branch in AOT
- message = JsonSerializationUtilities.Deserialize(e.Line);
+ message = JsonSerializationUtilities.Deserialize(line);
#pragma warning restore IL2026, IL3050
}
diff --git a/src/NuGet.Core/NuGet.Protocol/PublicAPI/net472/PublicAPI.Shipped.txt b/src/NuGet.Core/NuGet.Protocol/PublicAPI/net472/PublicAPI.Shipped.txt
index 82367156a32..fb6555a4e3c 100644
--- a/src/NuGet.Core/NuGet.Protocol/PublicAPI/net472/PublicAPI.Shipped.txt
+++ b/src/NuGet.Core/NuGet.Protocol/PublicAPI/net472/PublicAPI.Shipped.txt
@@ -848,21 +848,21 @@ NuGet.Protocol.Plugins.AutomaticProgressReporter
NuGet.Protocol.Plugins.AutomaticProgressReporter.Dispose() -> void
NuGet.Protocol.Plugins.CloseRequestHandler
NuGet.Protocol.Plugins.CloseRequestHandler.CancellationToken.get -> System.Threading.CancellationToken
-~NuGet.Protocol.Plugins.CloseRequestHandler.CloseRequestHandler(NuGet.Protocol.Plugins.IPlugin plugin) -> void
+NuGet.Protocol.Plugins.CloseRequestHandler.CloseRequestHandler(NuGet.Protocol.Plugins.IPlugin! plugin) -> void
NuGet.Protocol.Plugins.CloseRequestHandler.Dispose() -> void
-~NuGet.Protocol.Plugins.CloseRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection connection, NuGet.Protocol.Plugins.Message request, NuGet.Protocol.Plugins.IResponseHandler responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
+NuGet.Protocol.Plugins.CloseRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection! connection, NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.IResponseHandler! responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.Connection
NuGet.Protocol.Plugins.Connection.Close() -> void
-~NuGet.Protocol.Plugins.Connection.ConnectAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.Connection.Connection(NuGet.Protocol.Plugins.IMessageDispatcher dispatcher, NuGet.Protocol.Plugins.ISender sender, NuGet.Protocol.Plugins.IReceiver receiver, NuGet.Protocol.Plugins.ConnectionOptions options) -> void
+NuGet.Protocol.Plugins.Connection.ConnectAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.Connection.Connection(NuGet.Protocol.Plugins.IMessageDispatcher! dispatcher, NuGet.Protocol.Plugins.ISender! sender, NuGet.Protocol.Plugins.IReceiver! receiver, NuGet.Protocol.Plugins.ConnectionOptions! options) -> void
NuGet.Protocol.Plugins.Connection.Dispose() -> void
-NuGet.Protocol.Plugins.Connection.Faulted -> System.EventHandler
-~NuGet.Protocol.Plugins.Connection.MessageDispatcher.get -> NuGet.Protocol.Plugins.IMessageDispatcher
-NuGet.Protocol.Plugins.Connection.MessageReceived -> System.EventHandler
-~NuGet.Protocol.Plugins.Connection.Options.get -> NuGet.Protocol.Plugins.ConnectionOptions
-~NuGet.Protocol.Plugins.Connection.ProtocolVersion.get -> NuGet.Versioning.SemanticVersion
-~NuGet.Protocol.Plugins.Connection.SendAsync(NuGet.Protocol.Plugins.Message message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.Connection.SendRequestAndReceiveResponseAsync(NuGet.Protocol.Plugins.MessageMethod method, TOutbound payload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
+NuGet.Protocol.Plugins.Connection.Faulted -> System.EventHandler?
+NuGet.Protocol.Plugins.Connection.MessageDispatcher.get -> NuGet.Protocol.Plugins.IMessageDispatcher!
+NuGet.Protocol.Plugins.Connection.MessageReceived -> System.EventHandler?
+NuGet.Protocol.Plugins.Connection.Options.get -> NuGet.Protocol.Plugins.ConnectionOptions!
+NuGet.Protocol.Plugins.Connection.ProtocolVersion.get -> NuGet.Versioning.SemanticVersion?
+NuGet.Protocol.Plugins.Connection.SendAsync(NuGet.Protocol.Plugins.Message! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.Connection.SendRequestAndReceiveResponseAsync(NuGet.Protocol.Plugins.MessageMethod method, TOutbound! payload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.Connection.State.get -> NuGet.Protocol.Plugins.ConnectionState
NuGet.Protocol.Plugins.ConnectionOptions
NuGet.Protocol.Plugins.ConnectionOptions.ConnectionOptions(NuGet.Versioning.SemanticVersion! protocolVersion, NuGet.Versioning.SemanticVersion! minimumProtocolVersion, System.TimeSpan handshakeTimeout, System.TimeSpan requestTimeout) -> void
@@ -925,11 +925,11 @@ NuGet.Protocol.Plugins.GetCredentialsRequest.GetCredentialsRequest(string! packa
NuGet.Protocol.Plugins.GetCredentialsRequest.PackageSourceRepository.get -> string!
NuGet.Protocol.Plugins.GetCredentialsRequest.StatusCode.get -> System.Net.HttpStatusCode
NuGet.Protocol.Plugins.GetCredentialsRequestHandler
-~NuGet.Protocol.Plugins.GetCredentialsRequestHandler.AddOrUpdateSourceRepository(NuGet.Protocol.Core.Types.SourceRepository sourceRepository) -> void
+NuGet.Protocol.Plugins.GetCredentialsRequestHandler.AddOrUpdateSourceRepository(NuGet.Protocol.Core.Types.SourceRepository! sourceRepository) -> void
NuGet.Protocol.Plugins.GetCredentialsRequestHandler.CancellationToken.get -> System.Threading.CancellationToken
NuGet.Protocol.Plugins.GetCredentialsRequestHandler.Dispose() -> void
-~NuGet.Protocol.Plugins.GetCredentialsRequestHandler.GetCredentialsRequestHandler(NuGet.Protocol.Plugins.IPlugin plugin, System.Net.IWebProxy proxy, NuGet.Configuration.ICredentialService credentialService) -> void
-~NuGet.Protocol.Plugins.GetCredentialsRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection connection, NuGet.Protocol.Plugins.Message request, NuGet.Protocol.Plugins.IResponseHandler responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
+NuGet.Protocol.Plugins.GetCredentialsRequestHandler.GetCredentialsRequestHandler(NuGet.Protocol.Plugins.IPlugin! plugin, System.Net.IWebProxy? proxy, NuGet.Configuration.ICredentialService? credentialService) -> void
+NuGet.Protocol.Plugins.GetCredentialsRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection! connection, NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.IResponseHandler! responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.GetCredentialsResponse
NuGet.Protocol.Plugins.GetCredentialsResponse.AuthenticationTypes.get -> System.Collections.Generic.IReadOnlyList?
NuGet.Protocol.Plugins.GetCredentialsResponse.GetCredentialsResponse(NuGet.Protocol.Plugins.MessageResponseCode responseCode, string? username, string? password, System.Collections.Generic.IReadOnlyList? authenticationTypes = null) -> void
@@ -950,8 +950,8 @@ NuGet.Protocol.Plugins.GetOperationClaimsRequest.GetOperationClaimsRequest(strin
NuGet.Protocol.Plugins.GetOperationClaimsRequest.PackageSourceRepository.get -> string?
NuGet.Protocol.Plugins.GetOperationClaimsRequest.ServiceIndex.get -> Newtonsoft.Json.Linq.JObject?
NuGet.Protocol.Plugins.GetOperationClaimsResponse
-~NuGet.Protocol.Plugins.GetOperationClaimsResponse.Claims.get -> System.Collections.Generic.IReadOnlyList
-~NuGet.Protocol.Plugins.GetOperationClaimsResponse.GetOperationClaimsResponse(System.Collections.Generic.IEnumerable claims) -> void
+NuGet.Protocol.Plugins.GetOperationClaimsResponse.Claims.get -> System.Collections.Generic.IReadOnlyList!
+NuGet.Protocol.Plugins.GetOperationClaimsResponse.GetOperationClaimsResponse(System.Collections.Generic.IEnumerable! claims) -> void
NuGet.Protocol.Plugins.GetPackageHashRequest
NuGet.Protocol.Plugins.GetPackageHashRequest.GetPackageHashRequest(string! packageSourceRepository, string! packageId, string! packageVersion, string! hashAlgorithm) -> void
NuGet.Protocol.Plugins.GetPackageHashRequest.HashAlgorithm.get -> string!
@@ -974,32 +974,32 @@ NuGet.Protocol.Plugins.GetServiceIndexRequest
NuGet.Protocol.Plugins.GetServiceIndexRequest.GetServiceIndexRequest(string! packageSourceRepository) -> void
NuGet.Protocol.Plugins.GetServiceIndexRequest.PackageSourceRepository.get -> string!
NuGet.Protocol.Plugins.GetServiceIndexRequestHandler
-~NuGet.Protocol.Plugins.GetServiceIndexRequestHandler.AddOrUpdateSourceRepository(NuGet.Protocol.Core.Types.SourceRepository sourceRepository) -> void
+NuGet.Protocol.Plugins.GetServiceIndexRequestHandler.AddOrUpdateSourceRepository(NuGet.Protocol.Core.Types.SourceRepository! sourceRepository) -> void
NuGet.Protocol.Plugins.GetServiceIndexRequestHandler.CancellationToken.get -> System.Threading.CancellationToken
NuGet.Protocol.Plugins.GetServiceIndexRequestHandler.Dispose() -> void
-~NuGet.Protocol.Plugins.GetServiceIndexRequestHandler.GetServiceIndexRequestHandler(NuGet.Protocol.Plugins.IPlugin plugin) -> void
-~NuGet.Protocol.Plugins.GetServiceIndexRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection connection, NuGet.Protocol.Plugins.Message request, NuGet.Protocol.Plugins.IResponseHandler responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
+NuGet.Protocol.Plugins.GetServiceIndexRequestHandler.GetServiceIndexRequestHandler(NuGet.Protocol.Plugins.IPlugin! plugin) -> void
+NuGet.Protocol.Plugins.GetServiceIndexRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection! connection, NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.IResponseHandler! responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.GetServiceIndexResponse
NuGet.Protocol.Plugins.GetServiceIndexResponse.GetServiceIndexResponse(NuGet.Protocol.Plugins.MessageResponseCode responseCode, Newtonsoft.Json.Linq.JObject? serviceIndex) -> void
NuGet.Protocol.Plugins.GetServiceIndexResponse.ResponseCode.get -> NuGet.Protocol.Plugins.MessageResponseCode
NuGet.Protocol.Plugins.GetServiceIndexResponse.ServiceIndex.get -> Newtonsoft.Json.Linq.JObject?
NuGet.Protocol.Plugins.HandshakeRequest
-~NuGet.Protocol.Plugins.HandshakeRequest.HandshakeRequest(NuGet.Versioning.SemanticVersion protocolVersion, NuGet.Versioning.SemanticVersion minimumProtocolVersion) -> void
-~NuGet.Protocol.Plugins.HandshakeRequest.MinimumProtocolVersion.get -> NuGet.Versioning.SemanticVersion
-~NuGet.Protocol.Plugins.HandshakeRequest.ProtocolVersion.get -> NuGet.Versioning.SemanticVersion
+NuGet.Protocol.Plugins.HandshakeRequest.HandshakeRequest(NuGet.Versioning.SemanticVersion! protocolVersion, NuGet.Versioning.SemanticVersion! minimumProtocolVersion) -> void
+NuGet.Protocol.Plugins.HandshakeRequest.MinimumProtocolVersion.get -> NuGet.Versioning.SemanticVersion!
+NuGet.Protocol.Plugins.HandshakeRequest.ProtocolVersion.get -> NuGet.Versioning.SemanticVersion!
NuGet.Protocol.Plugins.HandshakeResponse
NuGet.Protocol.Plugins.HandshakeResponse.HandshakeResponse(NuGet.Protocol.Plugins.MessageResponseCode responseCode, NuGet.Versioning.SemanticVersion? protocolVersion) -> void
NuGet.Protocol.Plugins.HandshakeResponse.ProtocolVersion.get -> NuGet.Versioning.SemanticVersion?
NuGet.Protocol.Plugins.HandshakeResponse.ResponseCode.get -> NuGet.Protocol.Plugins.MessageResponseCode
NuGet.Protocol.Plugins.IConnection
NuGet.Protocol.Plugins.IConnection.Close() -> void
-NuGet.Protocol.Plugins.IConnection.Faulted -> System.EventHandler!
+NuGet.Protocol.Plugins.IConnection.Faulted -> System.EventHandler?
NuGet.Protocol.Plugins.IConnection.MessageDispatcher.get -> NuGet.Protocol.Plugins.IMessageDispatcher!
-NuGet.Protocol.Plugins.IConnection.MessageReceived -> System.EventHandler!
+NuGet.Protocol.Plugins.IConnection.MessageReceived -> System.EventHandler?
NuGet.Protocol.Plugins.IConnection.Options.get -> NuGet.Protocol.Plugins.ConnectionOptions!
NuGet.Protocol.Plugins.IConnection.ProtocolVersion.get -> NuGet.Versioning.SemanticVersion?
NuGet.Protocol.Plugins.IConnection.SendAsync(NuGet.Protocol.Plugins.Message! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
-NuGet.Protocol.Plugins.IConnection.SendRequestAndReceiveResponseAsync(NuGet.Protocol.Plugins.MessageMethod method, TOutbound! payload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.IConnection.SendRequestAndReceiveResponseAsync(NuGet.Protocol.Plugins.MessageMethod method, TOutbound! payload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.IIdGenerator
NuGet.Protocol.Plugins.IIdGenerator.GenerateUniqueId() -> string!
NuGet.Protocol.Plugins.IMessageDispatcher
@@ -1009,14 +1009,14 @@ NuGet.Protocol.Plugins.IMessageDispatcher.CreateMessage(NuGet.Protocol
NuGet.Protocol.Plugins.IMessageDispatcher.DispatchCancelAsync(NuGet.Protocol.Plugins.Message! request, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.IMessageDispatcher.DispatchFaultAsync(NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.Fault! fault, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.IMessageDispatcher.DispatchProgressAsync(NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.Progress! progress, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
-NuGet.Protocol.Plugins.IMessageDispatcher.DispatchRequestAsync(NuGet.Protocol.Plugins.MessageMethod method, TOutbound! payload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.IMessageDispatcher.DispatchRequestAsync(NuGet.Protocol.Plugins.MessageMethod method, TOutbound! payload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.IMessageDispatcher.DispatchResponseAsync(NuGet.Protocol.Plugins.Message! request, TOutbound! responsePayload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.IMessageDispatcher.RequestHandlers.get -> NuGet.Protocol.Plugins.IRequestHandlers!
NuGet.Protocol.Plugins.IMessageDispatcher.SetConnection(NuGet.Protocol.Plugins.IConnection? connection) -> void
NuGet.Protocol.Plugins.IPlugin
-NuGet.Protocol.Plugins.IPlugin.BeforeClose -> System.EventHandler!
+NuGet.Protocol.Plugins.IPlugin.BeforeClose -> System.EventHandler?
NuGet.Protocol.Plugins.IPlugin.Close() -> void
-NuGet.Protocol.Plugins.IPlugin.Closed -> System.EventHandler!
+NuGet.Protocol.Plugins.IPlugin.Closed -> System.EventHandler?
NuGet.Protocol.Plugins.IPlugin.Connection.get -> NuGet.Protocol.Plugins.IConnection!
NuGet.Protocol.Plugins.IPlugin.FilePath.get -> string!
NuGet.Protocol.Plugins.IPlugin.Id.get -> string!
@@ -1026,7 +1026,7 @@ NuGet.Protocol.Plugins.IPluginDiscoverer.DiscoverAsync(System.Threading.Cancella
NuGet.Protocol.Plugins.IPluginManager
NuGet.Protocol.Plugins.IPluginManager.CreatePluginsAsync(NuGet.Protocol.Core.Types.SourceRepository! source, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
NuGet.Protocol.Plugins.IPluginManager.FindAvailablePluginsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
-NuGet.Protocol.Plugins.IPluginManager.TryGetSourceAgnosticPluginAsync(NuGet.Protocol.Plugins.PluginDiscoveryResult! pluginDiscoveryResult, NuGet.Protocol.Plugins.OperationClaim requestedOperationClaim, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+NuGet.Protocol.Plugins.IPluginManager.TryGetSourceAgnosticPluginAsync(NuGet.Protocol.Plugins.PluginDiscoveryResult! pluginDiscoveryResult, NuGet.Protocol.Plugins.OperationClaim requestedOperationClaim, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
NuGet.Protocol.Plugins.IPluginMulticlientUtilities
NuGet.Protocol.Plugins.IPluginMulticlientUtilities.DoOncePerPluginLifetimeAsync(string! key, System.Func! taskFunc, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.IPluginProcess
@@ -1040,8 +1040,8 @@ NuGet.Protocol.Plugins.IPluginProcess.LineRead -> System.EventHandler void
NuGet.Protocol.Plugins.IReceiver.Connect() -> void
-NuGet.Protocol.Plugins.IReceiver.Faulted -> System.EventHandler!
-NuGet.Protocol.Plugins.IReceiver.MessageReceived -> System.EventHandler!
+NuGet.Protocol.Plugins.IReceiver.Faulted -> System.EventHandler?
+NuGet.Protocol.Plugins.IReceiver.MessageReceived -> System.EventHandler?
NuGet.Protocol.Plugins.IRequestHandler
NuGet.Protocol.Plugins.IRequestHandler.CancellationToken.get -> System.Threading.CancellationToken
NuGet.Protocol.Plugins.IRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection! connection, NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.IResponseHandler! responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
@@ -1057,12 +1057,12 @@ NuGet.Protocol.Plugins.ISender.Close() -> void
NuGet.Protocol.Plugins.ISender.Connect() -> void
NuGet.Protocol.Plugins.ISender.SendAsync(NuGet.Protocol.Plugins.Message! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.InboundRequestContext
-~NuGet.Protocol.Plugins.InboundRequestContext.BeginFaultAsync(NuGet.Protocol.Plugins.Message request, System.Exception exception) -> void
-~NuGet.Protocol.Plugins.InboundRequestContext.BeginResponseAsync(NuGet.Protocol.Plugins.Message request, NuGet.Protocol.Plugins.IRequestHandler requestHandler, NuGet.Protocol.Plugins.IResponseHandler responseHandler) -> void
+NuGet.Protocol.Plugins.InboundRequestContext.BeginFaultAsync(NuGet.Protocol.Plugins.Message! request, System.Exception! exception) -> void
+NuGet.Protocol.Plugins.InboundRequestContext.BeginResponseAsync(NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.IRequestHandler! requestHandler, NuGet.Protocol.Plugins.IResponseHandler! responseHandler) -> void
NuGet.Protocol.Plugins.InboundRequestContext.Cancel() -> void
NuGet.Protocol.Plugins.InboundRequestContext.Dispose() -> void
-~NuGet.Protocol.Plugins.InboundRequestContext.InboundRequestContext(NuGet.Protocol.Plugins.IConnection connection, string requestId, System.Threading.CancellationToken cancellationToken) -> void
-~NuGet.Protocol.Plugins.InboundRequestContext.RequestId.get -> string
+NuGet.Protocol.Plugins.InboundRequestContext.InboundRequestContext(NuGet.Protocol.Plugins.IConnection! connection, string! requestId, System.Threading.CancellationToken cancellationToken) -> void
+NuGet.Protocol.Plugins.InboundRequestContext.RequestId.get -> string!
NuGet.Protocol.Plugins.InitializeRequest
NuGet.Protocol.Plugins.InitializeRequest.ClientVersion.get -> string!
NuGet.Protocol.Plugins.InitializeRequest.Culture.get -> string!
@@ -1081,9 +1081,9 @@ NuGet.Protocol.Plugins.LogRequest.LogRequest(NuGet.Common.LogLevel logLevel, str
NuGet.Protocol.Plugins.LogRequest.Message.get -> string!
NuGet.Protocol.Plugins.LogRequestHandler
NuGet.Protocol.Plugins.LogRequestHandler.CancellationToken.get -> System.Threading.CancellationToken
-~NuGet.Protocol.Plugins.LogRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection connection, NuGet.Protocol.Plugins.Message request, NuGet.Protocol.Plugins.IResponseHandler responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.LogRequestHandler.LogRequestHandler(NuGet.Common.ILogger logger) -> void
-~NuGet.Protocol.Plugins.LogRequestHandler.SetLogger(NuGet.Common.ILogger logger) -> void
+NuGet.Protocol.Plugins.LogRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection! connection, NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.IResponseHandler! responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.LogRequestHandler.LogRequestHandler(NuGet.Common.ILogger! logger) -> void
+NuGet.Protocol.Plugins.LogRequestHandler.SetLogger(NuGet.Common.ILogger! logger) -> void
NuGet.Protocol.Plugins.LogResponse
NuGet.Protocol.Plugins.LogResponse.LogResponse(NuGet.Protocol.Plugins.MessageResponseCode responseCode) -> void
NuGet.Protocol.Plugins.LogResponse.ResponseCode.get -> NuGet.Protocol.Plugins.MessageResponseCode
@@ -1095,17 +1095,17 @@ NuGet.Protocol.Plugins.Message.RequestId.get -> string!
NuGet.Protocol.Plugins.Message.Type.get -> NuGet.Protocol.Plugins.MessageType
NuGet.Protocol.Plugins.MessageDispatcher
NuGet.Protocol.Plugins.MessageDispatcher.Close() -> void
-~NuGet.Protocol.Plugins.MessageDispatcher.CreateMessage(NuGet.Protocol.Plugins.MessageType type, NuGet.Protocol.Plugins.MessageMethod method) -> NuGet.Protocol.Plugins.Message
-~NuGet.Protocol.Plugins.MessageDispatcher.CreateMessage(NuGet.Protocol.Plugins.MessageType type, NuGet.Protocol.Plugins.MessageMethod method, TPayload payload) -> NuGet.Protocol.Plugins.Message
-~NuGet.Protocol.Plugins.MessageDispatcher.DispatchCancelAsync(NuGet.Protocol.Plugins.Message request, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.MessageDispatcher.DispatchFaultAsync(NuGet.Protocol.Plugins.Message request, NuGet.Protocol.Plugins.Fault fault, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.MessageDispatcher.DispatchProgressAsync(NuGet.Protocol.Plugins.Message request, NuGet.Protocol.Plugins.Progress progress, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.MessageDispatcher.DispatchRequestAsync(NuGet.Protocol.Plugins.MessageMethod method, TOutbound payload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.MessageDispatcher.DispatchResponseAsync(NuGet.Protocol.Plugins.Message request, TOutbound responsePayload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
+NuGet.Protocol.Plugins.MessageDispatcher.CreateMessage(NuGet.Protocol.Plugins.MessageType type, NuGet.Protocol.Plugins.MessageMethod method) -> NuGet.Protocol.Plugins.Message!
+NuGet.Protocol.Plugins.MessageDispatcher.CreateMessage(NuGet.Protocol.Plugins.MessageType type, NuGet.Protocol.Plugins.MessageMethod method, TPayload! payload) -> NuGet.Protocol.Plugins.Message!
+NuGet.Protocol.Plugins.MessageDispatcher.DispatchCancelAsync(NuGet.Protocol.Plugins.Message! request, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.MessageDispatcher.DispatchFaultAsync(NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.Fault! fault, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.MessageDispatcher.DispatchProgressAsync(NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.Progress! progress, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.MessageDispatcher.DispatchRequestAsync(NuGet.Protocol.Plugins.MessageMethod method, TOutbound! payload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.MessageDispatcher.DispatchResponseAsync(NuGet.Protocol.Plugins.Message! request, TOutbound! responsePayload, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.MessageDispatcher.Dispose() -> void
-~NuGet.Protocol.Plugins.MessageDispatcher.MessageDispatcher(NuGet.Protocol.Plugins.IRequestHandlers requestHandlers, NuGet.Protocol.Plugins.IIdGenerator idGenerator) -> void
-~NuGet.Protocol.Plugins.MessageDispatcher.RequestHandlers.get -> NuGet.Protocol.Plugins.IRequestHandlers
-~NuGet.Protocol.Plugins.MessageDispatcher.SetConnection(NuGet.Protocol.Plugins.IConnection connection) -> void
+NuGet.Protocol.Plugins.MessageDispatcher.MessageDispatcher(NuGet.Protocol.Plugins.IRequestHandlers! requestHandlers, NuGet.Protocol.Plugins.IIdGenerator! idGenerator) -> void
+NuGet.Protocol.Plugins.MessageDispatcher.RequestHandlers.get -> NuGet.Protocol.Plugins.IRequestHandlers!
+NuGet.Protocol.Plugins.MessageDispatcher.SetConnection(NuGet.Protocol.Plugins.IConnection? connection) -> void
NuGet.Protocol.Plugins.MessageEventArgs
NuGet.Protocol.Plugins.MessageEventArgs.Message.get -> NuGet.Protocol.Plugins.Message!
NuGet.Protocol.Plugins.MessageEventArgs.MessageEventArgs(NuGet.Protocol.Plugins.Message! message) -> void
@@ -1145,21 +1145,21 @@ NuGet.Protocol.Plugins.MonitorNuGetProcessExitRequest.ProcessId.get -> int
NuGet.Protocol.Plugins.MonitorNuGetProcessExitRequestHandler
NuGet.Protocol.Plugins.MonitorNuGetProcessExitRequestHandler.CancellationToken.get -> System.Threading.CancellationToken
NuGet.Protocol.Plugins.MonitorNuGetProcessExitRequestHandler.Dispose() -> void
-~NuGet.Protocol.Plugins.MonitorNuGetProcessExitRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection connection, NuGet.Protocol.Plugins.Message request, NuGet.Protocol.Plugins.IResponseHandler responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.MonitorNuGetProcessExitRequestHandler.MonitorNuGetProcessExitRequestHandler(NuGet.Protocol.Plugins.IPlugin plugin) -> void
+NuGet.Protocol.Plugins.MonitorNuGetProcessExitRequestHandler.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection! connection, NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.IResponseHandler! responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.MonitorNuGetProcessExitRequestHandler.MonitorNuGetProcessExitRequestHandler(NuGet.Protocol.Plugins.IPlugin! plugin) -> void
NuGet.Protocol.Plugins.MonitorNuGetProcessExitResponse
NuGet.Protocol.Plugins.MonitorNuGetProcessExitResponse.MonitorNuGetProcessExitResponse(NuGet.Protocol.Plugins.MessageResponseCode responseCode) -> void
NuGet.Protocol.Plugins.MonitorNuGetProcessExitResponse.ResponseCode.get -> NuGet.Protocol.Plugins.MessageResponseCode
NuGet.Protocol.Plugins.NoOpDisposePlugin
-NuGet.Protocol.Plugins.NoOpDisposePlugin.BeforeClose -> System.EventHandler
+NuGet.Protocol.Plugins.NoOpDisposePlugin.BeforeClose -> System.EventHandler?
NuGet.Protocol.Plugins.NoOpDisposePlugin.Close() -> void
-NuGet.Protocol.Plugins.NoOpDisposePlugin.Closed -> System.EventHandler
-~NuGet.Protocol.Plugins.NoOpDisposePlugin.Connection.get -> NuGet.Protocol.Plugins.IConnection
+NuGet.Protocol.Plugins.NoOpDisposePlugin.Closed -> System.EventHandler?
+NuGet.Protocol.Plugins.NoOpDisposePlugin.Connection.get -> NuGet.Protocol.Plugins.IConnection!
NuGet.Protocol.Plugins.NoOpDisposePlugin.Dispose() -> void
-~NuGet.Protocol.Plugins.NoOpDisposePlugin.FilePath.get -> string
-~NuGet.Protocol.Plugins.NoOpDisposePlugin.Id.get -> string
-~NuGet.Protocol.Plugins.NoOpDisposePlugin.Name.get -> string
-~NuGet.Protocol.Plugins.NoOpDisposePlugin.NoOpDisposePlugin(NuGet.Protocol.Plugins.IPlugin plugin) -> void
+NuGet.Protocol.Plugins.NoOpDisposePlugin.FilePath.get -> string!
+NuGet.Protocol.Plugins.NoOpDisposePlugin.Id.get -> string!
+NuGet.Protocol.Plugins.NoOpDisposePlugin.Name.get -> string!
+NuGet.Protocol.Plugins.NoOpDisposePlugin.NoOpDisposePlugin(NuGet.Protocol.Plugins.IPlugin! plugin) -> void
NuGet.Protocol.Plugins.OperationClaim
NuGet.Protocol.Plugins.OperationClaim.Authentication = 1 -> NuGet.Protocol.Plugins.OperationClaim
NuGet.Protocol.Plugins.OperationClaim.DownloadPackage = 0 -> NuGet.Protocol.Plugins.OperationClaim
@@ -1168,24 +1168,24 @@ NuGet.Protocol.Plugins.OutboundRequestContext.CancellationToken.get -> System.Th
NuGet.Protocol.Plugins.OutboundRequestContext.CancellationToken.set -> void
NuGet.Protocol.Plugins.OutboundRequestContext.Dispose() -> void
NuGet.Protocol.Plugins.OutboundRequestContext.OutboundRequestContext() -> void
-~NuGet.Protocol.Plugins.OutboundRequestContext.RequestId.get -> string
-~NuGet.Protocol.Plugins.OutboundRequestContext.RequestId.set -> void
+NuGet.Protocol.Plugins.OutboundRequestContext.RequestId.get -> string!
+NuGet.Protocol.Plugins.OutboundRequestContext.RequestId.set -> void
NuGet.Protocol.Plugins.OutboundRequestContext
-~NuGet.Protocol.Plugins.OutboundRequestContext.CompletionTask.get -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.OutboundRequestContext.OutboundRequestContext(NuGet.Protocol.Plugins.IConnection connection, NuGet.Protocol.Plugins.Message request, System.TimeSpan? timeout, bool isKeepAlive, System.Threading.CancellationToken cancellationToken) -> void
+NuGet.Protocol.Plugins.OutboundRequestContext.CompletionTask.get -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.OutboundRequestContext.OutboundRequestContext(NuGet.Protocol.Plugins.IConnection! connection, NuGet.Protocol.Plugins.Message! request, System.TimeSpan? timeout, bool isKeepAlive, System.Threading.CancellationToken cancellationToken) -> void
NuGet.Protocol.Plugins.Plugin
-NuGet.Protocol.Plugins.Plugin.BeforeClose -> System.EventHandler
+NuGet.Protocol.Plugins.Plugin.BeforeClose -> System.EventHandler?
NuGet.Protocol.Plugins.Plugin.Close() -> void
-NuGet.Protocol.Plugins.Plugin.Closed -> System.EventHandler
-~NuGet.Protocol.Plugins.Plugin.Connection.get -> NuGet.Protocol.Plugins.IConnection
+NuGet.Protocol.Plugins.Plugin.Closed -> System.EventHandler?
+NuGet.Protocol.Plugins.Plugin.Connection.get -> NuGet.Protocol.Plugins.IConnection!
NuGet.Protocol.Plugins.Plugin.Dispose() -> void
-NuGet.Protocol.Plugins.Plugin.Exited -> System.EventHandler
-NuGet.Protocol.Plugins.Plugin.Faulted -> System.EventHandler
-~NuGet.Protocol.Plugins.Plugin.FilePath.get -> string
-~NuGet.Protocol.Plugins.Plugin.Id.get -> string
-NuGet.Protocol.Plugins.Plugin.Idle -> System.EventHandler
-~NuGet.Protocol.Plugins.Plugin.Name.get -> string
-~NuGet.Protocol.Plugins.Plugin.Plugin(string filePath, NuGet.Protocol.Plugins.IConnection connection, NuGet.Protocol.Plugins.IPluginProcess process, bool isOwnProcess, System.TimeSpan idleTimeout) -> void
+NuGet.Protocol.Plugins.Plugin.Exited -> System.EventHandler?
+NuGet.Protocol.Plugins.Plugin.Faulted -> System.EventHandler?
+NuGet.Protocol.Plugins.Plugin.FilePath.get -> string!
+NuGet.Protocol.Plugins.Plugin.Id.get -> string!
+NuGet.Protocol.Plugins.Plugin.Idle -> System.EventHandler?
+NuGet.Protocol.Plugins.Plugin.Name.get -> string!
+NuGet.Protocol.Plugins.Plugin.Plugin(string! filePath, NuGet.Protocol.Plugins.IConnection! connection, NuGet.Protocol.Plugins.IPluginProcess! process, bool isOwnProcess, System.TimeSpan idleTimeout) -> void
NuGet.Protocol.Plugins.PluginCacheEntry
NuGet.Protocol.Plugins.PluginCacheEntry.LoadFromFile() -> void
NuGet.Protocol.Plugins.PluginCacheEntry.OperationClaims.get -> System.Collections.Generic.IReadOnlyList?
@@ -1203,7 +1203,7 @@ NuGet.Protocol.Plugins.PluginCreationResult.PluginCreationResult(string! message
NuGet.Protocol.Plugins.PluginCreationResult.PluginCreationResult(string! message, System.Exception! exception) -> void
NuGet.Protocol.Plugins.PluginCreationResult.PluginMulticlientUtilities.get -> NuGet.Protocol.Plugins.IPluginMulticlientUtilities?
NuGet.Protocol.Plugins.PluginDiscoverer
-~NuGet.Protocol.Plugins.PluginDiscoverer.DiscoverAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
+NuGet.Protocol.Plugins.PluginDiscoverer.DiscoverAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
NuGet.Protocol.Plugins.PluginDiscoverer.Dispose() -> void
NuGet.Protocol.Plugins.PluginDiscoverer.PluginDiscoverer() -> void
NuGet.Protocol.Plugins.PluginDiscoveryResult
@@ -1230,39 +1230,39 @@ NuGet.Protocol.Plugins.PluginFileState.InvalidFilePath = 2 -> NuGet.Protocol.Plu
NuGet.Protocol.Plugins.PluginFileState.NotFound = 1 -> NuGet.Protocol.Plugins.PluginFileState
NuGet.Protocol.Plugins.PluginFileState.Valid = 0 -> NuGet.Protocol.Plugins.PluginFileState
NuGet.Protocol.Plugins.PluginManager
-~NuGet.Protocol.Plugins.PluginManager.CreatePluginsAsync(NuGet.Protocol.Core.Types.SourceRepository source, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
+NuGet.Protocol.Plugins.PluginManager.CreatePluginsAsync(NuGet.Protocol.Core.Types.SourceRepository! source, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
NuGet.Protocol.Plugins.PluginManager.Dispose() -> void
-~NuGet.Protocol.Plugins.PluginManager.EnvironmentVariableReader.get -> NuGet.Common.IEnvironmentVariableReader
-~NuGet.Protocol.Plugins.PluginManager.FindAvailablePluginsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~NuGet.Protocol.Plugins.PluginManager.PluginManager(NuGet.Common.IEnvironmentVariableReader reader, System.Lazy pluginDiscoverer, System.Func pluginFactoryCreator, System.Lazy pluginsCacheDirectoryPath) -> void
-~NuGet.Protocol.Plugins.PluginManager.TryGetSourceAgnosticPluginAsync(NuGet.Protocol.Plugins.PluginDiscoveryResult pluginDiscoveryResult, NuGet.Protocol.Plugins.OperationClaim requestedOperationClaim, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
+NuGet.Protocol.Plugins.PluginManager.EnvironmentVariableReader.get -> NuGet.Common.IEnvironmentVariableReader!
+NuGet.Protocol.Plugins.PluginManager.FindAvailablePluginsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+NuGet.Protocol.Plugins.PluginManager.PluginManager(NuGet.Common.IEnvironmentVariableReader! reader, System.Lazy! pluginDiscoverer, System.Func! pluginFactoryCreator, System.Lazy! pluginsCacheDirectoryPath) -> void
+NuGet.Protocol.Plugins.PluginManager.TryGetSourceAgnosticPluginAsync(NuGet.Protocol.Plugins.PluginDiscoveryResult! pluginDiscoveryResult, NuGet.Protocol.Plugins.OperationClaim requestedOperationClaim, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
NuGet.Protocol.Plugins.PluginMulticlientUtilities
-~NuGet.Protocol.Plugins.PluginMulticlientUtilities.DoOncePerPluginLifetimeAsync(string key, System.Func taskFunc, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
+NuGet.Protocol.Plugins.PluginMulticlientUtilities.DoOncePerPluginLifetimeAsync(string! key, System.Func! taskFunc, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
NuGet.Protocol.Plugins.PluginMulticlientUtilities.PluginMulticlientUtilities() -> void
NuGet.Protocol.Plugins.PluginPackageDownloader
-~NuGet.Protocol.Plugins.PluginPackageDownloader.ContentReader.get -> NuGet.Packaging.IAsyncPackageContentReader
-~NuGet.Protocol.Plugins.PluginPackageDownloader.CopyNupkgFileToAsync(string destinationFilePath, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.PluginPackageDownloader.CoreReader.get -> NuGet.Packaging.Core.IAsyncPackageCoreReader
+NuGet.Protocol.Plugins.PluginPackageDownloader.ContentReader.get -> NuGet.Packaging.IAsyncPackageContentReader!
+NuGet.Protocol.Plugins.PluginPackageDownloader.CopyNupkgFileToAsync(string! destinationFilePath, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.PluginPackageDownloader.CoreReader.get -> NuGet.Packaging.Core.IAsyncPackageCoreReader!
NuGet.Protocol.Plugins.PluginPackageDownloader.Dispose() -> void
-~NuGet.Protocol.Plugins.PluginPackageDownloader.GetPackageHashAsync(string hashAlgorithm, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.PluginPackageDownloader.PluginPackageDownloader(NuGet.Protocol.Plugins.IPlugin plugin, NuGet.Packaging.Core.PackageIdentity packageIdentity, NuGet.Protocol.Plugins.PluginPackageReader packageReader, string packageSourceRepository) -> void
-~NuGet.Protocol.Plugins.PluginPackageDownloader.SetExceptionHandler(System.Func> handleExceptionAsync) -> void
-~NuGet.Protocol.Plugins.PluginPackageDownloader.SetThrottle(System.Threading.SemaphoreSlim throttle) -> void
-~NuGet.Protocol.Plugins.PluginPackageDownloader.SignedPackageReader.get -> NuGet.Packaging.Signing.ISignedPackageReader
-~NuGet.Protocol.Plugins.PluginPackageDownloader.Source.get -> string
+NuGet.Protocol.Plugins.PluginPackageDownloader.GetPackageHashAsync(string! hashAlgorithm, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.PluginPackageDownloader.PluginPackageDownloader(NuGet.Protocol.Plugins.IPlugin! plugin, NuGet.Packaging.Core.PackageIdentity! packageIdentity, NuGet.Protocol.Plugins.PluginPackageReader! packageReader, string! packageSourceRepository) -> void
+NuGet.Protocol.Plugins.PluginPackageDownloader.SetExceptionHandler(System.Func!>! handleExceptionAsync) -> void
+NuGet.Protocol.Plugins.PluginPackageDownloader.SetThrottle(System.Threading.SemaphoreSlim? throttle) -> void
+NuGet.Protocol.Plugins.PluginPackageDownloader.SignedPackageReader.get -> NuGet.Packaging.Signing.ISignedPackageReader!
+NuGet.Protocol.Plugins.PluginPackageDownloader.Source.get -> string!
NuGet.Protocol.Plugins.PluginPackageReader
-~NuGet.Protocol.Plugins.PluginPackageReader.PluginPackageReader(NuGet.Protocol.Plugins.IPlugin plugin, NuGet.Packaging.Core.PackageIdentity packageIdentity, string packageSourceRepository) -> void
+NuGet.Protocol.Plugins.PluginPackageReader.PluginPackageReader(NuGet.Protocol.Plugins.IPlugin! plugin, NuGet.Packaging.Core.PackageIdentity! packageIdentity, string! packageSourceRepository) -> void
NuGet.Protocol.Plugins.PluginProcess
NuGet.Protocol.Plugins.PluginProcess.BeginReadLine() -> void
NuGet.Protocol.Plugins.PluginProcess.CancelRead() -> void
NuGet.Protocol.Plugins.PluginProcess.Dispose() -> void
NuGet.Protocol.Plugins.PluginProcess.ExitCode.get -> int?
-NuGet.Protocol.Plugins.PluginProcess.Exited -> System.EventHandler
+NuGet.Protocol.Plugins.PluginProcess.Exited -> System.EventHandler?
NuGet.Protocol.Plugins.PluginProcess.Id.get -> int?
NuGet.Protocol.Plugins.PluginProcess.Kill() -> void
-NuGet.Protocol.Plugins.PluginProcess.LineRead -> System.EventHandler
+NuGet.Protocol.Plugins.PluginProcess.LineRead -> System.EventHandler?
NuGet.Protocol.Plugins.PluginProcess.PluginProcess() -> void
-~NuGet.Protocol.Plugins.PluginProcess.PluginProcess(System.Diagnostics.ProcessStartInfo startInfo) -> void
+NuGet.Protocol.Plugins.PluginProcess.PluginProcess(System.Diagnostics.ProcessStartInfo! startInfo) -> void
NuGet.Protocol.Plugins.PluginProcess.Start() -> void
NuGet.Protocol.Plugins.PrefetchPackageRequest
NuGet.Protocol.Plugins.PrefetchPackageRequest.PackageId.get -> string!
@@ -1286,31 +1286,31 @@ NuGet.Protocol.Plugins.ProtocolException.ProtocolException(string? message) -> v
NuGet.Protocol.Plugins.ProtocolException.ProtocolException(string? message, System.Exception? innerException) -> void
NuGet.Protocol.Plugins.Receiver
NuGet.Protocol.Plugins.Receiver.Dispose() -> void
-NuGet.Protocol.Plugins.Receiver.Faulted -> System.EventHandler
-~NuGet.Protocol.Plugins.Receiver.FireFaultEvent(System.Exception exception, NuGet.Protocol.Plugins.Message message) -> void
-~NuGet.Protocol.Plugins.Receiver.FireMessageReceivedEvent(NuGet.Protocol.Plugins.Message message) -> void
+NuGet.Protocol.Plugins.Receiver.Faulted -> System.EventHandler?
+NuGet.Protocol.Plugins.Receiver.FireFaultEvent(System.Exception! exception, NuGet.Protocol.Plugins.Message? message) -> void
+NuGet.Protocol.Plugins.Receiver.FireMessageReceivedEvent(NuGet.Protocol.Plugins.Message! message) -> void
NuGet.Protocol.Plugins.Receiver.IsClosed.get -> bool
NuGet.Protocol.Plugins.Receiver.IsDisposed.get -> bool
NuGet.Protocol.Plugins.Receiver.IsDisposed.set -> void
-NuGet.Protocol.Plugins.Receiver.MessageReceived -> System.EventHandler
+NuGet.Protocol.Plugins.Receiver.MessageReceived -> System.EventHandler?
NuGet.Protocol.Plugins.Receiver.Receiver() -> void
NuGet.Protocol.Plugins.Receiver.ThrowIfClosed() -> void
NuGet.Protocol.Plugins.Receiver.ThrowIfDisposed() -> void
NuGet.Protocol.Plugins.RequestHandlers
-~NuGet.Protocol.Plugins.RequestHandlers.AddOrUpdate(NuGet.Protocol.Plugins.MessageMethod method, System.Func addHandlerFunc, System.Func updateHandlerFunc) -> void
+NuGet.Protocol.Plugins.RequestHandlers.AddOrUpdate(NuGet.Protocol.Plugins.MessageMethod method, System.Func! addHandlerFunc, System.Func! updateHandlerFunc) -> void
NuGet.Protocol.Plugins.RequestHandlers.RequestHandlers() -> void
-~NuGet.Protocol.Plugins.RequestHandlers.TryAdd(NuGet.Protocol.Plugins.MessageMethod method, NuGet.Protocol.Plugins.IRequestHandler handler) -> bool
-~NuGet.Protocol.Plugins.RequestHandlers.TryGet(NuGet.Protocol.Plugins.MessageMethod method, out NuGet.Protocol.Plugins.IRequestHandler handler) -> bool
+NuGet.Protocol.Plugins.RequestHandlers.TryAdd(NuGet.Protocol.Plugins.MessageMethod method, NuGet.Protocol.Plugins.IRequestHandler! handler) -> bool
+NuGet.Protocol.Plugins.RequestHandlers.TryGet(NuGet.Protocol.Plugins.MessageMethod method, out NuGet.Protocol.Plugins.IRequestHandler? handler) -> bool
NuGet.Protocol.Plugins.RequestHandlers.TryRemove(NuGet.Protocol.Plugins.MessageMethod method) -> bool
NuGet.Protocol.Plugins.RequestIdGenerator
-~NuGet.Protocol.Plugins.RequestIdGenerator.GenerateUniqueId() -> string
+NuGet.Protocol.Plugins.RequestIdGenerator.GenerateUniqueId() -> string!
NuGet.Protocol.Plugins.RequestIdGenerator.RequestIdGenerator() -> void
NuGet.Protocol.Plugins.Sender
NuGet.Protocol.Plugins.Sender.Close() -> void
NuGet.Protocol.Plugins.Sender.Connect() -> void
NuGet.Protocol.Plugins.Sender.Dispose() -> void
-~NuGet.Protocol.Plugins.Sender.SendAsync(NuGet.Protocol.Plugins.Message message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.Sender.Sender(System.IO.TextWriter writer) -> void
+NuGet.Protocol.Plugins.Sender.SendAsync(NuGet.Protocol.Plugins.Message! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.Sender.Sender(System.IO.TextWriter! writer) -> void
NuGet.Protocol.Plugins.SetCredentialsRequest
NuGet.Protocol.Plugins.SetCredentialsRequest.PackageSourceRepository.get -> string!
NuGet.Protocol.Plugins.SetCredentialsRequest.Password.get -> string?
@@ -1328,15 +1328,15 @@ NuGet.Protocol.Plugins.SetLogLevelResponse
NuGet.Protocol.Plugins.SetLogLevelResponse.ResponseCode.get -> NuGet.Protocol.Plugins.MessageResponseCode
NuGet.Protocol.Plugins.SetLogLevelResponse.SetLogLevelResponse(NuGet.Protocol.Plugins.MessageResponseCode responseCode) -> void
NuGet.Protocol.Plugins.StandardInputReceiver
-~NuGet.Protocol.Plugins.StandardInputReceiver.StandardInputReceiver(System.IO.TextReader reader) -> void
+NuGet.Protocol.Plugins.StandardInputReceiver.StandardInputReceiver(System.IO.TextReader! reader) -> void
NuGet.Protocol.Plugins.StandardOutputReceiver
-~NuGet.Protocol.Plugins.StandardOutputReceiver.StandardOutputReceiver(NuGet.Protocol.Plugins.IPluginProcess process) -> void
+NuGet.Protocol.Plugins.StandardOutputReceiver.StandardOutputReceiver(NuGet.Protocol.Plugins.IPluginProcess! process) -> void
NuGet.Protocol.Plugins.SymmetricHandshake
NuGet.Protocol.Plugins.SymmetricHandshake.CancellationToken.get -> System.Threading.CancellationToken
NuGet.Protocol.Plugins.SymmetricHandshake.Dispose() -> void
-~NuGet.Protocol.Plugins.SymmetricHandshake.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection connection, NuGet.Protocol.Plugins.Message request, NuGet.Protocol.Plugins.IResponseHandler responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.SymmetricHandshake.HandshakeAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~NuGet.Protocol.Plugins.SymmetricHandshake.SymmetricHandshake(NuGet.Protocol.Plugins.IConnection connection, System.TimeSpan handshakeTimeout, NuGet.Versioning.SemanticVersion protocolVersion, NuGet.Versioning.SemanticVersion minimumProtocolVersion) -> void
+NuGet.Protocol.Plugins.SymmetricHandshake.HandleResponseAsync(NuGet.Protocol.Plugins.IConnection! connection, NuGet.Protocol.Plugins.Message! request, NuGet.Protocol.Plugins.IResponseHandler! responseHandler, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.SymmetricHandshake.HandshakeAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+NuGet.Protocol.Plugins.SymmetricHandshake.SymmetricHandshake(NuGet.Protocol.Plugins.IConnection! connection, System.TimeSpan handshakeTimeout, NuGet.Versioning.SemanticVersion! protocolVersion, NuGet.Versioning.SemanticVersion! minimumProtocolVersion) -> void
NuGet.Protocol.Plugins.TimeoutUtilities
NuGet.Protocol.ProtocolConstants
NuGet.Protocol.Providers.OwnerDetailsUriResourceV3Provider
@@ -1567,9 +1567,9 @@ abstract NuGet.Protocol.Core.Types.ResourceProvider.TryCreate(NuGet.Protocol.Cor
~abstract NuGet.Protocol.FindLocalPackagesResource.GetPackages(NuGet.Common.ILogger logger, System.Threading.CancellationToken token) -> System.Collections.Generic.IEnumerable
abstract NuGet.Protocol.Plugins.OutboundRequestContext.Dispose(bool disposing) -> void
abstract NuGet.Protocol.Plugins.OutboundRequestContext.HandleCancelResponse() -> void
-~abstract NuGet.Protocol.Plugins.OutboundRequestContext.HandleFault(NuGet.Protocol.Plugins.Message fault) -> void
-~abstract NuGet.Protocol.Plugins.OutboundRequestContext.HandleProgress(NuGet.Protocol.Plugins.Message progress) -> void
-~abstract NuGet.Protocol.Plugins.OutboundRequestContext.HandleResponse(NuGet.Protocol.Plugins.Message response) -> void
+abstract NuGet.Protocol.Plugins.OutboundRequestContext.HandleFault(NuGet.Protocol.Plugins.Message! fault) -> void
+abstract NuGet.Protocol.Plugins.OutboundRequestContext.HandleProgress(NuGet.Protocol.Plugins.Message! progress) -> void
+abstract NuGet.Protocol.Plugins.OutboundRequestContext.HandleResponse(NuGet.Protocol.Plugins.Message! response) -> void
abstract NuGet.Protocol.Plugins.Receiver.Connect() -> void
abstract NuGet.Protocol.Plugins.Receiver.Dispose(bool disposing) -> void
const NuGet.Protocol.CachingUtility.BufferSize = 8192 -> int
@@ -1785,59 +1785,59 @@ override NuGet.Protocol.NuGetVersionConverter.WriteJson(Newtonsoft.Json.JsonWrit
~override NuGet.Protocol.PackageUpdateResourceV3Provider.TryCreate(NuGet.Protocol.Core.Types.SourceRepository source, System.Threading.CancellationToken token) -> System.Threading.Tasks.Task>
~override NuGet.Protocol.PluginFindPackageByIdResourceProvider.TryCreate(NuGet.Protocol.Core.Types.SourceRepository source, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
override NuGet.Protocol.Plugins.OutboundRequestContext.HandleCancelResponse() -> void
-~override NuGet.Protocol.Plugins.OutboundRequestContext.HandleFault(NuGet.Protocol.Plugins.Message fault) -> void
-~override NuGet.Protocol.Plugins.OutboundRequestContext.HandleProgress(NuGet.Protocol.Plugins.Message progress) -> void
-~override NuGet.Protocol.Plugins.OutboundRequestContext.HandleResponse(NuGet.Protocol.Plugins.Message response) -> void
+override NuGet.Protocol.Plugins.OutboundRequestContext.HandleFault(NuGet.Protocol.Plugins.Message! fault) -> void
+override NuGet.Protocol.Plugins.OutboundRequestContext.HandleProgress(NuGet.Protocol.Plugins.Message! progress) -> void
+override NuGet.Protocol.Plugins.OutboundRequestContext.HandleResponse(NuGet.Protocol.Plugins.Message! response) -> void
override NuGet.Protocol.Plugins.PluginFile.ToString() -> string!
-~override NuGet.Protocol.Plugins.PluginPackageReader.CanVerifySignedPackages(NuGet.Packaging.Signing.SignedPackageVerifierSettings verifierSettings) -> bool
-~override NuGet.Protocol.Plugins.PluginPackageReader.CopyFiles(string destination, System.Collections.Generic.IEnumerable packageFiles, NuGet.Packaging.Core.ExtractPackageFileDelegate extractFile, NuGet.Common.ILogger logger, System.Threading.CancellationToken token) -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.CopyFilesAsync(string destination, System.Collections.Generic.IEnumerable packageFiles, NuGet.Packaging.Core.ExtractPackageFileDelegate extractFile, NuGet.Common.ILogger logger, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.CopyNupkgAsync(string nupkgFilePath, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetArchiveHashAsync(NuGet.Common.HashAlgorithmName hashAlgorithm, System.Threading.CancellationToken token) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetBuildItems() -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetBuildItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetContentHash(System.Threading.CancellationToken token, System.Func GetUnsignedPackageHash = null) -> string
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetContentItems() -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetContentItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
+override NuGet.Protocol.Plugins.PluginPackageReader.CanVerifySignedPackages(NuGet.Packaging.Signing.SignedPackageVerifierSettings! verifierSettings) -> bool
+override NuGet.Protocol.Plugins.PluginPackageReader.CopyFiles(string! destination, System.Collections.Generic.IEnumerable! packageFiles, NuGet.Packaging.Core.ExtractPackageFileDelegate! extractFile, NuGet.Common.ILogger! logger, System.Threading.CancellationToken token) -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.CopyFilesAsync(string! destination, System.Collections.Generic.IEnumerable! packageFiles, NuGet.Packaging.Core.ExtractPackageFileDelegate! extractFile, NuGet.Common.ILogger! logger, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.CopyNupkgAsync(string! nupkgFilePath, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetArchiveHashAsync(NuGet.Common.HashAlgorithmName hashAlgorithm, System.Threading.CancellationToken token) -> System.Threading.Tasks.Task!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetBuildItems() -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetBuildItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetContentHash(System.Threading.CancellationToken token, System.Func? GetUnsignedPackageHash = null) -> string!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetContentItems() -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetContentItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
override NuGet.Protocol.Plugins.PluginPackageReader.GetDevelopmentDependency() -> bool
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetDevelopmentDependencyAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetFiles() -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetFiles(string folder) -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetFilesAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetFilesAsync(string folder, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetFrameworkItems() -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetFrameworkItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetIdentity() -> NuGet.Packaging.Core.PackageIdentity
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetIdentityAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetItems(string folderName) -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetItemsAsync(string folderName, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetLibItems() -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetLibItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetMinClientVersion() -> NuGet.Versioning.NuGetVersion
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetMinClientVersionAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetNuspec() -> System.IO.Stream
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetNuspecAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetNuspecFile() -> string
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetNuspecFileAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetNuspecReaderAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetPackageDependencies() -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetPackageDependenciesAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetPackageTypes() -> System.Collections.Generic.IReadOnlyList
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetPackageTypesAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetPrimarySignatureAsync(System.Threading.CancellationToken token) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetReferenceItems() -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetReferenceItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetStream(string path) -> System.IO.Stream
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetStreamAsync(string path, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetSupportedFrameworks() -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetSupportedFrameworksAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetToolItems() -> System.Collections.Generic.IEnumerable
-~override NuGet.Protocol.Plugins.PluginPackageReader.GetToolItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task>
+override NuGet.Protocol.Plugins.PluginPackageReader.GetDevelopmentDependencyAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetFiles() -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetFiles(string! folder) -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetFilesAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetFilesAsync(string! folder, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetFrameworkItems() -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetFrameworkItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetIdentity() -> NuGet.Packaging.Core.PackageIdentity!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetIdentityAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetItems(string! folderName) -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetItemsAsync(string! folderName, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetLibItems() -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetLibItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetMinClientVersion() -> NuGet.Versioning.NuGetVersion!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetMinClientVersionAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetNuspec() -> System.IO.Stream!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetNuspecAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetNuspecFile() -> string!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetNuspecFileAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetNuspecReaderAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetPackageDependencies() -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetPackageDependenciesAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetPackageTypes() -> System.Collections.Generic.IReadOnlyList!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetPackageTypesAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetPrimarySignatureAsync(System.Threading.CancellationToken token) -> System.Threading.Tasks.Task!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetReferenceItems() -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetReferenceItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetStream(string! path) -> System.IO.Stream!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetStreamAsync(string! path, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetSupportedFrameworks() -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetSupportedFrameworksAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetToolItems() -> System.Collections.Generic.IEnumerable!
+override NuGet.Protocol.Plugins.PluginPackageReader.GetToolItemsAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!>!
override NuGet.Protocol.Plugins.PluginPackageReader.IsServiceable() -> bool
-~override NuGet.Protocol.Plugins.PluginPackageReader.IsServiceableAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
-~override NuGet.Protocol.Plugins.PluginPackageReader.IsSignedAsync(System.Threading.CancellationToken token) -> System.Threading.Tasks.Task