A few questions

18 views
Skip to first unread message

domehead100

unread,
Apr 12, 2012, 4:12:46 AM4/12/12
to CS-Script
I'm trying to create an app that stores scripts in a database and then
can execute them.

1) In the GUI, when a new script has been typed in by a user, what is
the best way to verify that the script is valid (similar perhaps to
the Verify Script option in the shell extension). Is it just to
attempt to compile it right there?

2) If I created a "library" script that has multiple utility classes,
compiled it, and used AsmHelper to dynamically load the assembly,
would the code in that library be available to other scripts?

Oleg Shilo

unread,
Apr 12, 2012, 9:09:25 AM4/12/12
to cs-s...@googlegroups.com


Please see my comments below.

On Thu, Apr 12, 2012 at 6:12 PM, domehead100 <domeh...@gmail.com> wrote:
I'm trying to create an app that stores scripts in a database and then
can execute them.

1) In the GUI, when a new script has been typed in by a user, what is
the best way to verify that the script is valid (similar perhaps to
the Verify Script option in the shell extension).  Is it just to
attempt to compile it right there?
Correct. 

2) If I created a "library" script that has multiple utility classes,
compiled it, and used AsmHelper to dynamically load the assembly,
would the code in that library be available to other scripts?
Yes if you reference this "library" assembly from these other scripts. 

domehead100

unread,
Apr 12, 2012, 12:21:19 PM4/12/12
to CS-Script


On Apr 12, 9:09 am, Oleg Shilo <oleg.sh...@gmail.com> wrote:
> Please see my comments below.
>
> On Thu, Apr 12, 2012 at 6:12 PM, domehead100 <domehead...@gmail.com> wrote:
> > I'm trying to create an app that stores scripts in a database and then
> > can execute them.
>
> > 1) In the GUI, when a new script has been typed in by a user, what is
> > the best way to verify that the script is valid (similar perhaps to
> > the Verify Script option in the shell extension).  Is it just to
> > attempt to compile it right there?
>
> Correct.
>
>
>
> > 2) If I created a "library" script that has multiple utility classes,
> > compiled it, and used AsmHelper to dynamically load the assembly,
> > would the code in that library be available to other scripts?
>
> Yes if you reference this "library" assembly from these other scripts.

Thanks very much for your answers.

As for referencing the library assembly, would a //css_reference in
the script code be sufficient for that?

Oleg Shilo

unread,
Apr 12, 2012, 5:26:31 PM4/12/12
to cs-s...@googlegroups.com
Correct.
Reply all
Reply to author
Forward
0 new messages