Commit Graph

177 Commits

Author SHA1 Message Date
Sergio Pedri c71eb3592e
Merge pull request #124 from CommunityToolkit/dev/observable-property-inheritdoc
Add <inheritdoc/> to generated observable properties
2022-02-28 21:24:21 +01:00
Sergio Pedri f6ca1f0bc4 Switch default async command concurrency to false 2022-02-27 18:53:07 +01:00
Sergio Pedri 4a004a4fab Add <inheritdoc/> to generated observable properties 2022-02-24 23:59:29 +01:00
Sergio Pedri c1cb029bc2 Fix [ObservableRecipient] with inherited base attributes 2022-02-22 20:00:26 +01:00
Sergio Pedri 71ad82d274 Workaround for RS2002 warnings
See https://github.com/dotnet/roslyn-analyzers/issues/5828
2022-02-22 13:13:37 +01:00
Sergio Pedri 7e0bf75f8a Add support for [ICommand(CanExecute)] on generated properties 2022-01-31 19:40:35 +01:00
Sergio Pedri c38a4a2118 Disable generation of header files if no targets are present 2022-01-14 14:19:48 +01:00
Sergio Pedri 7d52b58e76 Fix conflicting generation of nullability attributes 2022-01-13 20:30:28 +01:00
Sergio Pedri 63abbb051d Fix generated members accessibility for sealed types 2021-12-31 18:06:42 +01:00
Sergio Pedri 704e5073f1 Enable implementing OnActivated/OnDeactivated with [ObservableRecipient] 2021-12-31 17:58:12 +01:00
Sergio Pedri 35d403b945 Fix mixed whitespaces in generated files 2021-12-31 17:32:47 +01:00
Sergio Pedri e12e0858a4 Fix removal of [RequiresUnreferencedCode] on older runtimes 2021-12-31 17:04:10 +01:00
Sergio Pedri af03bdfff0 Remove trimming annoations for [ObservableRecipient] on older runtimes 2021-12-31 16:28:00 +01:00
Sergio Pedri afc7232dc7 Improve custom filtering support in TransitiveMembersGenerator<TInfo> 2021-12-29 20:52:50 +01:00
Sergio Pedri 53614e7e3c Add comments to GetFullMetadataNameForFileName 2021-12-29 18:31:48 +01:00
Sergio Pedri f8dcd09581 Remove call to MulticastDelegate.op_Equality 2021-12-29 18:31:48 +01:00
Sergio Pedri 8cdc261997 Remove unnecessary partial class modifier 2021-12-29 18:31:48 +01:00
Sergio Pedri 64657753a3 Remove leftover internal helpers and adjust visibility 2021-12-29 18:31:47 +01:00
Sergio Pedri 9c581dc531 Add nullable enable directives to generated files 2021-12-29 18:31:12 +01:00
Sergio Pedri aae1cbde84 Add base Comparer<T, TSelf> type 2021-12-29 18:31:11 +01:00
Sergio Pedri 9cc7d41c1e Add FilterWithLanguageVersion extension to gate on language version 2021-12-29 18:31:11 +01:00
Sergio Pedri 13a9149eee Lower C# version requirement to 8 for all generators 2021-12-29 18:31:11 +01:00
Sergio Pedri 2428765852 Remove leftover DiagnosticDescriptor-s 2021-12-29 18:31:11 +01:00
Sergio Pedri 9474591020 Centralize handling of sealed target types 2021-12-29 18:31:11 +01:00
Sergio Pedri 164a8d92e3 Fix member generation in sealed types 2021-12-29 18:31:11 +01:00
Sergio Pedri 74c60c7a4a Remove non incremental TransitiveMembersGenerator 2021-12-29 18:31:11 +01:00
Sergio Pedri 1f90e526e9 Switch ObservableRecipientGenerator to incremental 2021-12-29 18:30:53 +01:00
Sergio Pedri b3eb5e55f5 Switch ObservableObjectGenerator to incremental 2021-12-29 18:30:53 +01:00
Sergio Pedri 839ddf98b3 Remove non incremental INotifyPropertyChangedGenerator 2021-12-29 18:30:53 +01:00
Sergio Pedri d3da266a1a Add incremental INotifyPropertyChangedGenerator 2021-12-29 18:30:53 +01:00
Sergio Pedri ddeddd8c08 Add initial version of incremental TransitiveMembersGenerator 2021-12-29 18:30:53 +01:00
Sergio Pedri 8bbc3092fe Enable diagnostics for ObservablePropertyGenerator 2021-12-29 18:30:53 +01:00
Sergio Pedri bf02beea06 Fix __KnownPropertyChangedEventArgs generation 2021-12-29 18:30:53 +01:00
Sergio Pedri 9defa26408 Minor code refactoring 2021-12-29 18:30:53 +01:00
Sergio Pedri b173cd3570 Remove non incremental ObservablePropertyGenerator 2021-12-29 18:30:53 +01:00
Sergio Pedri 8c9d9d3e8e Enable properties generation for ObservablePropertyGenerator 2021-12-29 18:30:36 +01:00
Sergio Pedri 30e5dbe6be Add initial version of incremental ObservablePropertyGenerator
Only generating cached property changing/changed args for now
2021-12-29 18:30:36 +01:00
Sergio Pedri cb225c1127 Port IEqualityComparerExtensions from ComputeSharp 2021-12-29 18:30:36 +01:00
Sergio Pedri 64649493b5 Add PropertyInfo type 2021-12-29 18:30:36 +01:00
Sergio Pedri 833dae319c Add models to cache validation attributes 2021-12-29 18:30:36 +01:00
Sergio Pedri 7f176bcae7 Remove non incremental ObservableValidatorValidateAllPropertiesGenerator 2021-12-29 18:30:36 +01:00
Sergio Pedri 87821000c9 Add incremental ObservableValidatorValidateAllPropertiesGenerator 2021-12-29 18:30:22 +01:00
Sergio Pedri ff09557a6f Improve code generation for IMessengerRegisterAllGenerator 2021-12-29 18:30:22 +01:00
Sergio Pedri 793a96ac39 Remove non incremental IMessengerRegisterAllGenerator 2021-12-29 18:30:22 +01:00
Sergio Pedri 5fd70ed0be Add incremental IMessengerRegisterAllGenerator 2021-12-29 18:29:57 +01:00
Sergio Pedri 9e493348e8 Minor code refactoring 2021-12-29 18:29:57 +01:00
Sergio Pedri 4667ba2ecd Restore C# version check in ICommandGenerator 2021-12-29 18:29:57 +01:00
Sergio Pedri 703514d0fa Minor code tweaks 2021-12-29 18:29:56 +01:00
Sergio Pedri 4a6edb1474 Remove non incremental ICommandGenerator 2021-12-29 18:29:56 +01:00
Sergio Pedri 28af36a269 Add incremental ICommandGenerator 2021-12-29 18:28:34 +01:00
Sergio Pedri 84c3e291ba Port incremental helpers from ComputeSharp
Also added attribution in ThirdPartyNotices.txt
2021-12-29 18:28:34 +01:00
Sergio Pedri 85d2c0f166 Add System.HashCode polyfill 2021-12-29 18:28:34 +01:00
Sergio Pedri 3e61aeb3c1 Remove [Pure] attribute usages 2021-12-29 18:06:54 +01:00
Sergio Pedri f6b604a824 Add dot to exception messages in remaining call sites 2021-12-20 13:15:20 +01:00
Sergio Pedri 0ca0170da9 Resolve rebase build errors 2021-12-10 00:58:55 +01:00
Sergio Pedri 75c51164b3 Add concurrency control setting to [ICommand] attribute 2021-12-10 00:08:12 +01:00
Sergio Pedri 15e1ba4631 Minor code refactoring 2021-12-09 21:02:08 +01:00
Sergio Pedri b57f21327b Enabled generation support or [AlsoNotifyCanExecuteFor] 2021-12-09 21:02:07 +01:00
Sergio Pedri 6c826407a0
Merge pull request #50 from CommunityToolkit/dev/icommand-attribute-canexecute
Add [ICommand] CanExecute property
2021-12-09 21:00:42 +01:00
Sergio Pedri 042ff3f4c6 Add diagnostics tests for CanExecute feature, bug fixes 2021-12-09 10:49:58 +01:00
Sergio Pedri 1b66760d67 Add initial support for [ICommand] CanExecute property 2021-12-09 10:49:58 +01:00
Sergio Pedri b86238cad3 Update TransitiveMembersGenerator for new embedded resources 2021-12-02 18:04:37 +01:00
Sergio Pedri 680be4180e Switch ObservableRecipient template to global:: qualifiers 2021-12-02 18:04:37 +01:00
Sergio Pedri 9a4e381353 Switch ObservableObject template to global:: qualifiers 2021-12-02 18:04:37 +01:00
Sergio Pedri 12d7672a38 Switch INotifyPropertyChanged template to global:: qualifiers 2021-12-02 18:04:37 +01:00
Sergio Pedri 806287d7e2 Fix generated source for nullability attributes
This both adds the new "// <auto-generated/>" header, as well as restores the non-file-scoped namespace declaration so that the code will compile on C# < 10 as well (which is explicitly supported by the MVVM Toolkit)
2021-11-15 11:23:44 +01:00
Sergio Pedri 12750907cb Switch generated headers to "// <auto-generated/>" 2021-11-15 11:22:42 +01:00
Sergio Pedri 6afdd81742 Refactor multiline variable declarations 2021-11-01 23:42:45 +01:00
Sergio Pedri 51c7a67c20 More code style improvements and tweaks
- Remove unused namespaces
- Remove unused attributes
- Remove unnecessary #nullable enable directives
- Sort using directives
- Simplify names
2021-11-01 22:29:46 +01:00
Sergio Pedri 9f4c9fad7f Remove unnecessary using directives 2021-11-01 22:14:16 +01:00
Sergio Pedri c176080d37 Switch whole solution to file-scoped namespaces 2021-11-01 20:46:46 +01:00
Sergio Pedri 7a2295b03c Update some code style rules
In particular:
- Use explicit types everywhere to improve clarity
- Use target-typed new() expression when target is explicit
- Use explicit discard for value-returning statements
2021-11-01 20:34:00 +01:00
Sergio Pedri 11ab330e69 Enable nullability annotations in the entire solution 2021-11-01 19:27:55 +01:00
Sergio Pedri 25879bbaa4 Update NuGet packages in the solution 2021-11-01 19:01:04 +01:00
Sergio Pedri 941098338f Remove .NET Core 2.1 targets 2021-11-01 17:48:32 +01:00
Sergio Pedri 8b7c87284b Update namespaces from Microsoft.Toolkit to CommunityToolkit 2021-11-01 17:22:05 +01:00
Sergio Pedri b498321331 Rename folders/projects from Microsoft.Toolkit to CommunityToolkit 2021-11-01 17:07:47 +01:00