![]() |
VOOZH | about |
dotnet add package MrAdvice --version 2.20.5
NuGet\Install-Package MrAdvice -Version 2.20.5
<PackageReference Include="MrAdvice" Version="2.20.5" />
<PackageVersion Include="MrAdvice" Version="2.20.5" />Directory.Packages.props
<PackageReference Include="MrAdvice" />Project file
paket add MrAdvice --version 2.20.5
#r "nuget: MrAdvice, 2.20.5"
#:package MrAdvice@2.20.5
#addin nuget:?package=MrAdvice&version=2.20.5Install as a Cake Addin
#tool nuget:?package=MrAdvice&version=2.20.5Install as a Cake Tool
Mr. Advice is an open source (and free of charge) alternative to PostSharp (which is still far more advanced, see https://www.postsharp.net).
It intends to inject aspects at build-time. Advices are written in the form of attributes, and marking methods with them makes the pointcut, resulting in a nice and easy aspect injection.
More information about what is an aspect at Wikipedia.
Mr. Advice can weave assemblies for:
Mr. Advice allows you to:
It is available as a 👁 NuGet Status
package. There is also an automatic build with tests at appveyor. The current status is 👁 Build status
Currently, MrAdvice won't bring you any aspect out-of-the-box.
This means you'll have to write your own aspects (however you can see below other packages using Mr. Advice).
So it brings us to the next chapter, which is...
Here is the minimal sample:
public class MyProudAdvice : Attribute, IMethodAdvice
{
public void Advise(MethodAdviceContext context)
{
// do things you want here
context.Proceed(); // this calls the original method
// do other things here
}
}
You then just need to mark the method(s) with the attribute and that's it, your aspect is injected!
[MyProudAdvice]
public void MyProudMethod()
{
}
Your aspects can be injected at assembly, type or method level, simply by setting the attribute:
NuGet packages:
Miscellaneous projects:
Project owner is picrap, feel free to drop a mail ✉️.
Project company is Arx One, a french company editor of backup software solutions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package has no dependencies.
Showing the top 5 NuGet packages that depend on MrAdvice:
| Package | Downloads |
|---|---|
|
MrAdvice.Fody
Obsolete! Use https://www.nuget.org/packages/MrAdvice/ instead! MrAdvice allows to weave aspects at build-time (just like PostSharp, but free as in free beer). Write your own aspects in the form of attributes and apply them to target methods or properties. |
|
|
MrAdvice.MVVM
MrAdvice.MVVM is a lightweight MVVM library. It implements NotifyPropertyChanged, DependencyProperty (dependency and attached), A command binder and some threading management. |
|
|
ZLSoft.QWPlatform.SystemLibraryCore
公共类库组件 |
|
|
SD.AOP.Core
SD.AOP 面向方面编程基础 |
|
|
ArxOne.Persistence
A simple persistence library. Simply mark properties with attributes and they are persisted in registry. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.20.5 | 4,072 | 3/2/2026 |
| 2.20.4 | 451 | 3/2/2026 |
| 2.20.3 | 479 | 3/2/2026 |
| 2.20.2 | 454 | 3/2/2026 |
| 2.20.1 | 2,496 | 1/3/2026 |
| 2.20.0 | 2,337 | 12/20/2025 |
| 2.19.1 | 39,027 | 2/20/2025 |
| 2.19.0 | 800 | 2/17/2025 |
| 2.17.0 | 8,073 | 11/28/2024 |
| 2.16.0 | 30,887 | 8/20/2024 |
| 2.15.0 | 55,358 | 2/1/2024 |
| 2.14.0 | 2,986 | 1/8/2024 |
| 2.13.0 | 1,729 | 11/17/2023 |
| 2.12.2 | 5,084 | 5/12/2023 |
| 2.12.2-t1 | 796 | 5/12/2023 |
| 2.12.1 | 5,517 | 3/28/2023 |
| 2.12.0 | 14,363 | 3/11/2023 |
| 2.11.3 | 1,651 | 3/5/2023 |