示例#1
0
        private ApplicationHostContext CreateApplicationHostContext()
        {
            var accessor = new CacheContextAccessor();
            var cache = new Cache(accessor);

            var hostContext = new ApplicationHostContext(
                hostServices: null,
                projectDirectory: _options.Project.ProjectDirectory,
                packagesDirectory: null,
                configuration: Configuration,
                targetFramework: _framework);

            hostContext.DependencyWalker.Walk(hostContext.Project.Name, hostContext.Project.Version, _framework);

            return hostContext;
        }
示例#2
0
        public DependencyContext(string projectDirectory, string configuration, FrameworkName targetFramework)
        {
            var cacheContextAccessor = new CacheContextAccessor();
            var cache = new Cache(cacheContextAccessor);

            var applicationHostContext = new ApplicationHostContext(
                hostServices: null,
                projectDirectory: projectDirectory,
                packagesDirectory: null,
                configuration: configuration,
                targetFramework: targetFramework);

            ProjectResolver = applicationHostContext.ProjectResolver;
            NuGetDependencyResolver = applicationHostContext.NuGetDependencyProvider;
            ProjectReferenceDependencyProvider = applicationHostContext.ProjectDependencyProvider;
            DependencyWalker = applicationHostContext.DependencyWalker;
            FrameworkName = targetFramework;
            PackagesDirectory = applicationHostContext.PackagesDirectory;
        }
示例#3
0
 public CompilationCache()
 {
     CacheContextAccessor = new CacheContextAccessor();
     Cache = new Cache(CacheContextAccessor);
     NamedCacheDependencyProvider = new NamedCacheDependencyProvider();
 }
示例#4
0
 public CompilationCache()
 {
     CacheContextAccessor = new CacheContextAccessor();
     Cache = new Cache(CacheContextAccessor);
     NamedCacheDependencyProvider = new NamedCacheDependencyProvider();
 }