Skip to content

aimenux/FodyDemo

Repository files navigation

.NET

FodyDemo

Playing with fody weaving library

In this demo, i m playing with Fody weaving library.

The solution consists of multiple apps using some of fody plugins :

1️⃣ ToString.Fody.App : in this app, i m using ToString in order to generate ToString implementation for decorated classes. Only public properties will be handled. The attribute IgnoreDuringToString can be used to exclude unwanted public properties.

2️⃣ PropertyChanged.Fody.App : in this app, i m using PropertyChanged in order to raise property changed event in properties setters for classes implementing interface INotifyPropertyChanged.

3️⃣ MethodTimer.Fody.App : in this app, i m using MethodTimer in order to measure methods execution time. The attribute Time is used to mark methods to be measured. The static class MethodTimeLogger is used to customize measure logs.

4️⃣ MethodBoundaryAspect.Fody.App : in this app, i m using MethodBoundaryAspect in order to implement aspects. The sample class use a logging aspect in order to log information before/after methods calling or when an exception is thrown.

Tools : vs22, net 6.0, fody

About

Playing with fody weaving library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages