Re: [ADVANCED-DOTNET] Possible to change type definition when the type is loaded?

2002-10-17 Thread Thomas Tomiczek
Thats not really an option. I do this right now, enforcing the class to be abstract and generating a subclass - thats what I want to get rid of :-) Thomas Tomiczek THONA Consulting Ltd. (Microsoft MVP C#/.NET) -Original Message- From: Jason Whittington [mailto:[EMAIL PROTECTED]] Sent:

Re: [ADVANCED-DOTNET] Possible to change type definition when the type is loaded?

2002-10-17 Thread Thomas Tomiczek
You are right - the request is about smuggling object persistence in. Basically trying to get rid of the abstract properties and the abstract requirement for the base class. Though it sounds like this will have to wait, then. BTW - reflection.emit can be used to genrate assemblies dynamically

Re: [ADVANCED-DOTNET] Possible to change type definition when the type is loaded?

2002-10-17 Thread Clemens F. Vasters
-Original Message- From: Ted Neward [mailto:tneward;JAVAGEEKS.COM] Sent: Donnerstag, 17. Oktober 2002 00:37 To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Possible to change type definition when the type is loaded? [...] is what I have in mind here), extract the IL, doctor it, and

Re: [ADVANCED-DOTNET] Possible to change type definition when the type is loaded?

2002-10-17 Thread Clemens F. Vasters
You need to demand ReflectionPermission with ReflectionEmit enabled. That's, for instance, not grantable for the default Internet permission set. -cv -Original Message- From: Thomas Tomiczek [mailto:t.tomiczek;THONA-CONSULTING.COM] Sent: Donnerstag, 17. Oktober 2002 14:55 To: [EMAIL

Re: [ADVANCED-DOTNET] Possible to change type definition when the type is loaded?

2002-10-16 Thread Jason Whittington
Simple problem - sort of. I have a toolkit that needs to change type definitions when the type is loaded. Is there any interface where I could go in between to change the class bytecode (for certain methods) while the class is being loaded? In a way that still goes through the verifier?

Re: [ADVANCED-DOTNET] Possible to change type definition when the type is loaded?

2002-10-16 Thread Ted Neward
You could also potentially work through the URL mechanism, as some Java systems do. Define your own URL format and handler (let's call it the tt protocol), such that YourApp.exe.config could force loading assemblies through your URL handler (tt:file://./YourDLL.dll). Inside this, you extract the