tags:

views:

204

answers:

5

I need it, but don't want to reinvent hot water.

Question by example, syntax just as possible example :

.net> load myLibrary.dll
myLibrary.dll loaded

.net> Person p "John" "Doo" 32
Instance of myLibrary.Person created (p)

.net> print p.Age
32

So I'm looking for a commandline interface to access the public methods and properties of an assembly. (In this example the Ctor of Person(string,string,int) was invoked and after that the property Age was printed to the console.)

Although I would be happy with any solution to this,

  • I need the sourcefiles to, so I can adapt them... (I prefere c# very much)
  • I need it to be free and redistributable

Any ideas?

UPDATE : If I cannot find a good solution, i will program it myself, anyone interested can contact me at gmail, that is phelsen at.

+6  A: 

You might want to look into Powershell, although there is no source available to my knowledge. The syntax isn't exactly C#, but it's fairly easy to pick up.

HTH, Kent

Kent Boogaart
+2  A: 

Have you tried PowerShell (formerly code named Monad)? It's a CLI, based on .NET, and with full access to assemblies, albeit with a different model than the 'load assembly' procedure you indicated.

Pontus Gagge
+3  A: 

F# has a command-line REPL (fsi.exe). And the code for F# is available.

(See http://strangelights.com/fsharp/wiki/default.aspx/FSharpWiki/FSI.html for an old screenshot to get an idea.)

Brian
+6  A: 
Marc Gravell
+2  A: 

IronPython also has a REPL.

Brian