Ejemplo n.º 1
0
        public Startup(IHostingEnvironment env)
        {
            var builder = new ConfigurationBuilder()
                          .AddJsonFile("appsettings.json")
                          .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
                          .AddEnvironmentVariables();

            Configuration = builder.Build();
            _env          = env;
            var moduleLoaderFactory = new ModuleLoaderFactory();

            _moduleLoader = moduleLoaderFactory.BuidlerModuleLoader(new ModuleLoaderOptions
            {
                NugetSources = new List <string>
                {
                    @"d:\sidfeeds\core\",
                    @"d:\sidfeeds\tools\",
                    "https://api.nuget.org/v3/index.json",
                    "https://www.myget.org/F/advance-ict/api/v3/index.json"
                },
                ModuleFeedUri = new Uri("http://localhost:60008/configuration"),
                ProjectName   = "EventStore"
            });
            _moduleLoader.ModuleInstalled         += ModuleInstalled;
            _moduleLoader.UnitsRestored           += HandleUnitsRestored;
            _moduleLoader.ModulesLoaded           += ModulesLoaded;
            _moduleLoader.ModuleCannotBeInstalled += ModuleCannotBeInstalled;
            _moduleLoader.Initialize();
            _moduleLoader.RestoreUnits().Wait();
            _moduleLoader.LoadUnits();
        }
        public Startup(IHostingEnvironment env)
        {
            _env = env;
            var moduleLoaderFactory = new ModuleLoaderFactory();

            _moduleLoader = moduleLoaderFactory.BuidlerModuleLoader(new ModuleLoaderOptions
            {
                NugetSources = new List <string>
                {
                    @"d:\sidfeeds\core\",
                    @"d:\sidfeeds\tools\",
                    "https://api.nuget.org/v3/index.json",
                    "https://www.myget.org/F/advance-ict/api/v3/index.json"
                },
                ModuleFeedUri = new Uri("http://localhost:60008/configuration"),
                ProjectName   = "ScimProvider"
            });
            _moduleLoader.ModuleInstalled         += ModuleInstalled;
            _moduleLoader.UnitsRestored           += HandleUnitsRestored;
            _moduleLoader.ModulesLoaded           += ModulesLoaded;
            _moduleLoader.ModuleCannotBeInstalled += ModuleCannotBeInstalled;
            _moduleLoader.Initialize();
            _moduleLoader.RestoreUnits().Wait();
            _moduleLoader.LoadUnits();
        }
Ejemplo n.º 3
0
    private static V8EngineCore CreateCore()
    {
        var pathResolver  = new ModulePathResolver("", new[] { ".js", ".json", ".dll" }, "index");
        var loaderFactory = new ModuleLoaderFactory();

        core = new V8EngineCore(pathResolver, loaderFactory, iDebuggingPort);
        return(core);
    }
Ejemplo n.º 4
0
        public RShipCore CreateCore()
        {
            var modulesPath   = Path.Combine(PathHelpers.GetAssemblyDirectory(), "ship_modules");
            var pathResolver  = new ModulePathResolver(modulesPath, new[] { ".ship", ".js", ".json", ".dll" }, "index");
            var loaderFactory = new ModuleLoaderFactory();
            var core          = new RShipCore(pathResolver, loaderFactory);

            return(core);
        }
        public async Task WhenRestorePackages()
        {
            var factory      = new ModuleLoaderFactory();
            var moduleLoader = factory.BuidlerModuleLoader(new ModuleLoaderOptions
            {
                NugetSources = new List <string>
                {
                    @"d:\Projects\SimpleIdentityServer\SimpleIdentityServer\src\feed\",
                    "https://api.nuget.org/v3/index.json",
                    "https://www.myget.org/F/advance-ict/api/v3/index.json"
                }
            });

            moduleLoader.Initialize();
            await moduleLoader.RestoreUnits();

            moduleLoader.LoadUnits();
        }
        public Startup(IHostingEnvironment env)
        {
            _env = env;
            var moduleLoaderFactory = new ModuleLoaderFactory();

            _moduleLoader = moduleLoaderFactory.BuidlerModuleLoader(new ModuleLoaderOptions
            {
                NugetSources = new List <string>
                {
                    @"d:\sidfeeds\core\",
                    @"d:\sidfeeds\tools\",
                    "https://api.nuget.org/v3/index.json",
                    "https://www.myget.org/F/advance-ict/api/v3/index.json"
                },
                ModuleFeedUri     = new Uri("http://localhost:60008/configuration"),
                ProjectName       = "OpenIdProvider",
                NugetNbRetry      = 5,
                NugetRetryAfterMs = 1000
            });
            _moduleLoader.ModuleInstalled += ModuleInstalled;
            _moduleLoader.UnitsRestored   += UnitsRestored;

            _moduleLoader.ModulesLoaded    += HandleModulesLoaded;
            _moduleLoader.ConnectorsLoaded += HandleConnectorsLoaded;
            _moduleLoader.TwoFactorsLoaded += HandleTwoFactorsLoaded;

            _moduleLoader.ModuleCannotBeInstalled += ModuleCannotBeInstalled;
            _moduleLoader.ConnectorsChanged       += HandleConnectorsChanged;

            _moduleLoader.Initialize();
            _moduleLoader.RestoreUnits().Wait();
            _moduleLoader.RestoreConnectors().Wait();
            _moduleLoader.RestoreTwoFactors().Wait();
            _moduleLoader.LoadUnits();
            _moduleLoader.LoadConnectors();
            _moduleLoader.LoadTwoFactors();
            _moduleLoader.WatchConfigurationFileChanges();
        }
Ejemplo n.º 7
0
 private RShipCore CreateCore(IScriptEngine engine)
 {
     var modulesPath = Path.Combine(PathHelpers.GetAssemblyDirectory(), "ship_modules");
     var pathResolver = new ModulePathResolver(modulesPath, new[] { ".ship", ".js", ".json", ".dll" }, "lib");
     var loaderFactory = new ModuleLoaderFactory();
     var core = new RShipCore(engine, pathResolver, loaderFactory);
     return core;
 }