Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

FEATURE REQUEST: Compiler Services

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    FEATURE REQUEST: Compiler Services

    I would like to request the addition of ComplierServices to the NT CORE. This will be transparent to the user and low risk (might speed up debugging for programmers as well). With .NET 4.5 "System.Runtime.CompilerServices" were added which gives some very useful features at low cost but HIGH Value.

    Simply add to the module file:
    using System.Runtime.CompilerServices;

    Then any function definition can have optional parameters added such as this:
    Code:
    		public void debug (String message,[CallerMemberName] string memberName = "",
                                 [CallerFilePath] string sourceFilePath = "",
                                 [CallerLineNumber] int sourceLineNumber = 0)
    		{
    			NinjaTrader.Code.Output.Process("From "+memberName+["+sourceFilePath+"] (@"+sourceLineNumber+")   MESSAGE: "+ message
     ,PrintTo.OutputTab1);
    		}
    What this does is now when I call 'debug("Here is my message");' from LOM.GHPLocalOrderManagerOnEvents01.cs within OnExecution() on line 229, I will get output that includes this information:
    OnExecution[LOM.GHPLocalOrderManagerOnEvents01.cs] (@229) Here is my message
    So now I have the Function, source-file and Line number which produced the message. This is great for large projects (and older code where I have searched for "Print" statements that continue to put out messages that I don't want.

    My feeling is this should be a global "Enable/Disable" in the control panel settings. It should enable/disable this additional data to be printed. This would also be helpful in "error messages" to pinpoint the offending line.

    Please let me know if you need help/ideas of how to implement this feature into the core of NT8.

    #2
    Hello,

    Thank you for providing the sample of this.

    I have forwarded this to development as a feature request for further review.

    Please let me know if I may be of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Just wondering if this is still being considered as it would be very helpful to find the exact location of problems while debugging.

      Comment


        #4
        Hello,

        I had submitted this, the tracking id is: SFT-986

        Unfortunately I can not see if this would be implemented or not, this is only a feature request generally it would depending on how many votes this receives and developments review.

        I will add another vote for this.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello,

          I had submitted this, the tracking id is: SFT-986

          Unfortunately I can not see if this would be implemented or not, this is only a feature request generally it would depending on how many votes this receives and developments review.

          I will add another vote for this.

          I look forward to being of further assistance.
          Thanks,

          It just seems like this could help the development team as well. It might be too late to integrate this into the core of NT8.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by zstheorist, Today, 07:52 PM
          0 responses
          3 views
          0 likes
          Last Post zstheorist  
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          149 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          5 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          5 views
          0 likes
          Last Post tkaboris  
          Working...
          X