Channel: Microsoft Visual Studio
Category: Science & Technology
Description: Gael Fraiteur shows how to use the Metalama extension from PostSharp to reduce boilerplate code and architecture erosion. Chapters 00:00 - Introduction and an overview of PostSharp and Metalama 04:40 - Boilerplate code reduction and using the Log attribute 07:40 - Viewing generated code along with your code 08:55 - Using the Retry attribute 13:00 - Logging with parameters (complex templates) 15:30 - Using the Id attribute 16:20 - Discussion of customizing the templates 19:30 - Validation of source code and using the ForTestOnly attribute 21:30 - Code fixes and customizing the ToString attribute 25:00 - Wrap-up Recommended resources: Learn more about Metalama: postsharp.net/metalama Documentation: doc.metalama.net Online sandbox: try.metalama.net Slack community: metalama.slack.com/join/shared_invite/zt-137spabhz-6DOZXVTTrN5dNXljwVmSsg#/shared-invite/email