[Mono-devel-list] Question: Adding Class to corlib

Christoph Stiedl Shorty.10 at gmx.at
Tue Jan 25 03:28:45 EST 2005


 
> Second from your description, you recompiled the compiler but not the 
> corlib. I you fif try to recompile the corlib, it is possible that it 
> may have no be installed correctly in all places (normally you'll have 
> 3 or 4 mscorlib.dll, depending on if you're compiling profiles 1.0 and 
> 2.0) 
 
When make and make install build and install the compiler, what has to be 
done to compile and install the corlib? 
 
I found a solution: The same as discribed below but then I copied the 
corlib.dll from the installed folder into the mono/runtime/... folder and 
recompiled the runtime, then it worked. - so you seem to be right, that it 
has something to do with that it was not installed correctly, is there an 
easier way? 
 
>  
> I think corlib is a bad place to put your Aspect-Oriented experiment. 
> Please create a specific library for that. 
 
The reason why I put this into the corlib is that in my diploma thesis it 
should be shown that there is no need for a separate library but the AOP 
Framework is fully integrated into the corlib and the runtime. 
 
 
> Also, you can investigate the AOP experiments alerady started based in 
> interception using Attributes and ContextBoundObjects. 
>  
 
I had already had a look at them but they aren't useful for my approach. 
 
Thanks very much for your help 
 
Christoph 
 
> Hope it helps, 
>  
> On Mon, 24 Jan 2005 15:30:58 +0100 (MET), Christoph Stiedl 
> <Shorty.10 at gmx.at> wrote: 
> > Hi, 
> >  
> > I'd like to add the following class to the corlib: 
> >  
> > -------------------------------------------------- 
> > using System; 
> >  
> > namespace System.AOP { 
> >         [Serializable]    // check if serializable is necessary 
> >         public class AOPEnvironment { 
> >  
> >                 public AOPEnvironment() { 
> >  
> >                 } 
> >  
> >                 [MethodImplAttribute(MethodImplOptions.InternalCall)] 
> >                 extern static void add_aspect (); 
> >  
> >                 public static void AddAspect() { 
> >                         // add_aspect(); 
> >                 } 
> >  
> >                 public override string ToString() { 
> >                         string result = "AOPEnvironment"; 
> >                         return result; 
> >                 } 
> >  
> >                 // no idea what that is (#if false) 
> >  
> >                 // 
> >                 // These are not on the Framework 
> >                 // 
> > #if false 
> >  
> >                 public override bool Equals(Object obj) { 
> >                         if ((obj == null) || (!(obj is 
AOPEnvironment))) 
> { 
> >                                 return false; 
> >                         } 
> >  
> >                         // check that 
> >  
> >                         //AOPEnvironment rhs = (AOPEnvironment) obj; 
> >  
> >                         //if (FrameCount != rhs.FrameCount) { 
> >                         //        return false; 
> >                         //} 
> >  
> >                         //for (int i = 0; i < FrameCount; i++) { 
> >                         //        if 
> > (!GetFrame(i).Equals(rhs.GetFrame(i))) { 
> >                         //                return false; 
> >                         //        } 
> >                         //} 
> >  
> >                         return true; 
> >                 } 
> >  
> >                 public override int GetHashCode() { 
> >                         // check that 
> >  
> >                         //return FrameCount; 
> >                         return 5; 
> >                 } 
> > #endif 
> >  
> >         } 
> > } 
> >  
> > ------------------------------------------------- 
> >  
> > and use it like this: 
> >  
> > ------------------------------------------------ 
> >  
> >         using System; 
> >         using System.AOP; 
> >  
> >         public class Simple { 
> >  
> >                 public static void Main(string[] args) { 
> >                         AOPEnvironment.AddAspect(); 
> >                 } 
> >  
> >         } 
> > ------------------------------------------------ 
> >  
> > What is necessary for that? I created the folder System.AOP in 
> > corlib and added the line 
> >  
> > System.AOP/AOPEnvironment.cs 
> >  
> > in the File colib.dll.sources. 
> >  
> > After compiling and installing the Compiler = 
> > make and make install in the directory mcs-1.0.2 
> > i compile my file: 
> >  
> > mcs Simple.cs and get the following error: 
> >  
> > error CS0246: The namespace `System.AOP' can not be found (missing 
> > assembly reference?) 
> >  
> > What is wrong? Are there more places I have to make changes? 
> >  
> > Thanks for your help 
> >  
> > Christoph 
> >  
> > -- 
> > 10 GB Mailbox, 100 FreeSMS http://www.gmx.net/de/go/topmail 
> > +++ GMX - die erste Adresse für Mail, Message, More +++ 
> > _______________________________________________ 
> > Mono-devel-list mailing list 
> > Mono-devel-list at lists.ximian.com 
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list 
> >  
>  
>  
> --  
> Rafael "Monoman" Teixeira 
> --------------------------------------- 
> I'm trying to become a "Rosh Gadol" before my own eyes.  
> See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment. 
> _______________________________________________ 
> Mono-devel-list mailing list 
> Mono-devel-list at lists.ximian.com 
> http://lists.ximian.com/mailman/listinfo/mono-devel-list 
>  
 

-- 
GMX im TV ... Die Gedanken sind frei ... Schon gesehen?
Jetzt Spot online ansehen: http://www.gmx.net/de/go/tv-spot



More information about the Mono-devel-list mailing list