The proper &quot;DLRish&quot; way to make a C# class &quot;dynamic&quot; is to implement IDynamicMetaObjectProvider. The easiest way to do so for most purposes is to derive from DynamicObject. GetBoundMember is purely an IronPython mechanism. Indeed, anything that uses CodeContext is purely IronPython and will not give you dynamic behavior with any other DLR-based language.<br>
<br>
<div class="gmail_quote">On Sun, Mar 21, 2010 at 5:53 PM, Paul Felix <span dir="ltr">&lt;<a href="mailto:paul.eric.felix@gmail.com">paul.eric.felix@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi,<br><br>I am embedding IronPython in an application for scripting. I&#39;m also making some C# classes &quot;dynamic&quot; by implementing the special DLR methods like GetBoundMember. My signatures for those special methods include the code context:<br>
<br>        [System.Runtime. 
<div>CompilerServices.SpecialName]<br>        public object GetBoundMember(CodeContext codeContext, string name)<br>        {<br>            . . .<br>        }<br><br>I make use of the code context to get access to an object that essentially represents an application-defined context. I like the idea of being able to support other dynamic languages like IronRuby in the future, and I was bolstered by the fact that I could implement the special DLR methods with Microsoft.Scripting namespaces only (no IronPython namespaces).<br>
<br>But in the newer versions of IronPython, the CodeContext type has been moved to an IronPython namespace, thus locking me in to IronPython. To remain independent of any dynamic language, am I going to have to implement the special DLR methods without the code context and find some other way to get at my app object?<br>
<br>Thanks,<br><font color="#888888">Paul<br><br></font></div><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br><a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br>