You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactor handling of default parameters in method overloads #105
In “Framework Design Patterns”, under 5.1 “General Member Design Guidelines”, the following recommendations should be followed:
DO make only the longest overload virtual (if extensibility is required). Shorter overloads should simply call through to a longer overload.
CONSIDER using default parameters on the longest overload of a method.
DO provide a simple overload, with no default parameters, for any method with two or more defaulted parameters.
This is inconsistent with how OnTopic is written, which typically relies on one method with default parameters, even in interface and virtual methods. To mitigate this, we should implement explicit, non-virtual overloads for methods with default parameters.
For interfaces, these can be implemented as default implementations so that they don’t break existing implementations, nor require support for future implementations.
Activity