Example #1
0
        public MazeProject(IModuleProjectConfig config, IModulesConfig modulesConfig, IModulesLock modulesLock)
        {
            var providers = Repository.Provider.GetCoreV3();

            PrimarySources = config.PrimarySources
                             .Select(x => new SourceRepository(new PackageSource(x.AbsoluteUri), providers)).ToImmutableList();
            DependencySources = config.DependencySources
                                .Select(x => new SourceRepository(new PackageSource(x.AbsoluteUri), providers)).ToImmutableList();

            ModulesDirectory      = new ModulesDirectory(new VersionFolderPathResolver(config.Directory));
            LocalSourceRepository = new SourceRepository(ModulesDirectory.PackageSource, providers);

            _modulesConfig     = modulesConfig;
            ModulesLock        = modulesLock;
            FrameworkLibraries = config.Frameworks.ToDictionary(x => NuGetFramework.Parse(x.Key),
                                                                x => PackageIdentityConvert.ToPackageIdentity(x.Value));

            Architecture    = Environment.Is64BitProcess ? Architecture.x64 : Architecture.x86;
            Runtime         = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? Runtime.Windows : Runtime.Linux;
            PrimaryPackages = modulesConfig.Modules; //very important because the file may change while the packages must consist
        }
Example #2
0
 public VirtualModuleManager(IModulesConfig modulesConfig, IModuleProject moduleProject)
 {
     _modulesConfig = modulesConfig;
     _moduleProject = moduleProject;
 }