Skip to content

Commit 458ac3a

Browse files
committed
Add xmldoc to LogMessage
1 parent 67df837 commit 458ac3a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

src/Azure.Functions.Sdk/LogMessage.cs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,51 @@ namespace Azure.Functions.Sdk;
88

99
internal readonly struct LogMessage
1010
{
11+
/// <summary>
12+
/// Log message for when the Func CLI cannot be run.
13+
/// </summary>
1114
public static readonly LogMessage Error_CannotRunFuncCli
1215
= new(nameof(Strings.AZFW0100_Error_CannotRunFuncCli));
1316

17+
/// <summary>
18+
/// Log message for when there is a conflict between extension packages.
19+
/// </summary>
1420
public static readonly LogMessage Error_ExtensionPackageConflict
1521
= new(nameof(Strings.AZFW0101_Error_ExtensionPackageConflict));
1622

23+
/// <summary>
24+
/// Log message for when there is a duplicate extension package.
25+
/// </summary>
1726
public static readonly LogMessage Warning_ExtensionPackageDuplicate
1827
= new(nameof(Strings.AZFW0102_Warning_ExtensionPackageDuplicate));
1928

29+
/// <summary>
30+
/// Log message for when an extension package version is invalid.
31+
/// </summary>
2032
public static readonly LogMessage Error_InvalidExtensionPackageVersion
2133
= new(nameof(Strings.AZFW0103_Error_InvalidExtensionPackageVersion));
2234

35+
/// <summary>
36+
/// Log message for when an end-of-life Functions version is used.
37+
/// </summary>
2338
public static readonly LogMessage Warning_EndOfLifeFunctionsVersion
2439
= new(nameof(Strings.AZFW0104_Warning_EndOfLifeFunctionsVersion));
2540

41+
/// <summary>
42+
/// Log message for when an incompatible Functions SDK is used.
43+
/// </summary>
2644
public static readonly LogMessage Error_UsingIncompatibleSdk
2745
= new(nameof(Strings.AZFW0105_Error_UsingIncompatibleSdk));
2846

47+
/// <summary>
48+
/// Log message for when an unknown Functions version is specified.
49+
/// </summary>
2950
public static readonly LogMessage Error_UnknownFunctionsVersion
3051
= new(nameof(Strings.AZFW0106_Error_UnknownFunctionsVersion));
3152

53+
/// <summary>
54+
/// Log message for when an unsupported target framework is used.
55+
/// </summary>
3256
public static readonly LogMessage Warning_UnsupportedTargetFramework
3357
= new(nameof(Strings.AZFW0107_Warning_UnsupportedTargetFramework));
3458

@@ -59,12 +83,33 @@ public LogMessage(LogLevel level, string id, string? code = null)
5983
Code = code;
6084
}
6185

86+
/// <summary>
87+
/// Gets the level of the log message.
88+
/// </summary>
6289
public LogLevel Level { get; }
6390

91+
/// <summary>
92+
/// Gets the identifier of the log message.
93+
/// </summary>
94+
/// <remarks>
95+
/// This identifier must correspond to a resource string in the <see cref="Strings"/> resource file.
96+
/// </remarks>
6497
public string Id { get; }
6598

99+
/// <summary>
100+
/// Gets the code of the log message, if available.
101+
/// </summary>
66102
public string? Code { get; }
67103

104+
/// <summary>
105+
/// Gets the help keyword for the log message.
106+
/// </summary>
107+
/// <remarks>
108+
/// The help keyword is derived from the <see cref="Code"/> property.
109+
/// If the <see cref="Code"/> is null, the help keyword will also be null.
110+
/// A help keyword will emit a help link of "https://go.microsoft.com/fwlink/?LinkId=AzureFunctions.{Code}"
111+
/// as part of the msbuild log.
112+
/// </remarks>
68113
public string? HelpKeyword => Code is null ? null : $"AzureFunctions.{Code}";
69114

70115
/// <summary>

0 commit comments

Comments
 (0)