HighTechTalks DotNet Forums  

Using the IExpando interface

Dotnet Scripting microsoft.public.dotnet.scripting


Discuss Using the IExpando interface in the Dotnet Scripting forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Matt Adamson
 
Posts: n/a

Default Using the IExpando interface - 08-14-2005 , 04:00 PM






Guys,

Does anyone know much about the IExpando interface?

I have a business object I've created and I'd like to add support for
methods / attributes at runtime so that scripting clients ( e.g. ASP /
VBScript / Java script ) can call the .NET object through a RCW and invoke
methods which are added at runtime.

Do I need to inherit my .NET class from IExpando and implement methods such
as AddMethod. Are these called by the scripting engine to resolve methods
which don't exist. e.g. assume a query class contains methods such as Save
however a method Resolve needs to be added at runtime so I can write code
such as

oQuery.Resolve.

Cheers

Matt



Reply With Quote
  #2  
Old   
Bruce Barker
 
Posts: n/a

Default Re: Using the IExpando interface - 08-15-2005 , 11:54 AM






no. vbscript and javascript are com based. normally to call a .net objetc, a
com wrapper is created. this won't work with the IExpando (a javascript.net
only interface).

if you study the com-interop library, you can implement the com IUnkown
interface that the scripting languages use.


-- bruce (sqlwork.com)


"Matt Adamson" <Adamson_Matthew (AT) hotmail (DOT) com> wrote

Quote:
Guys,

Does anyone know much about the IExpando interface?

I have a business object I've created and I'd like to add support for
methods / attributes at runtime so that scripting clients ( e.g. ASP /
VBScript / Java script ) can call the .NET object through a RCW and invoke
methods which are added at runtime.

Do I need to inherit my .NET class from IExpando and implement methods
such
as AddMethod. Are these called by the scripting engine to resolve methods
which don't exist. e.g. assume a query class contains methods such as Save
however a method Resolve needs to be added at runtime so I can write code
such as

oQuery.Resolve.

Cheers

Matt





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.