ronantakizawa/codereview-bench huggingface dataset:
Repository: dotnet/roslyn
File: src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/ServerConfigurationFactory.cs (C#)

Code before:
        _globalOptionService.SetGlobalOption(LspOptionsStorage.LspUsingDevkitFeatures, isDevkitEnabled);
    }
}

internal sealed record class ServerConfiguration(
    bool LaunchDebugger,
    LogConfiguration LogConfiguration,
    string? StarredCompletionsPath,
    string? TelemetryLevel,
    string? SessionId,
    IEnumerable<string> ExtensionAssemblyPaths,
    string? DevKitDependencyPath,
    string? RazorDesignTimePath,
    string? CSharpDesignTimePath,
    string? ServerPipeName,
    bool UseStdIo,
    string ExtensionLogDirectory,
    bool AutoLoadProjects);

internal sealed class LogConfiguration
{
    private int _currentLogLevel;

    public LogConfiguration(LogLevel? initialLogLevel)
    {
        _currentLogLevel = (int)(initialLogLevel ?? LogLevel.Information);
    }

    public void UpdateLogLevel(LogLevel level)
    {
        Interlocked.Exchange(ref _currentLogLevel, (int)level);
    }

    public LogLevel GetLogLevel()
    {
        return (LogLevel)_currentLogLevel;
    }
}


Review comment (suggestion):
I'd have a slight preference for the optionalness being dealt with in Program.cs, that way the command line parsing and handling is restricted to just that file.

Code after:
        _globalOptionService.SetGlobalOption(LspOptionsStorage.LspUsingDevkitFeatures, isDevkitEnabled);
    }
}

internal sealed record class ServerConfiguration(
    bool LaunchDebugger,
    LogConfiguration LogConfiguration,
    string? StarredCompletionsPath,
    string? TelemetryLevel,
    string? SessionId,
    IEnumerable<string> ExtensionAssemblyPaths,
    string? DevKitDependencyPath,
    string? RazorDesignTimePath,
    string? CSharpDesignTimePath,
    string? ServerPipeName,
    bool UseStdIo,
    string? ExtensionLogDirectory,
    bool AutoLoadProjects);

internal sealed class LogConfiguration
{
    private int _currentLogLevel;

    public LogConfiguration(LogLevel initialLogLevel)
    {
        _currentLogLevel = (int)(initialLogLevel);
    }

    public void UpdateLogLevel(LogLevel level)
    {
        Interlocked.Exchange(ref _currentLogLevel, (int)level);
    }

    public LogLevel GetLogLevel()
    {
        return (LogLevel)_currentLogLevel;
    }
}
Repository: dotnet/roslyn
File: src/Compilers/CSharp/Test/CSharp15/ExtensionIndexersTests.cs (C#)

Code before:
            Diagnostic(ErrorCode.ERR_EscapeVariable, "span").WithArguments("span").WithLocation(5, 19));
    }

    [Fact]
    public void RefAnalysis_ObjectCreation_04()
    {
        string source = """
System.Span<byte> span = stackalloc byte[10];
_ = new S() { [span] = 42 };

S s = new S();
E.get_Item(s, span) = 42;

ref struct S { }

static class E
{
    extension(S s)
    {
        public ref int this[System.Span<byte> s2] { get => throw null; }
    }
}
""";

        var comp = CreateCompilation(source, targetFramework: TargetFramework.Net100);
        comp.VerifyEmitDiagnostics();
    }

    [Fact]
    public void RefAnalysis_ObjectCreation_05()
    {
        string source = """
_ = new S() { [GetIndex()] = GetValue() };

int GetIndex() { System.Console.Write("GetIndex "); return 0; }
int GetValue() { System.Console.Write("GetValue"); return 0; }

ref struct S { }

static class E
{
    public static int Field;

    extension(S s)
    {
        public ref int this[int i] { get { System.Console.Write("get "); return ref Field; } }
    }
}
""";

        var comp = CreateCompilation(source, targetFramework: TargetFramework.Net100);

Review comment (suggestion):
>comp.VerifyEmitDiagnostics(); [](http://example.com/codeflow?start=8&length=29)

Since the problem affected emit, consider executing and observing behavior, or asserting IL #Closed

Code after:
            Diagnostic(ErrorCode.ERR_EscapeVariable, "span").WithArguments("span").WithLocation(5, 19));
    }

    [Fact]
    public void RefAnalysis_ObjectCreation_04()
    {
        string source = """
System.Span<int> span = stackalloc int[10];
_ = new S() { [span] = 42 };
System.Console.Write(span[0]);

System.Span<int> span2 = stackalloc int[10];
S s = new S();
E.get_Item(s, span2) = 43;
System.Console.Write(span2[0]);

ref struct S { }

static class E
{
    extension(S s)
    {
        public ref int this[System.Span<int> s2] { get => ref s2[0]; }
    }
}
""";

        var comp = CreateCompilation(source, targetFramework: TargetFramework.Net100);
        CompileAndVerify(comp, expectedOutput: ExpectedOutput("4243"), verify: Verification.Skipped).VerifyDiagnostics();
    }

    [Fact]
    public void RefAnalysis_ObjectCreation_05()
    {
        string source = """
_ = new S() { [GetIndex()] = GetValue() };

int GetIndex() { System.Console.Write("GetIndex "); return 0; }
int GetValue() { System.Console.Write("GetValue"); return 0; }

ref struct S { }

static class E
{
    public static int Field;

    extension(S s)
    {
        public ref int this[int i] { get { System.Console.Write("get "); return ref Field; } }
    }
}
Repository: dotnet/roslyn
File: src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Program.cs (C#)

Code before:
    var newGuid = Guid.NewGuid().ToString();
    var pipeName = newGuid.Split('-')[0];

    return RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
        ? (WINDOWS_NODJS_PREFIX + pipeName, WINDOWS_DOTNET_PREFIX + pipeName)
        : (GetUnixTypePipeName(pipeName), GetUnixTypePipeName(pipeName));
}

static string GetUnixTypePipeName(string pipeName)
{
    // Unix-type pipes are actually writing to a file
    return Path.Combine(Path.GetTempPath(), pipeName + ".sock");
}

static async Task WaitForParentProcessExitAsync(int parentProcessId, ILogger logger)
{
    try
    {
        var parentProcess = Process.GetProcessById(parentProcessId);
        await parentProcess.WaitForExitAsync();
    }
    catch (ArgumentException)
    {
        // The process has already exited or was never running.
        logger.LogWarning("Parent process {parentProcessId} is not running", parentProcessId);
    }
}


Review comment (bug):
`Process.GetProcessById` returns a `Process` that should be disposed. Consider using a `using` declaration (or `try/finally`) around the `Process` instance, and also handling other possible failures (e.g., `InvalidOperationException`/platform-specific exceptions) so the monitoring task doesn't fault unexpectedly.

Code after:
{
    // On windows, .NET and Nodejs use different formats for the pipe name
    const string WINDOWS_NODJS_PREFIX = @"\\.\pipe\";
    const string WINDOWS_DOTNET_PREFIX = @"\\.\";

    // The pipe name constructed by some systems is very long (due to temp path).
    // Shorten the unique id for the pipe.
    var newGuid = Guid.NewGuid().ToString();
    var pipeName = newGuid.Split('-')[0];

    return RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
        ? (WINDOWS_NODJS_PREFIX + pipeName, WINDOWS_DOTNET_PREFIX + pipeName)
        : (GetUnixTypePipeName(pipeName), GetUnixTypePipeName(pipeName));
}

static string GetUnixTypePipeName(string pipeName)
{
    // Unix-type pipes are actually writing to a file
    return Path.Combine(Path.GetTempPath(), pipeName + ".sock");
}

static async Task WaitForClientProcessExitAsync(int clientProcessId, ILogger logger)
{
    try
    {
        using var clientProcess = Process.GetProcessById(clientProcessId);
        await clientProcess.WaitForExitAsync();
    }
    catch (ArgumentException)
    {
        // The process has already exited or was never running.
        logger.LogWarning("Client process {clientProcessId} is not running", clientProcessId);
    }
}
Repository: dotnet/roslyn
File: src/Compilers/CSharp/Portable/Lowering/SynthesizedMethodBaseSymbol.cs (C#)

Code before:
        {
            get { return this.TypeMap.SubstituteType(this.BaseMethod.OriginalDefinition.ReturnTypeWithAnnotations); }
        }

        public sealed override ImmutableArray<CustomModifier> RefCustomModifiers
        {
            get { return this.TypeMap.SubstituteCustomModifiers(this.BaseMethod.OriginalDefinition.RefCustomModifiers); }
        }

        public sealed override FlowAnalysisAnnotations ReturnTypeFlowAnalysisAnnotations => BaseMethod.ReturnTypeFlowAnalysisAnnotations;

        public sealed override ImmutableHashSet<string> ReturnNotNullIfParameterNotNull => BaseMethod.ReturnNotNullIfParameterNotNull;

        public sealed override FlowAnalysisAnnotations FlowAnalysisAnnotations => FlowAnalysisAnnotations.None;

        public sealed override string Name
        {
            get { return _name; }
        }

        public sealed override bool IsImplicitlyDeclared
        {
            get { return true; }
        }

        internal sealed override ThreeState IsRuntimeAsyncEnabledInMethod =>
            BaseMethod is SourceMethodSymbol { IsRuntimeAsyncEnabledInMethod: var value }
                ? value
                : ThreeState.Unknown;
    }
}


Review comment (bug):
Because this did not get propagated, methods that got lifted to closures (like a local function child of a non-runtime async lambda) did not appropriately identify themselves as runtime async, so their bodies would be rewritten with the compiler-based async rewriter and fail.

Code after:
        {
            get { return this.TypeMap.SubstituteType(this.BaseMethod.OriginalDefinition.ReturnTypeWithAnnotations); }
        }

        public sealed override ImmutableArray<CustomModifier> RefCustomModifiers
        {
            get { return this.TypeMap.SubstituteCustomModifiers(this.BaseMethod.OriginalDefinition.RefCustomModifiers); }
        }

        public sealed override FlowAnalysisAnnotations ReturnTypeFlowAnalysisAnnotations => BaseMethod.ReturnTypeFlowAnalysisAnnotations;

        public sealed override ImmutableHashSet<string> ReturnNotNullIfParameterNotNull => BaseMethod.ReturnNotNullIfParameterNotNull;

        public sealed override FlowAnalysisAnnotations FlowAnalysisAnnotations => FlowAnalysisAnnotations.None;

        public sealed override string Name
        {
            get { return _name; }
        }

        public sealed override bool IsImplicitlyDeclared
        {
            get { return true; }
        }

        internal sealed override ThreeState IsRuntimeAsyncEnabledInMethod =>
            InheritsBaseMethodAttributes && BaseMethod is SourceMethodSymbol { IsRuntimeAsyncEnabledInMethod: var value }
                ? value
                : ThreeState.Unknown;
    }
}
Repository: dotnet/roslyn
File: src/Compilers/CSharp/Portable/Lowering/SynthesizedMethodBaseSymbol.cs (C#)

Code before:
            get { return this.TypeMap.SubstituteType(this.BaseMethod.OriginalDefinition.ReturnTypeWithAnnotations); }
        }

        public sealed override ImmutableArray<CustomModifier> RefCustomModifiers
        {
            get { return this.TypeMap.SubstituteCustomModifiers(this.BaseMethod.OriginalDefinition.RefCustomModifiers); }
        }

        public sealed override FlowAnalysisAnnotations ReturnTypeFlowAnalysisAnnotations => BaseMethod.ReturnTypeFlowAnalysisAnnotations;

        public sealed override ImmutableHashSet<string> ReturnNotNullIfParameterNotNull => BaseMethod.ReturnNotNullIfParameterNotNull;

        public sealed override FlowAnalysisAnnotations FlowAnalysisAnnotations => FlowAnalysisAnnotations.None;

        public sealed override string Name
        {
            get { return _name; }
        }

        public sealed override bool IsImplicitlyDeclared
        {
            get { return true; }
        }

        internal sealed override ThreeState IsRuntimeAsyncEnabledInMethod =>
            BaseMethod is SourceMethodSymbol { IsRuntimeAsyncEnabledInMethod: var value }
                ? value
                : ThreeState.Unknown;
    }
}


Review comment (suggestion):
>BaseMethod is SourceMethodSymbol { IsRuntimeAsyncEnabledInMethod: var value } [](http://example.com/codeflow?start=12&length=77)

Perhaps this logic should be conditioned on `InheritsBaseMethodAttributes`? #Closed

Code after:
            get { return this.TypeMap.SubstituteType(this.BaseMethod.OriginalDefinition.ReturnTypeWithAnnotations); }
        }

        public sealed override ImmutableArray<CustomModifier> RefCustomModifiers
        {
            get { return this.TypeMap.SubstituteCustomModifiers(this.BaseMethod.OriginalDefinition.RefCustomModifiers); }
        }

        public sealed override FlowAnalysisAnnotations ReturnTypeFlowAnalysisAnnotations => BaseMethod.ReturnTypeFlowAnalysisAnnotations;

        public sealed override ImmutableHashSet<string> ReturnNotNullIfParameterNotNull => BaseMethod.ReturnNotNullIfParameterNotNull;

        public sealed override FlowAnalysisAnnotations FlowAnalysisAnnotations => FlowAnalysisAnnotations.None;

        public sealed override string Name
        {
            get { return _name; }
        }

        public sealed override bool IsImplicitlyDeclared
        {
            get { return true; }
        }

        internal sealed override ThreeState IsRuntimeAsyncEnabledInMethod =>
            InheritsBaseMethodAttributes && BaseMethod is SourceMethodSymbol { IsRuntimeAsyncEnabledInMethod: var value }
                ? value
                : ThreeState.Unknown;
    }
}
Repository: dotnet/roslyn
File: src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenReadonlyStructTests.cs (C#)

Code before:
  IL_0010:  call       ""void System.Console.Write(object)""
  IL_0015:  ldarg.0
  IL_0016:  constrained. ""Program.S1""
  IL_001c:  callvirt   ""string object.ToString()""
  IL_0021:  call       ""void System.Console.Write(string)""
  IL_0026:  ret
}");
        }

        [Fact, WorkItem(76288, "https://github.com/dotnet/roslyn/issues/76288")]
        public void NoDefensiveCopy_ReadonlyStructField_ConstrainedCall()
        {
            var text = @"
struct X
{
    private Y a;
    public readonly string W() => a.ToString();
}

readonly struct Y
{
}
";
            var comp = CreateCompilation(text, options: TestOptions.ReleaseDll);
            comp.VerifyDiagnostics(
                // (4,15): warning CS0649: Field 'X.a' is never assigned to, and will always have its default value
                //     private Y a;
                Diagnostic(ErrorCode.WRN_UnassignedInternalField, "a").WithArguments("X.a", "").WithLocation(4, 15));
            var compVerifier = CompileAndVerify(comp, verify: Verification.Passes);
            compVerifier.VerifyIL("X.W()", @"
{
  // Code size       18 (0x12)
  .maxstack  1
  IL_0000:  ldarg.0
  IL_0001:  ldflda     ""Y X.a""
  IL_0006:  constrained. ""Y""
  IL_000c:  callvirt   ""string object.ToString()""
  IL_0011:  ret
}
");
        }

        [Fact]
        public void AssignThis()
        {
            var text = @"
class Program
{
    static void Main()
    {
        S1 v = new S1(42);

Review comment (suggestion):
>// (4,15): warning CS0649: Field 'X.a' is never assigned to, and will always have its default value [](http://example.com/codeflow?start=16&length=99)

Consider suppressing the warning with ```#pragma``` #Closed

Code after:
  IL_0010:  call       ""void System.Console.Write(object)""
  IL_0015:  ldarg.0
  IL_0016:  constrained. ""Program.S1""
  IL_001c:  callvirt   ""string object.ToString()""
  IL_0021:  call       ""void System.Console.Write(string)""
  IL_0026:  ret
}");
        }

        [Fact, WorkItem(76288, "https://github.com/dotnet/roslyn/issues/76288")]
        public void NoDefensiveCopy_ReadonlyStructField_ConstrainedCall()
        {
            var text = @"
#pragma warning disable CS0649 // Field is never assigned to
struct X
{
    private Y a;
    public readonly string W() => a.ToString();
}

readonly struct Y
{
}
";
            var comp = CompileAndVerify(text, options: TestOptions.ReleaseDll, verify: Verification.Passes);
            comp.VerifyDiagnostics();
            comp.VerifyIL("X.W()", @"
{
  // Code size       18 (0x12)
  .maxstack  1
  IL_0000:  ldarg.0
  IL_0001:  ldflda     ""Y X.a""
  IL_0006:  constrained. ""Y""
  IL_000c:  callvirt   ""string object.ToString()""
  IL_0011:  ret
}
");
        }

        [Fact]
        public void AssignThis()
        {
            var text = @"
class Program
{
    static void Main()
    {
        S1 v = new S1(42);
        System.Console.Write(v.x);

        S1 v2 = new S1(v);
Repository: dotnet/roslyn
File: src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenReadonlyStructTests.cs (C#)

Code before:
  IL_000b:  call       ""System.Type object.GetType()""
  IL_0010:  call       ""void System.Console.Write(object)""
  IL_0015:  ldarg.0
  IL_0016:  constrained. ""Program.S1""
  IL_001c:  callvirt   ""string object.ToString()""
  IL_0021:  call       ""void System.Console.Write(string)""
  IL_0026:  ret
}");
        }

        [Fact, WorkItem(76288, "https://github.com/dotnet/roslyn/issues/76288")]
        public void NoDefensiveCopy_ReadonlyStructField_ConstrainedCall()
        {
            var text = @"
struct X
{
    private Y a;
    public readonly string W() => a.ToString();
}

readonly struct Y
{
}
";
            var comp = CreateCompilation(text, options: TestOptions.ReleaseDll);
            comp.VerifyDiagnostics(
                // (4,15): warning CS0649: Field 'X.a' is never assigned to, and will always have its default value
                //     private Y a;
                Diagnostic(ErrorCode.WRN_UnassignedInternalField, "a").WithArguments("X.a", "").WithLocation(4, 15));
            var compVerifier = CompileAndVerify(comp, verify: Verification.Passes);
            compVerifier.VerifyIL("X.W()", @"
{
  // Code size       18 (0x12)
  .maxstack  1
  IL_0000:  ldarg.0
  IL_0001:  ldflda     ""Y X.a""
  IL_0006:  constrained. ""Y""
  IL_000c:  callvirt   ""string object.ToString()""
  IL_0011:  ret
}
");
        }

        [Fact]
        public void AssignThis()
        {
            var text = @"
class Program
{
    static void Main()
    {

Review comment (suggestion):
>VerifyDiagnostics [](http://example.com/codeflow?start=17&length=17)

We generally prefer combining ```VerifyDiagnostics``` with ```CompileAndVerify``` since it collects diagnostics anyway and collects all diagnostics. #Closed

Code after:
  IL_000b:  call       ""System.Type object.GetType()""
  IL_0010:  call       ""void System.Console.Write(object)""
  IL_0015:  ldarg.0
  IL_0016:  constrained. ""Program.S1""
  IL_001c:  callvirt   ""string object.ToString()""
  IL_0021:  call       ""void System.Console.Write(string)""
  IL_0026:  ret
}");
        }

        [Fact, WorkItem(76288, "https://github.com/dotnet/roslyn/issues/76288")]
        public void NoDefensiveCopy_ReadonlyStructField_ConstrainedCall()
        {
            var text = @"
#pragma warning disable CS0649 // Field is never assigned to
struct X
{
    private Y a;
    public readonly string W() => a.ToString();
}

readonly struct Y
{
}
";
            var comp = CompileAndVerify(text, options: TestOptions.ReleaseDll, verify: Verification.Passes);
            comp.VerifyDiagnostics();
            comp.VerifyIL("X.W()", @"
{
  // Code size       18 (0x12)
  .maxstack  1
  IL_0000:  ldarg.0
  IL_0001:  ldflda     ""Y X.a""
  IL_0006:  constrained. ""Y""
  IL_000c:  callvirt   ""string object.ToString()""
  IL_0011:  ret
}
");
        }

        [Fact]
        public void AssignThis()
        {
            var text = @"
class Program
{
    static void Main()
    {
        S1 v = new S1(42);
        System.Console.Write(v.x);
Repository: dotnet/roslyn
File: src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenReadonlyStructTests.cs (C#)

Code before:

        [Fact, WorkItem(66365, "https://github.com/dotnet/roslyn/issues/66365")]
        public void InvokeOnThisBaseMethods()
        {
            var text = @"
class Program
{
    static void Main()
    {
        default(S1).Test();
    }
    readonly struct S1
    {
        public void Test()
        {
            System.Console.Write(this.GetType());
            System.Console.Write(ToString());
        }
    }
}
";

            var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"Program+S1Program+S1");

            comp.VerifyIL("Program.S1.Test()", @"
{
  // Code size       39 (0x27)
  .maxstack  1
  IL_0000:  ldarg.0
  IL_0001:  ldobj      ""Program.S1""
  IL_0006:  box        ""Program.S1""
  IL_000b:  call       ""System.Type object.GetType()""
  IL_0010:  call       ""void System.Console.Write(object)""
  IL_0015:  ldarg.0
  IL_0016:  constrained. ""Program.S1""
  IL_001c:  callvirt   ""string object.ToString()""
  IL_0021:  call       ""void System.Console.Write(string)""
  IL_0026:  ret
}");
        }

        [Fact, WorkItem(76288, "https://github.com/dotnet/roslyn/issues/76288")]
        public void NoDefensiveCopy_ReadonlyStructField_ConstrainedCall()
        {
            var text = @"
struct X
{
    private Y a;
    public readonly string W() => a.ToString();
}


Review comment (suggestion):
Consider marking the issue as closed by the PR (writing literally `closes #66365` in the PR's description)

Code after:

        [Fact, WorkItem(66365, "https://github.com/dotnet/roslyn/issues/66365")]
        public void InvokeOnThisBaseMethods()
        {
            var text = @"
class Program
{
    static void Main()
    {
        default(S1).Test();
    }
    readonly struct S1
    {
        public void Test()
        {
            System.Console.Write(this.GetType());
            System.Console.Write(ToString());
        }
    }
}
";

            var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"Program+S1Program+S1");

            comp.VerifyIL("Program.S1.Test()", @"
{
  // Code size       39 (0x27)
  .maxstack  1
  IL_0000:  ldarg.0
  IL_0001:  ldobj      ""Program.S1""
  IL_0006:  box        ""Program.S1""
  IL_000b:  call       ""System.Type object.GetType()""
  IL_0010:  call       ""void System.Console.Write(object)""
  IL_0015:  ldarg.0
  IL_0016:  constrained. ""Program.S1""
  IL_001c:  callvirt   ""string object.ToString()""
  IL_0021:  call       ""void System.Console.Write(string)""
  IL_0026:  ret
}");
        }

        [Fact, WorkItem(76288, "https://github.com/dotnet/roslyn/issues/76288")]
        public void NoDefensiveCopy_ReadonlyStructField_ConstrainedCall()
        {
            var text = @"
#pragma warning disable CS0649 // Field is never assigned to
struct X
{
    private Y a;
    public readonly string W() => a.ToString();
}
Repository: dotnet/roslyn
File: src/EditorFeatures/Core/ModernCommands/ShowInheritanceMarginCommandArgs.cs (C#)

Code before:
﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Diagnostics.CodeAnalysis;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Editor.Commanding;

namespace Microsoft.CodeAnalysis.Editor.Commanding.Commands;

/// <summary>
///  Arguments for the Show Inheritance command being invoked.
/// </summary>
[ExcludeFromCodeCoverage]
internal sealed class ShowInheritanceMarginCommandArgs(ITextView textView, ITextBuffer subjectBuffer)
    : EditorCommandArgs(textView, subjectBuffer)
{
}


Review comment (suggestion):
```suggestion
internal sealed class ShowInheritanceMarginCommandArgs(ITextView textView, ITextBuffer subjectBuffer)
    : EditorCommandArgs(textView, subjectBuffer);
```

Code after:
﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Diagnostics.CodeAnalysis;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Editor.Commanding;

namespace Microsoft.CodeAnalysis.Editor.Commanding.Commands;

/// <summary>
///  Arguments for the Show Inheritance command being invoked.
/// </summary>
[ExcludeFromCodeCoverage]
internal sealed class ShowInheritanceMarginCommandArgs(ITextView textView, ITextBuffer subjectBuffer)
    : EditorCommandArgs(textView, subjectBuffer);