Esempio n. 1
0
 public DsfScriptingActivity()
     : base("Script")
 {
     Script       = string.Empty;
     Result       = string.Empty;
     EscapeScript = true;
     IncludeFile  = "";
     _sources     = new StringScriptSources();
 }
        public IScriptingContext CreateEngine(enScriptType scriptType, IStringScriptSources sources)
        {
            switch (scriptType)
            {
            case enScriptType.JavaScript:
                return(new JavaScriptContext(sources));

            case enScriptType.Python:
                return(new Dev2PythonContext(sources));

            case enScriptType.Ruby:
                return(new RubyContext(sources));

            default: throw new Exception(ErrorResource.InvalidScriptingContext);
            }
        }
Esempio n. 3
0
 public JavaScriptContext(IStringScriptSources sources)
 {
     _jsContext     = new ScriptEngine();
     _scriptSources = sources;
     AddScriptSourcesToContext();
 }
Esempio n. 4
0
 /// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class.</summary>
 public Dev2PythonContext(IStringScriptSources sources)
 {
     _sources = sources;
 }
Esempio n. 5
0
 public RubyContext(IStringScriptSources sources)
 {
     _sources = sources;
 }