Feature Requests
-
Trace all methods called within a specific method
It will be great if I could get execution time of all methods executed during execution of specific method.
1 vote -
Trace all methods called within a specific method
It will be great if I could get execution time of all methods executed during execution of specific method.
0 votes -
Add OnEntryAsync etc to OnMethodBoundaryAspect
Currently, OnEntry etc are all void methods, meaning they're not inherently async friendly. It's becoming exceedingly rare to be able to write code without calling async methods these days, and it's more and more common to need to call async methods from within an OnMethodBoundary aspect (database or web service calls especially).
The naïve approach of simply changing the override signature to make the aspect async void in order to be able to await within the aspect has subtle issues which are not intuitive to debug.
Ideally, we'd have additional overrides available in OnMethodBoundaryAspect for Task OnEntryAsync and Task OnExitAsync…
0 votes -
Enable Folding Runtime Values
Hi PostSharp,
I'd like the ability to rewrite function calls and replace them with constantsFor example, if I have this code:
Console.WriteLine(MultAdd(1,3));
[Fold]
public static void MultAdd(int x, int y){
return x*y+4;
}I would like to rewrite my code to:
Console.WriteLine(7);
I believe this would cause significant performance gains by essentially moving evaluations from runtime to compile time.
0 votes -
Allow Dynamic Introduction of Static Members and Module Initializers
I understand that at the IL level these are actually two separate types of injection, but I have on several occasions wished I could add a module initializer to an assembly from an aspect provider, not by marking an existing static member as one but by including the module initialization behavior in the aspect itself. Similarly, there are a few types which could have benefited from automatic introduction of static members (perhaps a new StaticTypeLevelAspect base class?). I imagine these are similar in some manner of abstract implementation detail, yet wind up being somewhat unrelated due to the way module…
1 vote -
Improved Granularity for Multicasting Call-Site (External) Advice
Allow usage of External target attributes to be used in conjunction with aspects applied to types or methods, rather than just assembly-wide introduction.
It would also be especially helpful to be able to use something similar to aspect providers to choose which external methods to advise with which advice, sharing aspect instances as desired rather than applying a single universal aspect instance to all sites. It seems like this might be better suited for a new interface, but the important feature would be to allow the provider logic to decide which advices to apply based on the context of the…
1 vote -
0 votes
-
generate method caching key automatically
I've came up with a solution for generating the caching key automatically especially for non-primitive complex types such as (student) [without using hashcode method]
my idea is specifying the important properties in the caching attribute
~ i've exerted a considerable effort in that solution ~Contact me for more details if you are interested. ~best wishes1 voteWe plan to implement this feature but we have currently a performance issue and need more work on the Aspect Framework as a prerequisite.
-
OnPropertyNameChanged, OnPropertyNameChanging callbacks
We often want to do something when a certain property value changes. Therefore, it will be very convenient if in the case of a value change, the PostSharp library will run a predefined function.
For example, in ViewModel there is a property named ProductId.
The programmer will be able to write a function called OnProductIdChanged that will be executed if the ProductId value changes.
How it will happen: When the value of a property changes, the PostSharp library checks whether there is a function named OnPropertyNameChanged. If it does, it will be executed.
This need is so common, and saves…
2 votes -
Make Caching aspect work concurrently
Currently, calling a decorated method concurrently invokes the method twice. For more information and a workaround, see http://support.sharpcrafters.com/discussions/problems/4347-cache-aspect-concurrency
1 votePlanned for PostSharp 5.1.
-
Logging - Support for obfuscation
The logging feature in PostSharp 5.0 is not designed for obfuscation. The idea is to make it obfuscation-friendly. Some problems to address are:
1. When type names are obfuscated, the hierarchy of namespaces (LoggingNamespaceSource) is lost.
2. Member names are not obfuscated.
3. Source files, lines and columns are not obfuscated.1 vote -
Logging - Add support for event properties in the Logger class
Like for instance LogEventInfo in NLog.
1 vote -
Opt out of NotifyPropertyChanged aspect
NotifyPropertyChanged generates an unbearable overhead if the call count reaches millions of times.
Often the concerning properties are read-only (e.g. an ID), so wouldn't need PropertyChanged support at all.
I would like a way to opt out of PropertyChanged for individual properties.
1 votePlanned for PostSharp 5.1.
-
Change misleading alternative in Niche Languages column
Here is page https://www.postsharp.net/alternatives.
Here is column header
```
Niche Languages
F#, Erlang
```I doubt Erlang relates to .NET as viable alternative at at all.
Niche Language which is Niche and is concurrent of Postsharp is https://github.com/rsdn/nemerle.What `niche language` means?
F# may be `niche` as current number of users.
But F# is NOT Niche about its applicability. Its applicable in areas of scripting and tooling and data munging and secured engineering is LARGER than of C#. In this sense C# is `niche`.About F#. Your statements are wrong and do you bad job advertising Postsharp product…
1 vote -
ReaderWriterSynchronized Model should allow finding out what lock is held at the moment
I want to put assertions in my code like "must not have writer lock here".
It is crucial to know what lock is held in a certain situation.
When I apply attributes (Reader, Writer, ExplicitlySynchronized, Yielder) I make assumptions on what they will do, but there is no way to check my assumptions.I tried using the IConcurrencyController.CheckAccess method, but it does not do what I need.
2 votes -
Point to a specific page on doc.postsharp.com when pressing F1 in Visual Studio on a code from any PostSharp namespace.
When you press F1 on any code from Microsoft, it takes you to the appropriate doc on MSDN. PostSharp can do the same with its types/methods/etc and doc.postsharp.net.
1 vote -
Support auto-property initializer construction for LocationInterceptionAspects
The method OnSetValue() of the LocationInterceptionAspect isn´t called when you initialize your properties using auto-property initiliazers. This can be confusing because you expect that your aspect will be called if a property value is changed, no matter where and how.
1 voteThis is by design (the same applies to fields) and will be addressed in PostSharp 5
-
Detection of inadequate "SkipPostSharp" flag
Sometimes someone switches on the SkipPostSharp flag in a project, then a few months later, someone else adds some aspect to this project, and wonders why it does not execute properly. Sometimes this is obvious, sometimes not. For the cases when it is not obvious, there could be a special build flag, applies solution-wide, that would emit an *error* if SkipPostSharp is set but PostSharp is required anyway.
0 votes -
Clonable
Automatic implementation of IClonable
0 votes -
Equality aspect
Automatic generation of Equals and GetHashCode.
0 votes
- Don't see your idea?