Feature Requests

I suggest you ...

(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Improvement of run-time performance

    Reduce the run-time overhead of PostSharp, especially the load on GC. Specifically, design new kinds of advices that receive the context on the stack and on the heap.

    55 votes
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)

      We’ll send you updates on this idea

    • Interception of calls to constructor aspect

      Add an aspect type to allow to intercept constructor calls and replace them by a factory method.

      43 votes
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)

        We’ll send you updates on this idea

      • Decrease run-time memory usage of PostSharp aspects

        Improve the aspect framework to make it possible to create aspects that consume less memory at runtime. Specifically, improve IInstanceScopedAspect so that there is just one instance per object, not one instance per object and per level of inheritance.

        28 votes
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          Signed in as (Sign out)

          We’ll send you updates on this idea

        • Ability to write more complex custom aspects

          Please be specific and comment which advice/transformation is necessary.

          13 votes
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            Signed in as (Sign out)

            We’ll send you updates on this idea

          • Make MulticastAttribute.AttributeTargetTypes strongly typed

            In order to keep code maintainable, it would be nice it it would be possible to use strongly typed typed in stead of string-based variables for setting the attribute target types when multicasting.

            AttributeTargetTypes=typeof(TargetClass)

            instead of

            AttributeTargetTypes="TargetClass"

            See also:
            http://support.sharpcrafters.com/discussions/suggestions/62-attributetargettypes-strongly-typed

            8 votes
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              Signed in as (Sign out)

              We’ll send you updates on this idea

            • Dynamically provide name, type and implementation for introduced type members

              For example, allow the user to implement IAdviceProvider and return an AdviceInstance for each property to be introduced. Each AdviceInstance will specify the name and type of the property, and getter and setter methods to be invoked. The introduced properties are not required to be defined in the corresponding user aspect type.

              3 votes
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                Signed in as (Sign out)

                We’ll send you updates on this idea

              • provide a method to suppress FxCop warnings via PostSharp

                Today, if I add some aspects to my code, I may get different FxCop warnings, such as CA1062.

                I don't want to disable the rule because some of my code is not enhanced by aspects and I don't wat to loose that warning for such code.
                But I also don't want so suppress such warnings manually as that costs a lot of effort on the code base.

                So it would be really great if I could emit such warning suppressions via an aspect.
                As far as I know FxCop is running on the assemblies before they are enhanced by PostSharp,…

                3 votes
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  Signed in as (Sign out)

                  We’ll send you updates on this idea

                • Implement Singleton pattern

                  Have you planned to add a quick way to implement a C# singleton for a class ?

                  2 votes
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    Signed in as (Sign out)

                    We’ll send you updates on this idea

                  • 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
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      Signed in as (Sign out)

                      We’ll send you updates on this idea

                    • 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
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        Signed in as (Sign out)

                        We’ll send you updates on this idea

                      • 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
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          Signed in as (Sign out)

                          We’ll send you updates on this idea

                        • 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 vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            Signed in as (Sign out)

                            We’ll send you updates on this idea

                          • Provide a way to introduce a new constructor to a class

                            I was going to try to create an aspect that introduced the ISerializable interface to classes, but there does not appear to be a way to add the constructor that is required of classes that implement this interface. Could this ability please be added?

                            1 vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              Signed in as (Sign out)

                              We’ll send you updates on this idea

                            • 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
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                Signed in as (Sign out)

                                We’ll send you updates on this idea

                              • 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
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  Signed in as (Sign out)

                                  We’ll send you updates on this idea

                                • Enable Folding Runtime Values

                                  Hi PostSharp,
                                  I'd like the ability to rewrite function calls and replace them with constants

                                  For 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
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    Signed in as (Sign out)

                                    We’ll send you updates on this idea

                                  • 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
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      Signed in as (Sign out)

                                      We’ll send you updates on this idea

                                    • Don't see your idea?

                                    Feedback and Knowledge Base