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.

  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
      I agree to the terms of service
      Signed in as (Sign out)

      We’ll send you updates on this idea

    • Customizable exceptions thrown by Contracts aspects

      E.g. NotEmpty throws ArgumentNullException even when string parameter is empty. It should be possible to change the default behavior so that ArgumentException would be thrown instead.

      18 votes
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)

        We’ll send you updates on this idea

      • Management API for logging, metrics, caching, circuit breaker aspects

        To expose the aspects to runtime management or monitoring facilities such as WMI, to enable scenarios like: enable/disable logging or caching, reset cache, open/close a circuit breaker... without having to restart the application.

        32 votes
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)

          We’ll send you updates on this idea

        • Event aggregation aspect

          Automatically publishes events of an object to an event aggregator.

          32 votes
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            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
              I agree to the terms of service
              Signed in as (Sign out)

              We’ll send you updates on this idea

            • Enable Logging to Support Elapsed Time

              I have finally taken some time to learn the logging capabilities of PostSharp. And while it does work very well as advertised, I am a bit surprised to see that you cannot profile/display the elapsed time in addition to all the information included in the logging data.

              Please consider adding this capability in a robust, rich, and templated manner.

              3 votes
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)

                We’ll send you updates on this idea

              • Support security attributes

                When we use method interceptor, original method is replaced with some new method, which doesn't preserve CustomAttributes of original methods. It become big problem, if original method was marked with SecuritySafeCritical/SecurityCritical attributes or some other security-specific attributes. Here is sample:

                using System;
                using System.Security;
                using PostSharp.Aspects;
                [assembly: AllowPartiallyTrustedCallers]
                internal class Program
                {
                private static void Main(string[] args)
                {
                SafeCritical();
                Console.ReadKey();
                }
                [TestMethodInterceptor]
                [SecuritySafeCritical]
                private static void SafeCritical()
                {
                Critical();
                }
                [SecurityCritical]
                private static void Critical()
                {
                Console.Write("Critical");
                }
                }
                [Serializable]
                [AttributeUsage(AttributeTargets.Method)]
                public sealed class TestMethodInterceptor : MethodInterceptionAspect
                {
                public override void OnInvoke(MethodInterceptionArgs arguments)
                {
                }
                }
                Expected result: See "Critical"…

                11 votes
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)

                  We’ll send you updates on this idea

                • Circuit breaker aspect

                  The aspect would prevent the execution of a method if the failure rate has been too high in the recent past.

                  11 votes
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    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
                      I agree to the terms of service
                      Signed in as (Sign out)

                      We’ll send you updates on this idea

                    • Aspects for performance and realibility metrics

                      Metrics like execution time, failure rate, ...

                      19 votes
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)

                        We’ll send you updates on this idea

                        1 comment  ·  Admin →
                      • Remove NuGet Package Source During Uninstallation

                        The uninstall process doesn't seem to include a mechanism for removing the NuGet Package Source. This can break the build and generate a heap of warnings.

                        The uninstall process should also take care of this concern.

                        Details here: http://jameschambers.com/2015/07/response-from-postsharp-net-is-not-a-valid-nuget-v2-service-response/

                        18 votes
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          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
                            I agree to the terms of service
                            Signed in as (Sign out)

                            We’ll send you updates on this idea

                          • Don't modify project file by install.ps1

                            Instead of custom modification project files by install.ps1 (when installing NuGet package) use PostSharp.targets and PostSharp.properties from standard build folder in Nuget package.

                            1 vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service
                              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
                                I agree to the terms of service
                                Signed in as (Sign out)

                                We’ll send you updates on this idea

                                1 comment  ·  Admin →
                              • Add a Async OnInvokeAsync to the MethodInterceptionAspect for when an async method is decorated.

                                To better support when an async function is decorated with the MethodInterceptionAspect add an additional overridable function:
                                Async Task OnInvokeAsync(MethodInterceptionArgs args)
                                This would get called only if the base function has the async keyword on it, and if it's not overridden would call the normal OnInvoke.

                                In a current application I am needing to await something if the return result is Task<t> but can't

                                2 votes
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  I agree to the terms of service
                                  Signed in as (Sign out)

                                  We’ll send you updates on this idea

                                  1 comment  ·  Admin →
                                • Ability to write more complex custom aspecs

                                  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
                                    I agree to the terms of service
                                    Signed in as (Sign out)

                                    We’ll send you updates on this idea

                                  • Don't see your idea?

                                  Feature Requests

                                  Feedback and Knowledge Base