Commit 3fd9720
committed
Provide escape at top of
By moving all of the key variables and logic for `isDirty` to the top of `Save()` (baaaf4d
), we can now escape the `Save()` method early if nothing has actually changed. This prevents the need to populate the indexed attributes `DataTable`, extended attributes XML, and command parameters, even though none of those would be used.
(Alternatively, it saves from wrapping the bulk of the method in a conditional block, which I wanted to avoid.)
To facilitate this, the closing logic of iterating over child topics as part of the `isRecursive` support is centralized into a new local `recurse()` method, so that we don't need to repeat that logic.Save() if !isDirty
1 parent baaaf4d commit 3fd9720
1 file changed
Lines changed: 23 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
365 | 373 | | |
366 | 374 | | |
367 | 375 | | |
| |||
472 | 480 | | |
473 | 481 | | |
474 | 482 | | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
479 | 486 | | |
480 | 487 | | |
481 | 488 | | |
| |||
510 | 517 | | |
511 | 518 | | |
512 | 519 | | |
513 | | - | |
| 520 | + | |
514 | 521 | | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 522 | + | |
| 523 | + | |
521 | 524 | | |
522 | 525 | | |
523 | | - | |
| 526 | + | |
524 | 527 | | |
525 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
526 | 536 | | |
527 | 537 | | |
528 | 538 | | |
| |||
0 commit comments