[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Use CodeDOM to add functionality to a Library class

Posted on 2003-11-13
2
Medium Priority
?
212 Views
Last Modified: 2012-03-15
Howdy everyone!

I've been hanging out with the Aspect Oriented Programming crowd, and they talk about doing runtime weaving where they add fields and functions to an already existing compiled class in the library using CodeDOM. However, I've been unable to find any source code for how this might be done.

I need code that will take an existing class and add functionality to it at runtime.

If a specific example is necessary, I'd like to take the base class Control and add a virtual function with the signature
 int minXSize();

Anyone have a clue how to do this, or if it's possible? The guys in AOP land say they are doing it, but again, I haven't seen any code.

I know this is a tough question, so I'm throwing out the big points.

-Kelly
0
Comment
Question by:kellycoinguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
dhodge earned 1500 total points
ID: 9749763
Did you investigate VSA, I know it's not quite adding a function at run time however with a little rethought it could help.

For example you could add a public function to the base object that simply ran a script in a known place, thus you'd be kind of giving yourself the flexibility to add what ever you want to the code.

I am also very interested in CodeDOM and like you never got anywhere, I have had a little success with Microsoft.Vsa though.
0
 
LVL 1

Author Comment

by:kellycoinguy
ID: 10453476
Thanks for at least trying to answer the question dhodge... I know this is a very tough one.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question