Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ await Task.WhenAny(
/// <param name="history">History command lines provided as references for prediction.</param>
public static void OnCommandLineAccepted(PredictionClient client, IReadOnlyList<string> history)
{
ArgumentNullException.ThrowIfNull(history);
Requires.NotNull(history, nameof(history));

var predictors = SubsystemManager.GetSubsystems<ICommandPredictor>();
if (predictors.Count == 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ public sealed class PredictionContext
/// <param name="inputTokens">The <see cref="Token"/> objects from parsing the current command line input.</param>
public PredictionContext(Ast inputAst, Token[] inputTokens)
{
ArgumentNullException.ThrowIfNull(inputAst);
ArgumentNullException.ThrowIfNull(inputTokens);
Requires.NotNull(inputAst, nameof(inputAst));
Requires.NotNull(inputTokens, nameof(inputTokens));

var cursor = inputAst.Extent.EndScriptPosition;
var astContext = CompletionAnalysis.ExtractAstContext(inputAst, inputTokens, cursor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static ReadOnlyCollection<SubsystemInfo> GetAllSubsystemInfo()
/// <returns>The <see cref="SubsystemInfo"/> object that represents the concrete subsystem.</returns>
public static SubsystemInfo GetSubsystemInfo(Type subsystemType)
{
ArgumentNullException.ThrowIfNull(subsystemType);
Requires.NotNull(subsystemType, nameof(subsystemType));

if (s_subSystemTypeMap.TryGetValue(subsystemType, out SubsystemInfo? subsystemInfo))
{
Expand Down Expand Up @@ -180,7 +180,7 @@ public static void RegisterSubsystem<TConcreteSubsystem, TImplementation>(TImple
where TConcreteSubsystem : class, ISubsystem
where TImplementation : class, TConcreteSubsystem
{
ArgumentNullException.ThrowIfNull(proxy);
Requires.NotNull(proxy, nameof(proxy));

RegisterSubsystem(GetSubsystemInfo(typeof(TConcreteSubsystem)), proxy);
}
Expand All @@ -192,7 +192,7 @@ public static void RegisterSubsystem<TConcreteSubsystem, TImplementation>(TImple
/// <param name="proxy">An instance of the implementation.</param>
public static void RegisterSubsystem(SubsystemKind kind, ISubsystem proxy)
{
ArgumentNullException.ThrowIfNull(proxy);
Requires.NotNull(proxy, nameof(proxy));

SubsystemInfo info = GetSubsystemInfo(kind);
if (!info.SubsystemType.IsAssignableFrom(proxy.GetType()))
Expand Down