C#/VB APP -- Macro help accessing VS Solution

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rms2219
    New Member
    • Apr 2008
    • 2

    C#/VB APP -- Macro help accessing VS Solution

    I recently wrote a macro that opens and inserts comments in every single function in my VS Solution. The reason for this is because we are going to be implementing a trace of all of the functions called for each process. We aren't sure yet what the least "expensive" way to do this would be (from a performance standpoint), but that isn't the purpose of this post.

    What I am having trouble with is the ability to access CodeElements other than functions and namespaces, etc. Specifically, I need to be able to access the "getter" and "setter" properties for private class variables. Because this isn't Java, and you don't need to write specific get()/set() methods, my macro that looks for functions doesn't cut it. I noticed there was a CodeElement.Kin d that was a vsCMPart.vsCMPa rtPropertySetSt mt but that wasn't working for whatever reason. Anyway, I would definitely appreciate any words of wisdon that you felt you could contribute.

    Thank you
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    You should be able to do something with the System.Reflecti on namespace?

    Another possibility would be to switch to a release build and check the box that says like "warn if no xml comments" then it will provide a warning on all public/protected items (objects, functions, methods, properties, classes, namespaces, etc) that don't have proper xml commenting

    Comment

    • rms2219
      New Member
      • Apr 2008
      • 2

      #3
      I was probably not as clear as I should have been in my first post, so I'm sorry for that. I am only inserting comments now for testing purposes. When completed, the macro will be inserting some type of code statement that will do the logging for me. Basically, I just need to figure out a way to have access to the get/set properties

      Comment

      Working...