public OscriptApplicationModelProvider(ApplicationInstance appObject, IApplicationRuntime framework, IScriptsProvider sourceProvider)
 {
     _fw                      = framework;
     _app                     = appObject;
     _scriptsProvider         = sourceProvider;
     _controllersMethodOffset = ScriptedController.GetOwnMethodsRelectionOffset();
 }
        public AppStarter(IScriptsProvider scripts, IApplicationRuntime webEng, IConfigurationRoot config, ILogger <ApplicationInstance> appLog)
        {
            _scripts = scripts;
            _webEng  = webEng;
            _logger  = appLog;

            var configSection = config?.GetSection("OneScript");
            var libRoot       = configSection?["lib.system"];

            if (libRoot != null)
            {
                var binFolder   = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                var additionals = configSection.GetSection("lib.additional")?
                                  .AsEnumerable()
                                  .Where(x => x.Value != null)
                                  .Select(x => x.Value.Replace("$appBinary", binFolder))
                                  .ToArray();

                libRoot = libRoot.Replace("$appBinary", binFolder);
                InitializeDirectiveResolver(_webEng.Engine, _webEng.Environment, libRoot, additionals);
            }
        }
示例#3
0
        public AppStarter(IScriptsProvider scripts, IApplicationRuntime webEng, IConfigurationRoot config)
        {
            _scripts = scripts;
            _webEng  = webEng;

            var configSection = config.GetSection("OneScript");
            var libRoot       = configSection?["lib.system"];

            if (libRoot != null)
            {
                var binFolder   = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                var additionals = configSection.GetSection("lib.additional")?
                                  .AsEnumerable()
                                  .Where(x => x.Value != null)
                                  .Select(x => x.Value.Replace("$appBinary", binFolder))
                                  .ToArray();

                libRoot = libRoot.Replace("$appBinary", binFolder);

                _webEng.Engine.DirectiveResolver = new LibraryResolverAdHoc(webEng, libRoot, additionals);
            }
        }
示例#4
0
		public DeployMigrationsTask(IMigrationExecuter migrationExecuter, string sciptsPath, IScriptsProvider scriptsProvider) 
			: base(migrationExecuter, sciptsPath, scriptsProvider)
		{
			_migrationExecuter = migrationExecuter;
		}
示例#5
0
 public void CreateInstanceWithNullTextReader()
 {
     // Arrange & Action & Assert
     Assert.Throws <ArgumentNullException>(() => { _provider = new JsScriptProvider(); });
 }
 public BackendScriptsViewComponent(IStorage storage, IScriptsProvider scriptsProvider)
     : base(storage)
 {
     this.scriptsProvider = scriptsProvider;
 }
 public OscriptApplicationModelProvider(IApplicationRuntime framework, IScriptsProvider sourceProvider)
 {
     _fw = framework;
     _scriptsProvider = sourceProvider;
 }
示例#8
0
文件: DeployTask.cs 项目: SMishin/cms
		public DeployTask(IScriptExecuter scriptExecuter, string sciptsPath, IScriptsProvider scriptsProvider)
		{
			_scriptExecuter = scriptExecuter;
			_sciptsPath = sciptsPath;
			_scriptsProvider = scriptsProvider;
		}
 public ScriptController(IScriptsProvider scriptsProvider, ILogger <ScriptController> logger)
 {
     _scriptsProvider = scriptsProvider;
     _logger          = logger;
 }