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/ComponentModel/ObservableValidatorValidateAllPropertiesGenerator.cs
@@ -201,7 +202,23 @@ internal static class DiagnosticDescriptors
201
202
category:typeof(ICommandGenerator).FullName,
202
203
defaultSeverity:DiagnosticSeverity.Error,
203
204
isEnabledByDefault:true,
204
-
description:$"Cannot apply [ICommand] to methods with a signature that doesn't match any of the existing relay command types.",
205
+
description:"Cannot apply [ICommand] to methods with a signature that doesn't match any of the existing relay command types.",
206
+
helpLinkUri:"https://aka.ms/mvvmtoolkit");
207
+
208
+
/// <summary>
209
+
/// Gets a <see cref="DiagnosticDescriptor"/> indicating when an unsupported C# language version is being used.
210
+
/// <para>
211
+
/// Format: <c>"The method {0}.{1} cannot be used to generate a command property, as its signature isn't compatible with any of the existing relay command types"</c>.
messageFormat:"The source generator features from the MVVM Toolkit require consuming projects to set the C# language version to at least C# 9.0",
218
+
category:typeof(CSharpParseOptions).FullName,
219
+
defaultSeverity:DiagnosticSeverity.Error,
220
+
isEnabledByDefault:true,
221
+
description:"The source generator features from the MVVM Toolkit require consuming projects to set the C# language version to at least C# 9.0. Make sure to add <LangVersion>9.0</LangVersion> (or above) to your .csproj file.",
Welcome to the Notifications section of the toolkit! This contains the Notifications library, including the object model for tile, toast, and badge XML (previously called NotificationsExtensions).
2
+
3
+
## Where should I add new code?
4
+
Any code for generating notifications should be written in the CommunityToolkit.WinUI.Notifications project.
5
+
6
+
If there's UWP-specific code, use the appropriate `#ifdef`, `WINDOWS_UWP` or `WINRT`.
7
+
8
+
## What are all the projects for?
9
+
All the code is contained on the CommunityToolkit.WinUI.Notifications project.
10
+
11
+
It outputs `netstandard1.4`, `uap10.0`, `native` for WinRT, and netcoreapp for .Net Core projects. The UWP library is only for C#, while the WinRT library is a Windows Runtime Component for C++.
12
+
13
+
14
+
| C# | C++ |
15
+
| ---------------- | ------------------- |
16
+
| NET Standard 1.4 | UWP WinRT Component |
17
+
| UWP C# DLL ||
18
+
| .Net Core DLL ||
19
+
20
+
21
+
22
+
## Scenarios we want to support
23
+
24
+
Imagine you add this library to a .NET Standard class library, and you also add it to your UWP app. In this case, your .NET Standard class library will receive the NETStandard dll. Your UWP project will receive the UWP dll.
25
+
26
+
## How are the test projects organized?
27
+
28
+
If you look in the UnitTests folder of the repo, you'll notice that there's three projects...
29
+
- UnitTests.Notifications.Shared
30
+
- UnitTests.Notifications.NetCore
31
+
- UnitTests.Notifications.UWP
32
+
- UnitTests.Notifications.WinRT
33
+
34
+
That's because in our source code, we have some #IF defs for switching between the different types of reflection that C# uses, since it's different between a .NET Standard and WinRT code.
35
+
36
+
Therefore, there are two different code paths, one path for NETFX_CORE, and another for when that isn't present. The two test projects exercise both code paths.
0 commit comments