The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
The great Sufi poet, Kabir, wrote: "where there is a garden, the flowers will come" ("rahi gulzat to phool khilenge").
I am sure you are a flower, as well as someone who will be an excellent gardener !
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
nice to meet you and welcome to the big "family" of CP.
See you around
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
dxgTaxCodes, // Initialize the tax code grid
tc => !tc.Archived, // with non-archived tax codes
archiveController.OnTaxCodeDeleted, // archive tax codes that are deleted
archiveController.OnTaxCodeChanging, // archive tax codes that are changing
onFinalized: (_, __) => // when the tax code record has been updated...
dxgProducts, // we need to refresh the products with the cloned
// (non-archived) version
p => !p.Archived, // which is not archived
archiveController.OnProductDeleted, // and when the product is deleted, archive it
archiveController.OnProductChanging, // or when the product is changed, archive it
updateLookups: true, // force a fetch of any new lookups
// (ie, the tax code, which is a lookup)
decoupledLookups: true, // but don't couple this with the cached tax code
// table that's a lookup in product grid
onFinalized: (___, ____) => Common.Initialize<ProductSchedule>(
dxgProductSchedules, // and when a product record is updated,
// update the product-schedule grid
ps => !ps.Archived, // with active product-schedules
updateLookups: true, // forcing a fetch of lookups (products and schedules)
decoupledLookups: true))); // and decoupled from the cached product and
// schedule tables backing the product and
// schedule grids.
Readability is partially a matter of taste I guess, but I think if the onFinalized's weren't inlined, the three remaining blocks wouldn't be as intimidating anymore and you would probably not need any comments at all.