Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Latest commit

 

History

History
31 lines (23 loc) · 2.2 KB

File metadata and controls

31 lines (23 loc) · 2.2 KB

How Virtuosity works

The following methods are excluded because they can't be virtual:

  • static methods
  • private methods
  • methods in sealed classes

Why is this useful

Maybe you're using one of the following tools:

All these tools make use of DynamicProxy. DynamicProxy allows for runtime interception of members. The one caveat is that all intercepted members must be virtual. This means that that all the above tools, to some extent, require members to be virtual:

When a member is not virtual these tools will not work and fail in sometimes very unhelpful ways. So rather than having to remember to use the virtual keyword, Virtuosity means members will be virtual by default.

You may also just prefer to work with all methods virtual by default, as in Java.