31 references to GoDocSubject
Aspire.Hosting.CodeGeneration.Go (21)
AtsGoCodeGenerator.cs (11)
973AtsCapabilityKind.PropertyGetter => GoDocSubject.Getter, 974AtsCapabilityKind.PropertySetter => GoDocSubject.Setter, 975_ => GoDocSubject.Method, 1021Subject = GoDocSubject.Type, 1038Subject = GoDocSubject.Field, 1078Subject = GoDocSubject.Type, 1105Subject = GoDocSubject.Field, 1184Subject = GoDocSubject.Field, 1387Subject = GoDocSubject.Type, 1539Subject = GoDocSubject.Type, 2386Subject = GoDocSubject.Field,
GoDocComment.cs (10)
36public GoDocSubject Subject { get; init; } = GoDocSubject.Method; 214content.Subject == GoDocSubject.Setter && 390private static string StartWithName(string name, string text, GoDocSubject subject) 434private static bool TryRewritePropertySummary(string name, string text, GoDocSubject subject, out string rewritten) 441else if (text.StartsWith("Gets ", StringComparison.OrdinalIgnoreCase) && subject is GoDocSubject.Setter or GoDocSubject.Field) 464GoDocSubject.Setter => $"{name} sets {body}", 465GoDocSubject.Getter or GoDocSubject.Method => isBoolean ? $"{name} reports {body}" : $"{name} gets {body}",
Aspire.Hosting.CodeGeneration.Go.Tests (10)
GoDocCommentTests.cs (10)
56("getter", new GoDocContent { GoName = "DisplayName", Subject = GoDocSubject.Getter, Summary = "Gets or sets the display name." }), 57("setter", new GoDocContent { GoName = "SetDisplayName", Subject = GoDocSubject.Setter, Summary = "Gets or sets the display name." }), 58("boolean getter", new GoDocContent { GoName = "IsEnabled", Subject = GoDocSubject.Getter, Summary = "Gets or sets a value indicating whether the resource is enabled." }), 59("setter falls back to the description when the property text cannot be reworded", new GoDocContent { GoName = "SetPort", Subject = GoDocSubject.Setter, Summary = "The port.", FallbackSummary = "Sets the Port property" }), 60("field with a noun phrase", new GoDocContent { GoName = "Port", Subject = GoDocSubject.Field, Summary = "The port to listen on." }), 61("field with a sentence", new GoDocContent { GoName = "Pending", Subject = GoDocSubject.Field, Summary = "The resource is pending." }), 62("field with whether", new GoDocContent { GoName = "UseTls", Subject = GoDocSubject.Field, Summary = "Whether TLS is used." }), 63("type without a verb", new GoDocContent { GoName = "Settings", Subject = GoDocSubject.Type, Summary = "Test settings." }), 64("fallback summary", new GoDocContent { GoName = "Settings", Subject = GoDocSubject.Type, FallbackSummary = "Settings represents Settings." }), 65("nothing to document", new GoDocContent { GoName = "Settings", Subject = GoDocSubject.Type }),