public void Initialize(Context context, ScriptingContext scriptContext) { _context = context; _scriptContext = scriptContext; _scriptContext.OnTaskReceive = this.AddTask; _scriptContext.OnSyncTask = this.ExecuteTask; _scriptContext.OnCodeInject = this.GetCodeToInject; _api = Activator.CreateInstance(_context.Config.ApiProviderType) as IApiProvider; _api.RegisterAvailableModules(_context); this.Start(); }