Skip to content

Commit 234330e

Browse files
committed
Fix the comments of GenerateAutomaticInterfaceAttribute
1 parent becdf12 commit 234330e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

AutomaticInterface/AutomaticInterface/AutomaticInterfaceGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class AutomaticInterfaceGenerator : IIncrementalGenerator
1212
public const string IgnoreAutomaticInterfaceAttributeName = "IgnoreAutomaticInterface";
1313
public const string NamespaceParameterName = "namespaceName";
1414
public const string InterfaceParameterName = "interfaceName";
15+
public const string AsInternalParameterName = "asInternal";
1516

1617
public void Initialize(IncrementalGeneratorInitializationContext context)
1718
{

AutomaticInterface/AutomaticInterface/RegisterAttributesExtensions.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ namespace AutomaticInterface
2424
/// <summary>
2525
/// Use source generator to automatically create a Interface from this class
2626
/// </summary>
27-
/// <param name="namespaceName">Namespace name for the generated interface. Defaults to the same namespace as the class.</param>
28-
/// <param name="interfaceName">Interface name for the generated interface. Defaults to an interface version of the class name.</param>
2927
[AttributeUsage(AttributeTargets.Class)]
3028
internal sealed class {{{AutomaticInterfaceGenerator.DefaultAttributeName}}}Attribute : Attribute
3129
{
32-
internal {{{AutomaticInterfaceGenerator.DefaultAttributeName}}}Attribute(string {{{AutomaticInterfaceGenerator.NamespaceParameterName}}} = "", string {{{AutomaticInterfaceGenerator.InterfaceParameterName}}} = "", bool asInternal = false) { }
30+
/// <param name="{{{AutomaticInterfaceGenerator.NamespaceParameterName}}}">Namespace name for the generated interface. Defaults to the same namespace as the class.</param>
31+
/// <param name="{{{AutomaticInterfaceGenerator.InterfaceParameterName}}}">Interface name for the generated interface. Defaults to an interface version of the class name.</param>
32+
/// <param name="{{{AutomaticInterfaceGenerator.AsInternalParameterName}}}">If true, set the visibility of the interface to internal.</param>
33+
internal {{{AutomaticInterfaceGenerator.DefaultAttributeName}}}Attribute(string {{{AutomaticInterfaceGenerator.NamespaceParameterName}}} = "", string {{{AutomaticInterfaceGenerator.InterfaceParameterName}}} = "", bool {{{AutomaticInterfaceGenerator.AsInternalParameterName}}} = false) { }
3334
}
3435
}
3536
""",

0 commit comments

Comments
 (0)