Commit 09b80fa
Add compile-time property initializer for default values in BindableProperty source generaor (#3204)
* Add compile-time property initializer for default value sin BindableProperty source generaor
* Update src/CommunityToolkit.Maui.SourceGenerators/Helpers/InitializerExpressionResolver.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/CommunityToolkit.Maui.SourceGenerators/Helpers/InitializerExpressionResolver.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/CommunityToolkit.Maui.SourceGenerators/Helpers/InitializerExpressionResolver.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Address copilot feedback about properties and invocations
* Update test to accomodate literal expression change
* Update timespan tests for new resolver pattern
* Update src/CommunityToolkit.Maui.SourceGenerators/Helpers/InitializerExpressionResolver.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Address copilot feedback
* Use Try Pattern
* Update formatting
* Update BindablePropertyModelTests.cs
* Update src/CommunityToolkit.Maui.SourceGenerators/Helpers/InitializerExpressionResolver.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Revert "Update src/CommunityToolkit.Maui.SourceGenerators/Helpers/InitializerExpressionResolver.cs"
This reverts commit 375870b.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Brandon Minnick <13558917+TheCodeTraveler@users.noreply.github.com>1 parent 6c4f8c4 commit 09b80fa
10 files changed
Lines changed: 417 additions & 165 deletions
File tree
- .github/instructions
- src
- CommunityToolkit.Maui.SourceGenerators.UnitTests
- BindablePropertyAttributeSourceGeneratorTests
- CommunityToolkit.Maui.SourceGenerators
- Generators
- Helpers
- Models
- CommunityToolkit.Maui.UnitTests/Services
- CommunityToolkit.Maui/Behaviors/Validators
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
Lines changed: 3 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
602 | | - | |
| 601 | + | |
| 602 | + | |
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | 613 | | |
623 | 614 | | |
624 | 615 | | |
625 | 616 | | |
626 | | - | |
| 617 | + | |
627 | 618 | | |
628 | 619 | | |
629 | 620 | | |
| |||
Lines changed: 24 additions & 120 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 165 | + | |
| 166 | + | |
180 | 167 | | |
181 | 168 | | |
182 | 169 | | |
| |||
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
194 | 197 | | |
195 | 198 | | |
196 | 199 | | |
197 | | - | |
| 200 | + | |
| 201 | + | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
| |||
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
237 | | - | |
| 241 | + | |
| 242 | + | |
238 | 243 | | |
239 | 244 | | |
240 | 245 | | |
| |||
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
| |||
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
307 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
308 | 312 | | |
309 | 313 | | |
310 | 314 | | |
| |||
408 | 412 | | |
409 | 413 | | |
410 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
411 | 422 | | |
412 | | - | |
| 423 | + | |
413 | 424 | | |
414 | 425 | | |
415 | 426 | | |
| |||
517 | 528 | | |
518 | 529 | | |
519 | 530 | | |
520 | | - | |
| 531 | + | |
521 | 532 | | |
522 | 533 | | |
523 | 534 | | |
| |||
532 | 543 | | |
533 | 544 | | |
534 | 545 | | |
535 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
536 | 550 | | |
537 | 551 | | |
538 | 552 | | |
| |||
0 commit comments