Example #1
0
 public PreludeScript(
     string script, string fileName, Func <string, Tuple <string, string> > getModuleSourceAndFileName,
     Action <int, Action> cancelCallbackFactory, Action <string, object[]> logger = null)
 {
     _logDelegate                = LogHandler;
     _loadModuleDelegate         = GetModule;
     _getModuleSourceAndFileName = getModuleSourceAndFileName;
     _logger = logger;
     _enterCancellableRegion = EnterCancellableRegion;
     _exitCancellableRegion  = ExitCancellableRegion;
     _cancelCallbackFactory  = cancelCallbackFactory;
     _script = CompileScript(script, fileName);
 }
Example #2
0
 public PreludeScript(
     string script, string fileName, Func<string, Tuple<string, string>> getModuleSourceAndFileName,
     Action<int, Action> cancelCallbackFactory, Action<string, object[]> logger = null)
 {
     _logDelegate = LogHandler;
     _loadModuleDelegate = GetModule;
     _getModuleSourceAndFileName = getModuleSourceAndFileName;
     _logger = logger;
     _enterCancellableRegion = EnterCancellableRegion;
     _exitCancellableRegion = ExitCancellableRegion;
     _cancelCallbackFactory = cancelCallbackFactory;
     _script = CompileScript(script, fileName);
 }