Metalama / / Conceptual documentation / Using Metalama

Using Metalama

If you want to learn how to use aspects, but do not need to learn how to create new ones, this chapter is for you, and you may stop reading after this one. If you want to learn how to create aspects, starting with this chapter is still a good idea because it introduces the core principles and techniques.

After finishing this guide you should be comfortable using aspects in your codebase.

Who should read this chapter?

Read this chapter if:

  • you have just joined a team that is already using Metalama;
  • you are planning to use ready-made aspects but don't plan to build your own;
  • you plan to create your own aspects in the future, but don't want to put the cart before the horse.

In this chapter

Article Description
Getting aspects This article describes where to get aspects, and lists the sample aspects that will be used for demonstrations across this guide.
Adding aspects to your code This article explains how to use an aspect on a target by adding attributes manually or by using the refactoring menu.
Understanding your aspect-oriented code This article explains how to use Code Lens and Code Diff to understand your code.
Debugging aspect-oriented code This article explains how you can debug this transformed code as you would otherwise do with Visual Studio.
Using live templates Live templates are special kinds of aspects that directly modify your source code in the editor. This article explains how to use them.
Adding many aspects at once Adding aspects by hand or using the refactoring menu is not always possible or viable. Sometimes a programmatic way is needed to add aspects to different targets. This article shows how you can programmatically use Fabrics to add aspects to different targets.