You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CommunityToolkit.Mvvm.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -203,4 +203,20 @@ internal static class DiagnosticDescriptors
203
203
isEnabledByDefault:true,
204
204
description:"Cannot apply the [ICommand] attribute specifying a concurrency control setting to methods mapping to non-asynchronous command types.",
205
205
helpLinkUri:"https://aka.ms/mvvmtoolkit");
206
+
207
+
/// <summary>
208
+
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when <c>ICommandAttribute.IncludeCancelCommandParameter</c> is being set for an invalid method.
209
+
/// <para>
210
+
/// Format: <c>"The method {0}.{1} cannot be annotated with the [ICommand] attribute specifying to include a cancel command, as it does not map to an asynchronous command type taking a cancellation token"</c>.
title:"Invalid concurrency control setting usage",
216
+
messageFormat:"The method {0}.{1} cannot be annotated with the [ICommand] attribute specifying to include a cancel command, as it does not map to an asynchronous command type taking a cancellation token",
217
+
category:typeof(ICommandGenerator).FullName,
218
+
defaultSeverity:DiagnosticSeverity.Error,
219
+
isEnabledByDefault:true,
220
+
description:"Cannot apply the [ICommand] attribute specifying to include a cancel command to methods not mapping to an asynchronous command type accepting a cancellation token.",
/// <param name="commandInterfaceType">The command interface type name.</param>
256
270
/// <param name="commandClassType">The command class type name.</param>
257
271
/// <param name="delegateType">The delegate type name for the wrapped method.</param>
272
+
/// <param name="supportsCancellation">Indicates whether or not the resulting command supports cancellation.</param>
258
273
/// <param name="commandTypeArguments">The type arguments for <paramref name="commandInterfaceType"/> and <paramref name="commandClassType"/>, if any.</param>
259
274
/// <param name="delegateTypeArguments">The type arguments for <paramref name="delegateType"/>, if any.</param>
260
275
/// <returns>Whether or not <paramref name="methodSymbol"/> was valid and the requested types have been set.</returns>
0 commit comments