Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiDiff: Allow deciding whether to include partial modifier in TypeDeclarationCSharpSyntaxRewriter output #45803

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Regular constructor.
  • Loading branch information
carlossanlop committed Jan 9, 2025
commit 4a1070816fc2c97a5f2a18be478e41ba7ae2e111
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ namespace Microsoft.DotNet.GenAPI.SyntaxRewriter
/// - adds partial keyword
/// - remove Object from a list of base types.
/// </summary>
/// <remarks>
/// Initializes a new instance of the <see cref="TypeDeclarationCSharpSyntaxRewriter"/> class, and optionally allows deciding whether to insert the partial modifier for types or not.
/// </remarks>
/// <param name="addPartialModifier">Determines whether to insert the partial modifier for types or not.</param>
public class TypeDeclarationCSharpSyntaxRewriter(bool addPartialModifier) : CSharpSyntaxRewriter
public class TypeDeclarationCSharpSyntaxRewriter : CSharpSyntaxRewriter
{
private readonly bool _addPartialModifier = addPartialModifier;
private readonly bool _addPartialModifier;

/// <summary>
/// Initializes a new instance of the <see cref="TypeDeclarationCSharpSyntaxRewriter"/> class, and allows deciding whether to insert the partial modifier for types or not.
/// </summary>
/// <param name="addPartialModifier">Determines whether to insert the partial modifier for types or not.</param>
public TypeDeclarationCSharpSyntaxRewriter(bool addPartialModifier) => _addPartialModifier = addPartialModifier;

/// <inheritdoc />
public override SyntaxNode? VisitInterfaceDeclaration(InterfaceDeclarationSyntax node)
Expand Down
Loading