コード例 #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
ファイル: DependencyContext.cs プロジェクト: henghu-bai/dnx
        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
ファイル: CompilationCache.cs プロジェクト: leloulight/dnx
 public CompilationCache()
 {
     CacheContextAccessor = new CacheContextAccessor();
     Cache = new Cache(CacheContextAccessor);
     NamedCacheDependencyProvider = new NamedCacheDependencyProvider();
 }