473,385 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.Kind that was a vsCMPart.vsCMPartPropertySetStmt 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
Apr 10 '08 #1
2 976
Plater
7,872 Expert 4TB
You should be able to do something with the System.Reflection 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
Apr 10 '08 #2
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
Apr 10 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

25
by: Andrew Dalke | last post by:
Here's a proposed Q&A for the FAQ based on a couple recent threads. Appropriate comments appreciated X.Y: Why doesn't Python have macros like in Lisp or Scheme? Before answering that, a...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
2
by: John Baker | last post by:
Hi: I am trying to work my way around a problem (refreshing a form and getting new totals). I think I have the solution, but I need to run an Approcah Macro from V\BA, and am foxed in doing it....
12
by: Laurent Deniau | last post by:
I was playing a bit with the preprocessor of gcc (4.1.1). The following macros expand to: #define A(...) __VA_ARGS__ #define B(x,...) __VA_ARGS__ A() -nothing, *no warning* A(x) -x ...
8
by: Shooter4Life8 | last post by:
I am trying to run a macro from my VB.NET program. Here is my code. Dim myAccess As Access.Application Dim allMacro As String = "ALL-Macros" myAccess.DoCmd.RunMacro(allMacro) I get the error....
8
by: Pawel | last post by:
Hallo group members. //p1.cpp #include <stdio.h> #include <linux/stddef.h> struct Person { int m_age; char* m_name; };
3
by: NickP | last post by:
Hi there, I am trying to do a reflection only load of an assembly, within a new appdomain, within a macro. i.e. create new app domain instantiate class run class
1
by: todWulff | last post by:
Good day folks. Let me open with the statement that I am not a C++/C programmer. The environment that I am programming in is ARMbasic, an embedded BASIC targeted toward ARM-based...
36
by: sh.vipin | last post by:
how to make large macro paste the code as it is Problem Explanation '-- For example in the program below /* a.c - starts here */ #define DECL_VARS() \ unsigned int a0;\ unsigned int a1;\...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.