It's located in Microsoft.Scripting.dll (not to be confused w/
Microsoft.Scripting.Core.dll).
The way you use this is you apply the assembly level attribute like:
[assembly: ExtensionType(typeof(String), typeof(MyStringExtensions))]
And then you define MyStringExtensions:
public static class MyStringExtensions {
[SpecialName]
public static string GetCustomMember(string self, string name) {
return name;
}
[SpecialName]
public static void SetMember(string self, string name, object value) {
Console.WriteLine("Set called, {0}, {1}", name, value);
}
}
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Huzaifa
Sent: Tuesday, July 29, 2008 11:31 AM
To: [email protected]
Subject: Re: [IronPython] IAttributesInjector
I could not find it "Microsoft.Scripting.Runtime.ExtensionTypeAttribute"
Han Kejing wrote:
>
> Maybe is the "Microsoft.Scripting.Runtime.ExtensionTypeAttribute"
> attribute.
> You can found some simples in IronPythonTest project.
>
> ----------------------------------------------------------------
> Follow my heart
> Colin Han @ GrapeCity
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Huzaifa
> Sent: 2008年7月29日 15:26
> To: [email protected]
> Subject: [IronPython] IAttributesInjector
>
>
> I can not find this interface in ironpython 2.0 .What is the alternative
> if
> this interface have been removed.
> --
> View this message in context:
> http://www.nabble.com/IAttributesInjector-tp18701101p18701101.html
> Sent from the IronPython mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
--
View this message in context:
http://www.nabble.com/IAttributesInjector-tp18701101p18718581.html
Sent from the IronPython mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com