Removed untyped contructor from ComponentRegistration and add a protected setter.
[castle.git] / Experiments / Generator / Generators / Project / Templates / script / console.boo
blobe95afc64a7f1f59c6e01860c7f5786cf97c85670
1 #!/usr/bin/env booi
2 import Boo.Lang.Interpreter
3 import System.IO
5 # Default values
6 config = 'development'
8 # Replace default values by command line arguments
9 config = argv[0] if argv.Length > 0
11 # Switch current dir to find dependencies
12 Directory.SetCurrentDirectory("public/bin")
14 interpreter = InteractiveInterpreter(RememberLastValue: true)
16 # Initialize ActiveRecord
17 interpreter.load("<%= ClassName %>.dll")
18 interpreter.Eval("import System")
19 interpreter.Eval("import <%= ClassName %>")
20 interpreter.Eval("import <%= ClassName %>.Models")
21 interpreter.Eval("Boot.InitializeActiveRecord('${config}', false)")
23 interpreter.Eval("import Castle.ActiveRecord")
24 interpreter.Eval("session as SessionScope = SessionScope()")
26 print "${config} environement loaded"
27 interpreter.ConsoleLoopEval()
29 interpreter.Eval("session.Dispose(false)")