Skip to content

Commit ea7d9ba

Browse files
committed
Updated some summaries
1 parent 0e6c071 commit ea7d9ba

File tree

4 files changed

+37
-28
lines changed

4 files changed

+37
-28
lines changed

src/Dapr.Actors.Generators/ActorClientGenerator.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
5757
/// <summary>
5858
/// Returns the descriptor for the actor client to generate.
5959
/// </summary>
60-
/// <param name="context"></param>
61-
/// <param name="cancellationToken"></param>
62-
/// <returns></returns>
63-
/// <exception cref="InvalidOperationException"></exception>
60+
/// <param name="context">Current generator syntax context passed from generator pipeline.</param>
61+
/// <param name="cancellationToken">Cancellation token used to interrupt the generation.</param>
62+
/// <returns>Returns the descriptor of actor client to generate.</returns>
6463
static ActorClientDescriptor CreateActorClientDescriptor(
6564
GeneratorAttributeSyntaxContext context,
6665
CancellationToken cancellationToken)
@@ -100,9 +99,9 @@ static ActorClientDescriptor CreateActorClientDescriptor(
10099
/// <summary>
101100
/// Generates the actor client code based on the specified descriptor.
102101
/// </summary>
103-
/// <param name="context"></param>
104-
/// <param name="descriptor"></param>
105-
/// <exception cref="InvalidOperationException"></exception>
102+
/// <param name="context">Context passed from the source generator when it has registered an output.</param>
103+
/// <param name="descriptor">Descriptor of actor client to generate.</param>
104+
/// <exception cref="InvalidOperationException">Throws when assembly doesn't one or more required symbols.</exception>
106105
static void GenerateActorClientCode(SourceProductionContext context, ActorClientDescriptor descriptor)
107106
{
108107
try

src/Dapr.Actors.Generators/DiagnosticsException.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,24 @@
22

33
namespace Dapr.Actors.Generators
44
{
5+
/// <summary>
6+
/// Exception thrown when diagnostics are encountered during code generation.
7+
/// </summary>
58
internal sealed class DiagnosticsException : Exception
69
{
10+
/// <summary>
11+
/// Initializes a new instance of the <see cref="DiagnosticsException"/> class.
12+
/// </summary>
13+
/// <param name="diagnostics"></param>
714
public DiagnosticsException(IEnumerable<Diagnostic> diagnostics)
815
: base(string.Join("\n", diagnostics.Select(d => d.ToString())))
916
{
1017
this.Diagnostics = diagnostics.ToArray();
1118
}
1219

13-
public IEnumerable<Diagnostic> Diagnostics { get; }
20+
/// <summary>
21+
/// Diagnostics encountered during code generation.
22+
/// </summary>
23+
public ICollection<Diagnostic> Diagnostics { get; }
1424
}
1525
}

src/Dapr.Actors.Generators/Helpers/SyntaxFactoryHelpers.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ namespace Dapr.Actors.Generators.Helpers
1010
public static partial class SyntaxFactoryHelpers
1111
{
1212
/// <summary>
13-
/// Generates a syntax for <see cref="ArgumentNullException"></see> syntax for the given argument name.
13+
/// Generates a syntax for <see cref="ArgumentNullException"/> syntax for the given argument name.
1414
/// </summary>
15-
/// <param name="argumentName"></param>
16-
/// <returns></returns>
15+
/// <param name="argumentName">Name of the argument that generated the exception.</param>
16+
/// <returns>Returns <see cref="ThrowExpressionSyntax"/> used to throw an <see cref="ArgumentNullException"/>.</returns>
1717
public static ThrowExpressionSyntax ThrowArgumentNullException(string argumentName)
1818
{
1919
return SyntaxFactory.ThrowExpression(
@@ -33,8 +33,8 @@ public static ThrowExpressionSyntax ThrowArgumentNullException(string argumentNa
3333
/// <summary>
3434
/// Generates a syntax for null check for the given argument name.
3535
/// </summary>
36-
/// <param name="argumentName"></param>
37-
/// <returns></returns>
36+
/// <param name="argumentName">Name of the argument whose null check is to be generated.</param>
37+
/// <returns>Returns <see cref="IfStatementSyntax"/> representing an argument null check.</returns>
3838
public static IfStatementSyntax ThrowIfArgumentNull(string argumentName)
3939
{
4040
return SyntaxFactory.IfStatement(
@@ -53,8 +53,8 @@ public static IfStatementSyntax ThrowIfArgumentNull(string argumentName)
5353
/// <summary>
5454
/// Generates a syntax for nameof expression for the given argument name.
5555
/// </summary>
56-
/// <param name="argumentName"></param>
57-
/// <returns></returns>
56+
/// <param name="argumentName">Name of the argument from which the syntax is to be generated.</param>
57+
/// <returns>Return a <see cref="ExpressionSyntax"/> representing a NameOf expression.</returns>
5858
public static ExpressionSyntax NameOfExpression(string argumentName)
5959
{
6060
var nameofIdentifier = SyntaxFactory.Identifier(
@@ -76,11 +76,11 @@ public static ExpressionSyntax NameOfExpression(string argumentName)
7676
/// <summary>
7777
/// Generates the invocation syntax to call a remote method with the actor proxy.
7878
/// </summary>
79-
/// <param name="actorProxyMemberSyntax">Memeber syntax to access actorProxy member.</param>
79+
/// <param name="actorProxyMemberSyntax">Member syntax to access actorProxy member.</param>
8080
/// <param name="remoteMethodName">Name of remote method to invoke.</param>
8181
/// <param name="remoteMethodParameters">Remote method parameters.</param>
8282
/// <param name="remoteMethodReturnTypes">Return types of remote method invocation.</param>
83-
/// <returns></returns>
83+
/// <returns>The <see cref="InvocationExpressionSyntax"/> representing a call to the actor proxy.</returns>
8484
public static InvocationExpressionSyntax ActorProxyInvokeMethodAsync(
8585
MemberAccessExpressionSyntax actorProxyMemberSyntax,
8686
string remoteMethodName,
@@ -124,9 +124,9 @@ public static InvocationExpressionSyntax ActorProxyInvokeMethodAsync(
124124
/// <summary>
125125
/// Returns the syntax kinds for the specified accessibility.
126126
/// </summary>
127-
/// <param name="accessibility"></param>
128-
/// <returns></returns>
129-
/// <exception cref="InvalidOperationException"></exception>
127+
/// <param name="accessibility">Accessibility to convert into a SyntaxKind.</param>
128+
/// <returns>Return the collection of <see cref="SyntaxKind"/> representing the given accessibility.</returns>
129+
/// <exception cref="InvalidOperationException">Throws when un unexpected syntax is passed.</exception>
130130
public static ICollection<SyntaxKind> GetSyntaxKinds(Accessibility accessibility)
131131
{
132132
var syntaxKinds = new List<SyntaxKind>();

src/Dapr.Actors.Generators/Templates.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ namespace Dapr.Actors.Generators
1111
internal static partial class Templates
1212
{
1313
/// <summary>
14-
/// Returns the source text for the ActorMethodAttribute.
14+
/// Returns the <see cref="SourceText"/> for the ActorMethodAttribute.
1515
/// </summary>
16-
/// <param name="destinationNamespace"></param>
17-
/// <returns></returns>
18-
/// <exception cref="ArgumentNullException"></exception>
16+
/// <param name="destinationNamespace">Namespace where to generate attribute.</param>
17+
/// <returns>The <see cref="SourceText"/> representing the ActorMethodAttribute.</returns>
18+
/// <exception cref="ArgumentNullException">Throws when destinationNamespace is null.</exception>
1919
public static SourceText ActorMethodAttributeSourceText(string destinationNamespace)
2020
{
2121
if (destinationNamespace == null)
@@ -47,11 +47,11 @@ internal sealed class {Constants.ActorMethodAttributeTypeName} : Attribute
4747
}
4848

4949
/// <summary>
50-
/// Returns the source text for the GenerateActorClientAttribute.
50+
/// Returns the <see cref="SourceText"/> for the GenerateActorClientAttribute.
5151
/// </summary>
52-
/// <param name="destinationNamespace"></param>
53-
/// <returns></returns>
54-
/// <exception cref="ArgumentNullException"></exception>
52+
/// <param name="destinationNamespace">Namespace where to generate attribute.</param>
53+
/// <returns>The <see cref="SourceText"/> representing the ActorMethodAttribute.</returns>
54+
/// <exception cref="ArgumentNullException">Throws when destinationNamespace is null.</exception>
5555
public static SourceText GenerateActorClientAttributeSourceText(string destinationNamespace)
5656
{
5757
if (destinationNamespace == null)

0 commit comments

Comments
 (0)