public PackageAssemblyLoader(NuGetFramework runtimeFramework, IAssemblyLoadContextAccessor loadContextAccessor, IEnumerable <Library> libraries, PackagePathResolver pathResolver) { Log = RuntimeLogging.Logger <PackageAssemblyLoader>(); _loadContextAccessor = loadContextAccessor; _assemblyLookupTable = InitializeAssemblyLookupTable(libraries, runtimeFramework, pathResolver); }
public static PlatformServices Create( PlatformServices basePlatformServices, IApplicationEnvironment application = null, IRuntimeEnvironment runtime = null, IAssemblyLoaderContainer container = null, IAssemblyLoadContextAccessor accessor = null, ILibraryManager libraryManager = null) { if (basePlatformServices == null) { return(new DefaultPlatformServices( application, runtime, container, accessor, libraryManager )); } return(new DefaultPlatformServices( application ?? basePlatformServices.Application, runtime ?? basePlatformServices.Runtime, container ?? basePlatformServices.AssemblyLoaderContainer, accessor ?? basePlatformServices.AssemblyLoadContextAccessor, libraryManager ?? basePlatformServices.LibraryManager )); }
public Startup(IHostingEnvironment hostingEnvironment, IApplicationEnvironment applicationEnvironment, IAssemblyLoaderContainer assemblyLoaderContainer, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, ILibraryManager libraryManager) { this.applicationBasePath = applicationEnvironment.ApplicationBasePath; this.assemblyLoaderContainer = assemblyLoaderContainer; this.assemblyLoadContextAccessor = assemblyLoadContextAccessor; this.libraryManager = libraryManager; }
public static void Register(CommandLineApplication cmdApp, IApplicationEnvironment appEnvironment, IAssemblyLoadContextAccessor loadContextAccessor, IRuntimeEnvironment runtimeEnvironment) { cmdApp.Command("graph", (Action<CommandLineApplication>)(c => { c.Description = "Perform parsing, static analysis, semantic analysis, and type inference"; c.HelpOption("-?|-h|--help"); c.OnExecute((Func<System.Threading.Tasks.Task<int>>)(async () => { var jsonIn = await Console.In.ReadToEndAsync(); var sourceUnit = JsonConvert.DeserializeObject<SourceUnit>(jsonIn); var root = Directory.GetCurrentDirectory(); var dir = Path.Combine(root, sourceUnit.Dir); var context = new GraphContext { RootPath = root, SourceUnit = sourceUnit, ProjectDirectory = dir, HostEnvironment = appEnvironment, LoadContextAccessor = loadContextAccessor, RuntimeEnvironment = runtimeEnvironment }; var result = await GraphRunner.Graph(context); Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented)); return 0; })); })); }
public Program(IAssemblyLoaderContainer container, IApplicationEnvironment environment, IAssemblyLoadContextAccessor loadContextAcessor, IServiceProvider serviceProvider) { _container = container; _environment = environment; _serviceProvider = serviceProvider; _loadContextAccessor = loadContextAcessor; }
public Task <int> ExecuteApplication( IAssemblyLoaderContainer loaderContainer, IAssemblyLoadContextAccessor loadContextAccessor, string applicationName, string[] programArgs) { Log.LogInformation($"Launching '{applicationName}' '{string.Join(" ", programArgs)}'"); var deps = DependencyManager.ResolveDependencies( DependencyProviders, Project.Name, Project.Version, TargetFramework); // Create loaders using (var loaderCleanup = CreateLoaders(loaderContainer, loadContextAccessor, deps)) { // Locate the entry point var entryPoint = LocateEntryPoint(applicationName); if (Log.IsEnabled(LogLevel.Information)) { Log.LogInformation($"Executing Entry Point: {entryPoint.GetName().FullName}"); } return(EntryPointExecutor.Execute(entryPoint, programArgs, Services)); } }
public Startup(IHostingEnvironment hostingEnvironment, IApplicationEnvironment applicationEnvironment, IAssemblyLoaderContainer assemblyLoaderContainer, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, ILibraryManager libraryManager) { this.applicationBasePath = applicationEnvironment.ApplicationBasePath; this.assemblyLoaderContainer = assemblyLoaderContainer; this.assemblyLoadContextAccessor = assemblyLoadContextAccessor; this.libraryManager = libraryManager; }
public Startup( IHostingEnvironment hostingEnvironment, IApplicationEnvironment applicationEnvironment, IAssemblyLoaderContainer assemblyLoaderContainer, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, ILibraryManager libraryManager ) { HostingEnvironment = hostingEnvironment; ApplicationBasePath = applicationEnvironment.ApplicationBasePath; AssemblyLoaderContainer = assemblyLoaderContainer; AssemblyLoadContextAccessor = assemblyLoadContextAccessor; LibraryManager = libraryManager; IConfigurationBuilder configurationBuilder = new ConfigurationBuilder() .AddJsonFile("appsettings.json") .AddJsonFile($"appsettings.{hostingEnvironment.EnvironmentName}.json", optional: true); if (hostingEnvironment.IsDevelopment()) { // For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709 // Good documentation here https://docs.asp.net/en/latest/security/app-secrets.html configurationBuilder.AddUserSecrets(); // This will push telemetry data through Application Insights pipeline faster, allowing you to view results immediately. configurationBuilder.AddApplicationInsightsSettings(developerMode: true); } configurationBuilder.AddEnvironmentVariables(); Configuration = configurationBuilder.Build(); }
public PackageAssemblyLoader(NuGetFramework runtimeFramework, IAssemblyLoadContextAccessor loadContextAccessor, IEnumerable<Library> libraries, PackagePathResolver pathResolver) { Log = RuntimeLogging.Logger<PackageAssemblyLoader>(); _loadContextAccessor = loadContextAccessor; _assemblyLookupTable = InitializeAssemblyLookupTable(libraries, runtimeFramework, pathResolver); }
public static PlatformServices Create( PlatformServices basePlatformServices, IApplicationEnvironment application = null, IRuntimeEnvironment runtime = null, IAssemblyLoaderContainer container = null, IAssemblyLoadContextAccessor accessor = null, ILibraryManager libraryManager = null) { if (basePlatformServices == null) { return new DefaultPlatformServices( application, runtime, container, accessor, libraryManager ); } return new DefaultPlatformServices( application ?? basePlatformServices.Application, runtime ?? basePlatformServices.Runtime, container ?? basePlatformServices.AssemblyLoaderContainer, accessor ?? basePlatformServices.AssemblyLoadContextAccessor, libraryManager ?? basePlatformServices.LibraryManager ); }
public Program(IAssemblyLoaderContainer container, IApplicationEnvironment environment, IAssemblyLoadContextAccessor loadContextAcessor, IServiceProvider serviceProvider) { _container = container; _environment = environment; _serviceProvider = serviceProvider; _loadContextAccessor = loadContextAcessor; }
public CustomCompilerCache(IAssemblyProvider assemblyProvider, IAssemblyLoadContextAccessor loadContextAccessor, IOptions <RazorViewEngineOptions> optionsAccessor, CompilerCacheInitialiedService cacheInitializedService) : base(assemblyProvider, loadContextAccessor, optionsAccessor) { cacheInitializedService.Initialized = true; }
public CustomCompilerCache(IEnumerable<RazorFileInfoCollection> fileInfoCollection, IAssemblyLoadContextAccessor loadContextAccessor, IOptions<RazorViewEngineOptions> optionsAccessor, CompilerCacheInitialiedService cacheInitializedService) : base(fileInfoCollection, loadContextAccessor, optionsAccessor) { cacheInitializedService.Initialized = true; }
public Program(IAssemblyLoaderContainer container, IAssemblyLoadContextAccessor accessor, IApplicationShutdown shutdown) { _loaderContainer = container; _loadContextAccessor = accessor; _shutdown = shutdown; }
public Startup(IHostingEnvironment env, IAssemblyLoaderContainer container, IAssemblyLoadContextAccessor accessor, ILibraryManager libraryManager) { _env = env; _loaderContainer = container; _loadContextAccessor = accessor; _libraryManager = libraryManager; }
public RoslynCompilationService(IApplicationEnvironment environment, IAssemblyLoadContextAccessor accessor, ILibraryExporter libraryExporter) { _environment = environment; _loader = accessor.GetLoadContext(typeof(RoslynCompilationService).GetTypeInfo().Assembly); _libraryExporter = libraryExporter; }
public IAssemblyLoader Create(NuGetFramework runtimeFramework, IAssemblyLoadContextAccessor loadContextAccessor, DependencyManager dependencies) { return(new PackageAssemblyLoader( runtimeFramework, loadContextAccessor, dependencies.GetLibraries(LibraryTypes.Package), _packagePathResolver)); }
/// <summary> /// Initializes a new instance of <see cref="CompilerCache"/> populated with precompiled views /// discovered using <paramref name="provider"/>. /// </summary> /// <param name="assemblyProvider">The <see cref="IAssemblyProvider"/> that provides assemblies /// for precompiled view discovery.</param> /// <param name="loaderContextAccessor">The <see cref="IAssemblyLoadContextAccessor"/>.</param> /// <param name="optionsAccessor">An accessor to the <see cref="RazorViewEngineOptions"/>.</param> public CompilerCache(IAssemblyProvider assemblyProvider, IAssemblyLoadContextAccessor loadContextAccessor, IOptions<RazorViewEngineOptions> optionsAccessor) : this(GetFileInfos(assemblyProvider.CandidateAssemblies), loadContextAccessor.GetLoadContext(RazorFileInfoCollectionType.Assembly), optionsAccessor.Options.FileProvider) { }
public Startup(IHostingEnvironment hostingEnvironment, IApplicationEnvironment applicationEnvironment, IAssemblyLoaderContainer assemblyLoaderContainer, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, ILibraryManager libraryManager) : base(hostingEnvironment, applicationEnvironment, assemblyLoaderContainer, assemblyLoadContextAccessor, libraryManager) { IConfigurationBuilder configurationBuilder = new ConfigurationBuilder() .AddJsonFile("config.json"); this.configurationRoot = configurationBuilder.Build(); }
/// <summary> /// Initializes a new instance of <see cref="CompilerCache"/> populated with precompiled views /// discovered using <paramref name="provider"/>. /// </summary> /// <param name="assemblyProvider">The <see cref="IAssemblyProvider"/> that provides assemblies /// for precompiled view discovery.</param> /// <param name="loaderContextAccessor">The <see cref="IAssemblyLoadContextAccessor"/>.</param> /// <param name="optionsAccessor">An accessor to the <see cref="RazorViewEngineOptions"/>.</param> public CompilerCache(IAssemblyProvider assemblyProvider, IAssemblyLoadContextAccessor loadContextAccessor, IOptions <RazorViewEngineOptions> optionsAccessor) : this(GetFileInfos(assemblyProvider.CandidateAssemblies), loadContextAccessor.GetLoadContext(RazorFileInfoCollectionType.Assembly), optionsAccessor.Options.FileProvider) { }
public ProjectAssemblyLoader(IAssemblyLoadContextAccessor loadContextAccessor, ICompilationEngine compilationEngine, IEnumerable<ProjectDescription> projects) { _loadContextAccessor = loadContextAccessor; _compilationEngine = compilationEngine; _projects = projects.ToDictionary(p => p.Identity.Name, p => new RuntimeProject(p.Project, p.Framework)); }
public ProjectAssemblyLoader(IProjectResolver projectResolver, IAssemblyLoadContextAccessor loadContextAccessor, ILibraryManager libraryManager) { _projectResolver = projectResolver; _loadContextAccessor = loadContextAccessor; _libraryManager = libraryManager; }
public CustomCompilerCache(IEnumerable <RazorFileInfoCollection> fileInfoCollection, IAssemblyLoadContextAccessor loadContextAccessor, IOptions <RazorViewEngineOptions> optionsAccessor, CompilerCacheInitialiedService cacheInitializedService) : base(fileInfoCollection, loadContextAccessor, optionsAccessor) { cacheInitializedService.Initialized = true; }
public CustomCompilerCache(IAssemblyProvider assemblyProvider, IAssemblyLoadContextAccessor loadContextAccessor, IOptions<RazorViewEngineOptions> optionsAccessor, CompilerCacheInitialiedService cacheInitializedService) : base(assemblyProvider, loadContextAccessor, optionsAccessor) { cacheInitializedService.Initialized = true; }
public ProjectAssemblyLoader(IAssemblyLoadContextAccessor loadContextAccessor, IProjectResolver projectResolver, ICompilationEngine compilationEngine) { _loadContextAccessor = loadContextAccessor; _compilationEngine = compilationEngine; _projectResolver = projectResolver; }
public ProjectAssemblyLoader(IAssemblyLoadContextAccessor loadContextAccessor, IProjectResolver projectResolver, ICompilationEngine compilationEngine) { _loadContextAccessor = loadContextAccessor; _compilationEngine = compilationEngine; _projectResolver = projectResolver; }
public ProjectAssemblyLoader(IProjectResolver projectResovler, IAssemblyLoadContextAccessor loadContextAccessor, ILibraryManager libraryManager) { _projectResolver = projectResovler; _loadContextAccessor = loadContextAccessor; _libraryManager = libraryManager; }
public ProjectAssemblyLoader(IAssemblyLoadContextAccessor loadContextAccessor, ICompilationEngine compilationEngine, LibraryManager libraryManager) { _loadContextAccessor = loadContextAccessor; _compilationEngine = compilationEngine; _libraryManager = libraryManager; }
public Startup(IHostingEnvironment env, IAssemblyLoaderContainer container, IAssemblyLoadContextAccessor accessor, ILibraryManager libraryManager) { _env = env; _loaderContainer = container; _loadContextAccessor = accessor; _libraryManager = libraryManager; }
public RoslynCompilationService(IApplicationEnvironment environment, IAssemblyLoadContextAccessor accessor, ILibraryExporter libraryExporter) { _environment = environment; _loader = accessor.GetLoadContext(typeof(RoslynCompilationService).GetTypeInfo().Assembly); _libraryExporter = libraryExporter; }
public ProjectAssemblyLoader(IAssemblyLoadContextAccessor loadContextAccessor, ICompilationEngine compilationEngine, IEnumerable <ProjectDescription> projects) { _loadContextAccessor = loadContextAccessor; _compilationEngine = compilationEngine; _projects = projects.ToDictionary(p => p.Identity.Name, p => new RuntimeProject(p.Project, p.Framework)); }
public ProjectAssemblyLoader(IAssemblyLoadContextAccessor loadContextAccessor, ICompilationEngine compilationEngine, LibraryManager libraryManager) { _loadContextAccessor = loadContextAccessor; _compilationEngine = compilationEngine; _libraryManager = libraryManager; }
public PluginAssemblyProvider(IFileProvider fileProvider, ILoggerFactory loggerFactory, IAssemblyLoadContextAccessor loadContextAccessor, IAssemblyLoaderContainer assemblyLoaderContainer) { _logger = loggerFactory.CreateLogger <PluginAssemblyProvider>(); _fileProvider = fileProvider; _loadContextAccessor = loadContextAccessor; _assemblyLoaderContainer = assemblyLoaderContainer; _candidates = new Lazy <IEnumerable <Assembly> >(FindPluginAssemblies); }
public DirectoryAssemblyProvider( IFileProvider fileProvider, IAssemblyLoadContextAccessor loadContextAccessor, IAssemblyLoaderContainer assemblyLoaderContainer) { _fileProvider = fileProvider; _loadContextAccessor = loadContextAccessor; _assemblyLoaderContainer = assemblyLoaderContainer; }
public PluginAssemblyProvider(IFileProvider fileProvider, ILoggerFactory loggerFactory, IAssemblyLoadContextAccessor loadContextAccessor, IAssemblyLoaderContainer assemblyLoaderContainer) { _logger = loggerFactory.CreateLogger<PluginAssemblyProvider>(); _fileProvider = fileProvider; _loadContextAccessor = loadContextAccessor; _assemblyLoaderContainer = assemblyLoaderContainer; _candidates = new Lazy<IEnumerable<Assembly>>(FindPluginAssemblies); }
public PluginDirectoryAssemblyProvider( IHostingEnvironment hostEnvironment, IAssemblyLoadContextAccessor loadContextAccessor, IAssemblyLoaderContainer assemblyLoaderContainer) { this.hostEnvironment = hostEnvironment; this.loadContextAccessor = loadContextAccessor; this.assemblyLoaderContainer = assemblyLoaderContainer; }
/// <summary> /// Initializes a new instance of <see cref="CompilerCache"/> populated with precompiled views /// discovered using <paramref name="provider"/>. /// </summary> /// <param name="razorFileInfoCollections">The sequence of <see cref="RazorFileInfoCollection"/> that provides /// information for precompiled view discovery.</param> /// <param name="loaderContextAccessor">The <see cref="IAssemblyLoadContextAccessor"/>.</param> /// <param name="optionsAccessor">An accessor to the <see cref="RazorViewEngineOptions"/>.</param> public CompilerCache( IEnumerable <RazorFileInfoCollection> razorFileInfoCollections, IAssemblyLoadContextAccessor loadContextAccessor, IOptions <RazorViewEngineOptions> optionsAccessor) : this(razorFileInfoCollections, loadContextAccessor.GetLoadContext(RazorHostAssembly), optionsAccessor.Options.FileProvider) { }
public ExtensionAssemblyLoader(string path, IServiceProvider serviceProvider) { _path = path; _serviceProvider = serviceProvider; _applicationEnvironment = serviceProvider.GetService<IApplicationEnvironment>(); _fileWatcher = serviceProvider.GetService<IFileWatcher>(); _orchardLibraryManager = serviceProvider.GetService<IOrchardLibraryManager>(); _assemblyLoadContextAccessor = serviceProvider.GetService<IAssemblyLoadContextAccessor>(); _virtualPathProvider = serviceProvider.GetService<IVirtualPathProvider>(); }
/// <summary> /// Initializes a new instance of <see cref="CompilerCache"/> populated with precompiled views /// discovered using <paramref name="provider"/>. /// </summary> /// <param name="razorFileInfoCollections">The sequence of <see cref="RazorFileInfoCollection"/> that provides /// information for precompiled view discovery.</param> /// <param name="loaderContextAccessor">The <see cref="IAssemblyLoadContextAccessor"/>.</param> /// <param name="optionsAccessor">An accessor to the <see cref="RazorViewEngineOptions"/>.</param> public CompilerCache( IEnumerable<RazorFileInfoCollection> razorFileInfoCollections, IAssemblyLoadContextAccessor loadContextAccessor, IOptions<RazorViewEngineOptions> optionsAccessor) : this(razorFileInfoCollections, loadContextAccessor.GetLoadContext(RazorHostAssembly), optionsAccessor.Options.FileProvider) { }
/// <summary> /// Initializes a new instance of <see cref="DefaultCompilerCacheProvider"/>. /// </summary> /// <param name="loadContextAccessor">The <see cref="IAssemblyLoadContextAccessor"/>.</param> /// <param name="fileProviderAccessor">The <see cref="IRazorViewEngineFileProviderAccessor"/>.</param> /// <param name="assemblies"><see cref="Assembly"/> instances to scan for precompiled views.</param> public PrecompiledViewsCompilerCacheProvider( IAssemblyLoadContextAccessor loadContextAccessor, IRazorViewEngineFileProviderAccessor fileProviderAccessor, IEnumerable <Assembly> assemblies) { _loadContextAccessor = loadContextAccessor; _fileProvider = fileProviderAccessor.FileProvider; _createCache = CreateCache; _assemblies = assemblies.ToArray(); }
public ExtensionAssemblyLoader(string path, IServiceProvider serviceProvider) { _path = path; _serviceProvider = serviceProvider; _applicationEnvironment = serviceProvider.GetService <IApplicationEnvironment>(); _fileWatcher = serviceProvider.GetService <IFileWatcher>(); _orchardLibraryManager = serviceProvider.GetService <IOrchardLibraryManager>(); _assemblyLoadContextAccessor = serviceProvider.GetService <IAssemblyLoadContextAccessor>(); _virtualPathProvider = serviceProvider.GetService <IVirtualPathProvider>(); }
public DefaultHost(DefaultHostOptions options, IAssemblyLoadContextAccessor loadContextAccessor) { _projectDirectory = Path.GetFullPath(options.ApplicationBaseDirectory); _targetFramework = options.TargetFramework; _loadContextAccessor = loadContextAccessor; _runtimeEnvironment = PlatformServices.Default.Runtime; _serviceProvider = new ServiceProvider(); Initialize(options, loadContextAccessor); }
/// <summary> /// Initializes a new instance of <see cref="DefaultCompilerCacheProvider"/>. /// </summary> /// <param name="loaderContextAccessor">The <see cref="IAssemblyLoadContextAccessor"/>.</param> /// <param name="optionsAccessor">An accessor to the <see cref="RazorViewEngineOptions"/>.</param> /// <param name="assemblies"><see cref="Assembly"/> instances to scan for precompiled views.</param> public PrecompiledViewsCompilerCacheProvider( IAssemblyLoadContextAccessor loadContextAccessor, IOptions <RazorViewEngineOptions> mvcViewOptions, IEnumerable <Assembly> assemblies) { _loadContextAccessor = loadContextAccessor; _fileProvider = mvcViewOptions.Value.FileProvider; _createCache = CreateCache; _assemblies = assemblies.ToArray(); }
/// <summary> /// Initializes a new instance of <see cref="DefaultCompilerCacheProvider"/>. /// </summary> /// <param name="loadContextAccessor">The <see cref="IAssemblyLoadContextAccessor"/>.</param> /// <param name="fileProviderAccessor">The <see cref="IRazorViewEngineFileProviderAccessor"/>.</param> /// <param name="assemblies"><see cref="Assembly"/> instances to scan for precompiled views.</param> public PrecompiledViewsCompilerCacheProvider( IAssemblyLoadContextAccessor loadContextAccessor, IRazorViewEngineFileProviderAccessor fileProviderAccessor, IEnumerable<Assembly> assemblies) { _loadContextAccessor = loadContextAccessor; _fileProvider = fileProviderAccessor.FileProvider; _createCache = CreateCache; _assemblies = assemblies.ToArray(); }
/// <summary> /// Initializes a new instance of <see cref="DefaultCompilerCacheProvider"/>. /// </summary> /// <param name="loaderContextAccessor">The <see cref="IAssemblyLoadContextAccessor"/>.</param> /// <param name="optionsAccessor">An accessor to the <see cref="RazorViewEngineOptions"/>.</param> /// <param name="assemblies"><see cref="Assembly"/> instances to scan for precompiled views.</param> public PrecompiledViewsCompilerCacheProvider( IAssemblyLoadContextAccessor loadContextAccessor, IOptions<RazorViewEngineOptions> mvcViewOptions, IEnumerable<Assembly> assemblies) { _loadContextAccessor = loadContextAccessor; _fileProvider = mvcViewOptions.Value.FileProvider; _createCache = CreateCache; _assemblies = assemblies.ToArray(); }
public DefaultHost(DefaultHostOptions options, IAssemblyLoadContextAccessor loadContextAccessor) { _projectDirectory = Path.GetFullPath(options.ApplicationBaseDirectory); _targetFramework = options.TargetFramework; _loadContextAccessor = loadContextAccessor; _runtimeEnvironment = PlatformServices.Default.Runtime; _serviceProvider = new ServiceProvider(); Initialize(options, loadContextAccessor); }
public GoofyComponentsAssembliesProvider(IComponentsDirectoryPathProvider componentsPathProvider, IAssemblyLoaderContainer assemblyLoaderContainer, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, ILogger <GoofyComponentsAssembliesProvider> logger ) { _componentsPathProvider = componentsPathProvider; _assemblyLoaderContainer = assemblyLoaderContainer; _assemblyLoadContextAccessor = assemblyLoadContextAccessor; _logger = logger; }
public ExtensionAssemblyLoader( IApplicationEnvironment applicationEnvironment, ICache cache, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, IOrchardLibraryManager libraryManager) { _applicationEnvironment = applicationEnvironment; _cache = cache; _assemblyLoadContextAccessor = assemblyLoadContextAccessor; _libraryManager = libraryManager; }
public AssemblyCache(ILibraryManager manager, IAssemblyLoadContextAccessor accessor, IAssemblyLoaderContainer container, IApplicationEnvironment environment) { _libraryManager = manager; _environment = environment; _loadContext = accessor.GetLoadContext(typeof (Program).GetTypeInfo().Assembly); Loader = new DirectoryLookupAssemblyLoader(_loadContext); _loaderRegistration = container.AddLoader(Loader); }
/// <summary> /// Initalizes a new instance of the <see cref="RoslynCompilationService"/> class. /// </summary> /// <param name="environment">The environment for the executing application.</param> /// <param name="loaderEngine">The loader used to load compiled assemblies.</param> /// <param name="libraryManager">The library manager that provides export and reference information.</param> /// <param name="host">The <see cref="IMvcRazorHost"/> that was used to generate the code.</param> public RoslynCompilationService(IApplicationEnvironment environment, IAssemblyLoadContextAccessor loaderAccessor, ILibraryManager libraryManager, IMvcRazorHost host) { _environment = environment; _loader = loaderAccessor.GetLoadContext(typeof(RoslynCompilationService).GetTypeInfo().Assembly); _libraryManager = libraryManager; _applicationReferences = new Lazy <List <MetadataReference> >(GetApplicationReferences); _classPrefix = host.MainClassNamePrefix; }
public Program( IApplicationEnvironment applicationEnvironment, IAssemblyLoaderContainer assemblyLoaderContainer, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, ILibraryManager libraryManager) { Services.ApplicationEnvironment = applicationEnvironment; Services.AssemblyLoaderContainer = assemblyLoaderContainer; Services.AssemblyLoadContextAccessor = assemblyLoadContextAccessor; Services.LibraryManager = libraryManager; }
public ComponentManager(ILibraryManager libManager, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, IOptions <ComponentManagerConfig> config, IHostingEnvironment env, ILogger <ComponentManager> logger) { // _defaultAssemblyProvider = defaultAssemblyProvider; _libraryManager = libManager; _assemblyLoadContextAccessor = assemblyLoadContextAccessor; _config = config; _env = env; _shadowedPluginsDirectory = Path.Combine(GetRootedPath(_config.Value.ModulesFolder), ShadowedDirPath); _logger = logger; }
public Program( IApplicationEnvironment applicationEnvironment, IAssemblyLoaderContainer assemblyLoaderContainer, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, ILibraryManager libraryManager) { Services.ApplicationEnvironment = applicationEnvironment; Services.AssemblyLoaderContainer = assemblyLoaderContainer; Services.AssemblyLoadContextAccessor = assemblyLoadContextAccessor; Services.LibraryManager = libraryManager; }
public ExtensionAssemblyLoader( IApplicationEnvironment applicationEnvironment, ICache cache, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, IOrchardLibraryManager libraryManager) { _applicationEnvironment = applicationEnvironment; _cache = cache; _assemblyLoadContextAccessor = assemblyLoadContextAccessor; _libraryManager = libraryManager; }
public ProjectAssemblyLoader(IAssemblyLoadContextAccessor loadContextAccessor, ICompilationEngine compilationEngine, IEnumerable<ProjectDescription> projects, string configuration) { _loadContextAccessor = loadContextAccessor; _compilationEngine = compilationEngine; _projects = projects.ToDictionary(p => p.Identity.Name, p => new RuntimeProject(p.Project, p.Framework)); _configuration = configuration; var environment = RuntimeEnvironmentHelper.RuntimeEnvironment; }
public DefaultHost(RuntimeOptions options, IServiceProvider hostServices, IAssemblyLoadContextAccessor loadContextAccessor, IFileWatcher fileWatcher, ICompilationEngineFactory compilationEngineFactory) { _projectDirectory = Path.GetFullPath(options.ApplicationBaseDirectory); _targetFramework = options.TargetFramework; _compilationEngineFactory = compilationEngineFactory; Initialize(options, hostServices, loadContextAccessor, fileWatcher); }
public DefaultHost(RuntimeOptions options, IServiceProvider hostServices, IAssemblyLoadContextAccessor loadContextAccessor, IFileWatcher fileWatcher, ICompilationEngineFactory compilationEngineFactory) { _projectDirectory = Path.GetFullPath(options.ApplicationBaseDirectory); _targetFramework = options.TargetFramework; _compilationEngineFactory = compilationEngineFactory; Initialize(options, hostServices, loadContextAccessor, fileWatcher); }
internal DefaultPlatformServices( IApplicationEnvironment application, IRuntimeEnvironment runtime, IAssemblyLoaderContainer container, IAssemblyLoadContextAccessor accessor, ILibraryManager libraryManager) { Application = application; Runtime = runtime; AssemblyLoaderContainer = container; AssemblyLoadContextAccessor = accessor; LibraryManager = libraryManager; }
/// <summary> /// Initalizes a new instance of the <see cref="RoslynCompilationService"/> class. /// </summary> /// <param name="environment">The environment for the executing application.</param> /// <param name="loaderEngine">The loader used to load compiled assemblies.</param> /// <param name="libraryManager">The library manager that provides export and reference information.</param> /// <param name="host">The <see cref="IMvcRazorHost"/> that was used to generate the code.</param> public RoslynCompilationService(IApplicationEnvironment environment, IAssemblyLoadContextAccessor loaderAccessor, ILibraryManager libraryManager, ICompilerOptionsProvider compilerOptionsProvider, IMvcRazorHost host) { _environment = environment; _loader = loaderAccessor.GetLoadContext(typeof(RoslynCompilationService).GetTypeInfo().Assembly); _libraryManager = libraryManager; _applicationReferences = new Lazy<List<MetadataReference>>(GetApplicationReferences); _compilerOptionsProvider = compilerOptionsProvider; _classPrefix = host.MainClassNamePrefix; }
public ExtensionAssemblyLoader(IServiceProvider serviceProvider, IApplicationEnvironment applicationEnvironment, IFileWatcher fileWatcher, IOrchardLibraryManager orchardLibraryManager, IAssemblyLoadContextAccessor assemblyLoadContextAccessor, IVirtualPathProvider virtualPathProvider) { _serviceProvider = serviceProvider; _applicationEnvironment = applicationEnvironment; _fileWatcher = fileWatcher; _orchardLibraryManager = orchardLibraryManager; _assemblyLoadContextAccessor = assemblyLoadContextAccessor; _virtualPathProvider = virtualPathProvider; }