You need to build a fake System.Core.dll with just these types.

Most probably you can just take mono's System.Core.dll.

On Wed, Sep 3, 2008 at 6:37 PM, Dan Shryock <[EMAIL PROTECTED]> wrote:

> Hi All,
>
> I'm working on a project which is using some C# 3.0 features, but I am
> hoping to target the .NET 2.0 runtime on windows.
>
> >From what I have read[1] I should be able to add my own
> implementations of the few types I need.
>
> My real question is how do I stop gmcs from adding references to
> System.Core.dll, and instead use my implementations of those types?
>
> The types I have added to enable extension methods, and generic Func,
> and Action delegates are below:
>
> namespace System{
>        public delegate void Action<T1>(T1 t1);
>        public delegate void Action<T1,T2>(T1 t1,T2 t2);
>        public delegate void Action<T1,T2,T3>(T1 t1,T2 t2,T3 t3);
>        public delegate void Action<T1,T2,T3,T4>(T1 t1,T2 t2,T3 t3,T4 t4);
>        public delegate R Func<R>();
>        public delegate R Func<T1,R>(T1 t1);
>        public delegate R Func<T1,T2,R>(T1 t1,T2 t2);
>        public delegate R Func<T1,T2,T3,R>(T1 t1,T2 t2,T3 t3);
>        public delegate R Func<T1,T2,T3,T4,R>(T1 t1,T2 t2,T3 t3,T4 t4);
> }
> namespace System.Runtime.CompilerServices{
>        public class ExtensionAttribute:Attribute{}
> }
>
> Thanks for any help you can give.
>
> Dan
>
>
>
> [1]
> http://www.danielmoth.com/Blog/2007/05/using-extension-methods-in-fx-20.html
> _______________________________________________
> Mono-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-list
>
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to