veloxdev-add-aspects

Add aspect-oriented interception to VeloxDev classes via compile-time generated proxies.

37|12|Updated Jun 5, 2025
One-click install
npx skills add https://github.com/Axvser/VeloxDev --skill veloxdev-add-aspects-axvser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: veloxdev-add-aspects
Source: https://github.com/Axvser/VeloxDev/tree/main/skills/veloxdev-add-aspects
Command: npx skills add https://github.com/Axvser/VeloxDev --skill veloxdev-add-aspects-axvser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? You need to log, veto, replace, or react to a member's behavior in a VeloxDev class without editing that member's own code, and without runtime reflection or assembly scanning. ## Core Features & Use Cases - Compile-time proxy generation: Mark fields, properties, or methods with [AspectOriented] and a source generator emits the interface plus the Aop() entry point at build time. - Three-stage hooks: Attach start, coverage, and end handlers per member via SetProxy, where a non-null coverage handler replaces the member body entirely. - Per-instance interception: Each object gets one cached proxy, so hooks installed once after construction apply for the object's lifetime. - Use Case: Log every read of a view-model property, veto a Reset() method so its body never runs, or extend a collection-changed handler the class already calls internally. ## Quick Start Add aspect hooks to my VeloxDev view model so that setting the Name property is logged and the Reset method is vetoed through the Aop() proxy.

Frequently Asked Questions about veloxdev-add-aspects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I intercept a method call in C# without modifying its code?

Mark the public method with [AspectOriented] in a VeloxDev class, then call it through the generated Aop() proxy. Use SetProxy with a coverage handler to replace the body or an end handler to react after it runs.

How do I add logging to property getters and setters in VeloxDev?

Mark the property or its MVVM-attributed backing field with [AspectOriented], then call SetProxy with ProxyMembers.Getter or Setter and an end-stage handler. Getter and setter must be hooked separately, and calls must go through Aop().

Why is my VeloxDev aspect not firing when the member is called?

Aspects only intercept calls made through the Aop() proxy, not direct calls on the instance or internal self-calls. Also verify the member is public, marked with [AspectOriented], and not an overloaded method, since the generator skips these silently.

Does VeloxDev AOP work on .NET Framework or netstandard2.0?

No. The aspect-oriented types in VeloxDev.Core are compiled for .NET 5 and later, so netstandard2.0 and .NET Framework targets cannot use them. The feature works identically across all supported GUI adapters.

What are the limitations of compile-time proxy interception?

Constructors, fields, static members, and events cannot be intercepted, and overloaded methods fail because lookup is by name only. Proxies are held in a static registry, so they and their targets live until the process ends.