Embedded scripting language for C#?

I'm designing a business application in C#  that will allow the end-user to extend and automate some of the processes (like sending emails and checking stock levels), and I want to offer a scripting language interface for doing that as well as a wizard-type interface with drop down boxes, etc.

What I'm wondering is, whether I'd need to design a scripting language myself from scratch, and map some of the scripting functions to internal C# classes, etc, or whether there's something I can plug in and just update some kinda configuration file to define custom functions?

I want to make it really simple for the end user, to do things like...

If (Customer.HasPurchased(ProductA))
End If

Any suggestions?
Who is Participating?
gregoryyoungConnect With a Mentor Commented:
I think what you are lookingfor isnt necesarily a scripting language but a workflow tool with GUI interface etc to make things easier for end users to deal with but while at the same time allowing power to do alot of customization. Is this correct?

Take a look at windows workflow foundation. I think you will find it meets your needs well.


Mike TomlinsonMiddle School Assistant TeacherCommented:
"or whether there's something I can plug in and just update some kinda configuration file to define custom functions?"

I think that's just wishful thinking...

You can use native C# by utilizing the Reflection.Emit namespace.

Or you could allow the use of VBScript via the Microsoft Script Control.
ljbensonAuthor Commented:
Greg, I'll take a look at WF, thanks.

I haven't used it yet, so I'm not sure how close that comes to what I'm trying to do. Essentially, my software will be part desktop, part server-side.

I'd like for my users to create a "flow chart", of sorts, that defines processes within the software. Since it's an e-commerce/business automation tool, that will be things like "If customer is from X, then do X, else do X" type thing.

I'd also like to use some embedded personalization variables in stuff like e-mails...  so they can write "Hi %Customer.Name%", etc.

That is exactly what workflow does :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.