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 attributeIgnoreDuringToString
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 interfaceINotifyPropertyChanged
.3️⃣
MethodTimer.Fody.App
: in this app, i m using MethodTimer in order to measure methods execution time. The attributeTime
is used to mark methods to be measured. The static classMethodTimeLogger
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