/// <summary> /// Конструктор /// </summary> /// <param name="serviceProvider"></param> /// <param name="httpClient"></param> /// <param name="storage"></param> /// <param name="persistedStorage"></param> /// <param name="logger"></param> /// <param name="properties"></param> public JsExecutor(IServiceProvider serviceProvider, IServerJsHttpClient httpClient, IJsScriptTaskStorage storage, IPersistedStorage persistedStorage, ILogger <JsExecutor> logger, JsExecutorProperties properties) { Components = new JsExecutorComponents(persistedStorage, properties.ExternalComponents, properties.RemoteApis) { JsWorkers = properties.JsWorkers, HttpClient = httpClient }; ScopedServiceProviderAction = properties.ScopedServiceProviderAction; EngineAction = properties.EngineAction; ServiceProvider = serviceProvider; Storage = storage; Logger = logger; }
public JsExecutor(JsExecutorProperties properties) : base(properties.AmbientContext) { _engineProps = properties.EngineProperties; JsWorkers = properties.JsWorkers; _callHandler = new HandleJsCallWorker <TApplication>(AmbientContext, JsWorkers); }