Skip to content

Commit fff27d5

Browse files
feat: better docs
1 parent becdf12 commit fff27d5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

AutomaticInterface/AutomaticInterface/RegisterAttributesExtensions.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ this IncrementalGeneratorInitializationContext context
1515
postInitializationContext.AddSource(
1616
$"{AutomaticInterfaceGenerator.DefaultAttributeName}.Attribute.g.cs",
1717
SourceText.From(
18-
$$$"""
18+
$$"""
1919
// <auto-generated />
2020
using System;
2121
@@ -25,11 +25,12 @@ namespace AutomaticInterface
2525
/// Use source generator to automatically create a Interface from this class
2626
/// </summary>
2727
/// <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>
28+
/// <param name="interfaceName">Interface name for the generated interface. Defaults to an interface version of the class name, e.g ExampleClass -> IExampleClass.</param>
29+
/// <param name="asInternal">If true, the generated interface will be internal, otherwise public</param>
2930
[AttributeUsage(AttributeTargets.Class)]
30-
internal sealed class {{{AutomaticInterfaceGenerator.DefaultAttributeName}}}Attribute : Attribute
31+
internal sealed class {{AutomaticInterfaceGenerator.DefaultAttributeName}}Attribute : Attribute
3132
{
32-
internal {{{AutomaticInterfaceGenerator.DefaultAttributeName}}}Attribute(string {{{AutomaticInterfaceGenerator.NamespaceParameterName}}} = "", string {{{AutomaticInterfaceGenerator.InterfaceParameterName}}} = "", bool asInternal = false) { }
33+
internal {{AutomaticInterfaceGenerator.DefaultAttributeName}}Attribute(string {{AutomaticInterfaceGenerator.NamespaceParameterName}} = "", string {{AutomaticInterfaceGenerator.InterfaceParameterName}} = "", bool asInternal = false) { }
3334
}
3435
}
3536
""",

0 commit comments

Comments
 (0)