postsharp / Metalama.Patterns

An open-source, professionally-built and fully supported library of Metalama aspects.
https://www.postsharp.net/metalama
Other
19 stars 1 forks source link

CachingProfile.IsEnabled setter #156

Open ziriax opened 1 month ago

ziriax commented 1 month ago

The docs state that CachingProfile.IsEnabled can be set, but this property is init-only it seems.

It would be handy to be able to enable/disable caching at runtime; maybe this can be achieved differently?

gfraiteur commented 1 month ago

This property is init-only by design. The documentation text is a "feature" of the analyzers we're using (StyleCop).

Caching must now be enabled or disabled at initialization time. What would be your use case to be able to change this setting after startup?