Parameters
Special parameters can be set in the methods, which can be used to control the behavior of the body written in that method. Suppose there is a LogException method that saves the exception into the database and also sends an email. Now, whenever this method is called, both the tasks will be performed. There is no way to stop sending an email for a particular exception from the code. However, if it is articulated in a way and uses some parameters to decide whether the email has to be sent out or not, it can be controlled. Nonetheless, if the existing code doesn't support this parameter, then customization is required, but, while designing, we can keep this approach to expose certain parameters so that we can handle the internal behavior ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access