Mike in this case is probably Michael Foord. <a href="http://www.ironpythoninaction.com/">http://www.ironpythoninaction.com/</a><br><br>Here&#39;s a good place to start (from Mike&#39;s blog): <a href="http://www.voidspace.org.uk/ironpython/hosting_api.shtm">http://www.voidspace.org.uk/ironpython/hosting_api.shtm</a><br>
<br>There are lots of variations of hosting, and many patterns. Sounds like you might be wanting to define classes in IPy and instantiate them. Basically, you run the script that defines the class, then get the class object from the runtime scope, then invoke the constructor which returns an instance of the object. Casting should work in that case (provided of course that you&#39;ve derived from the type in question). For example:<br>
<br>        public T Load&lt;T&gt;(string path, params object[] parameters) where T : class {<br><br>                ScriptSource script = _engine.CreateScriptSourceFromFile(path);<br>                CompiledCode code = script.Compile();<br>
                string className = Path.GetFileNameWithoutExtension(path); # this is just a convention<br>                object theClass = _scope.GetVariable(className);<br>                object instance = _engine.Operations.Invoke(theClass, parameters); <br>
                return instance as T;<br>    }<br><br>This isn&#39;t the only info you need, but should give you an idea of how it works. Try searching for &quot;ironpython hosting&quot;<br><br>Hope this helps.<br><br><div class="gmail_quote">
On Mon, Nov 2, 2009 at 4:59 PM, Frank Merrow <span dir="ltr">&lt;<a href="mailto:fmerrow@qualcomm.com">fmerrow@qualcomm.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">At 01:43 PM 11/2/2009, Justin Regele wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Embedding IPy in C# isn&#39;t easy at first, and definitely not super straight-forward, but there are alot of options of how to do it. Get Mike&#39;s book, or at least download the source for the embedding chapter. Embedding ironpython is tricky now, but things are progressing quickly, and there ARE lots of ways to do it--different techniques for different situations.<br>

</blockquote>
<br></div>
Okay, maybe everyone on this list knows, but I don&#39;t . . .<br>
<br>
Mike Who and what book?<div><div></div><div class="h5"><br>
<br>
Frank<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">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>
</div></div></blockquote></div><br>