• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IPackageRepository类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IPackageRepository的典型用法代码示例。如果您正苦于以下问题:C# IPackageRepository类的具体用法?C# IPackageRepository怎么用?C# IPackageRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IPackageRepository类属于命名空间,在下文中一共展示了IPackageRepository类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Validate

        public IEnumerable<PackageVerifierIssue> Validate(IPackageRepository packageRepo, IPackage package, IPackageVerifierLogger logger)
        {
            if (!package.IsSatellitePackage())
            {
                IEnumerable<string> allXmlFiles =
                    from file in package.GetLibFiles()
                    select file.Path into path
                    where path.EndsWith(".xml", StringComparison.OrdinalIgnoreCase)
                    select path;

                foreach (IPackageFile current in package.GetLibFiles())
                {
                    string assemblyPath = current.Path;
                    // TODO: Does this need to check for just managed code?
                    if (assemblyPath.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
                    {
                        string docFilePath = Path.ChangeExtension(assemblyPath, ".xml");
                        if (!allXmlFiles.Contains(docFilePath, StringComparer.OrdinalIgnoreCase))
                        {
                            yield return PackageIssueFactory.AssemblyHasNoDocFile(assemblyPath);
                        }
                    }
                }
            }
            yield break;
        }
开发者ID:modulexcite,项目名称:DnxTools,代码行数:26,代码来源:AssemblyHasDocumentFileRule.cs


示例2: UpdatedPackages

		public UpdatedPackages(
			IQueryable<IPackage> installedPackages,
			IPackageRepository aggregrateRepository)
		{
			this.installedPackages = installedPackages;
			this.sourceRepository = aggregrateRepository;
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:7,代码来源:UpdatedPackages.cs


示例3: InstallCommand

 protected internal InstallCommand(IPackageRepository cacheRepository) :
     base(cacheRepository)
 {
     // On mono, parallel builds are broken for some reason. See https://gist.github.com/4201936 for the errors
     // That are thrown.
     DisableParallelProcessing = EnvironmentUtility.IsMonoRuntime;
 }
开发者ID:riteshparekh,项目名称:NuGet,代码行数:7,代码来源:InstallCommand.cs


示例4: UninstallWalker

        public UninstallWalker(IPackageRepository repository,
                               IDependentsResolver dependentsResolver,
                               FrameworkName targetFramework,
                               ILogger logger,
                               bool removeDependencies,
                               bool forceRemove) 
            : base(targetFramework)
        {
            if (dependentsResolver == null)
            {
                throw new ArgumentNullException("dependentsResolver");
            }
            if (repository == null)
            {
                throw new ArgumentNullException("repository");
            }
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }

            Logger = logger;
            Repository = repository;
            DependentsResolver = dependentsResolver;
            Force = forceRemove;
            ThrowOnConflicts = true;
            Operations = new Stack<PackageOperation>();
            _removeDependencies = removeDependencies;
        }
开发者ID:njannink,项目名称:sonarlint-vs,代码行数:29,代码来源:UninstallWalker.cs


示例5: DependentsWalker

 public DependentsWalker(IPackageRepository repository)
 {
     if (repository == null) {
         throw new ArgumentNullException("repository");
     }
     Repository = repository;
 }
开发者ID:grendello,项目名称:nuget,代码行数:7,代码来源:DependentsWalker.cs


示例6: GetActiveProject

		public override IPackageManagementProject GetActiveProject(IPackageRepository sourceRepository)
		{
			if (ExceptionToThrowWhenGetActiveProjectCalled != null) {
				throw ExceptionToThrowWhenGetActiveProjectCalled;
			}
			return base.GetActiveProject(sourceRepository);
		}
开发者ID:yuriykipnis,项目名称:SharpDevelop,代码行数:7,代码来源:ExceptionThrowingPackageManagementService.cs


示例7: UpdateAllPackagesInSolution

		public UpdateAllPackagesInSolution(
			IPackageManagementSolution solution,
			IPackageRepository sourceRepository)
		{
			this.solution = solution;
			this.sourceRepository = sourceRepository;
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:7,代码来源:UpdateAllPackagesInSolution.cs


示例8: UpdatedPackages

        public UpdatedPackages(
            IPackageManagementProject project,
            IPackageRepository aggregateRepository)
            : this(project.GetPackages(),
				aggregateRepository)
        {
        }
开发者ID:nicolaiarocci,项目名称:monodevelop-nuget-addin,代码行数:7,代码来源:UpdatedPackages.cs


示例9: IsSatellitePackage

        public static bool IsSatellitePackage(
            IPackage package, 
            IPackageRepository repository,
            FrameworkName targetFramework,
            out IPackage runtimePackage)
        {
            // A satellite package has the following properties:
            //     1) A package suffix that matches the package's language, with a dot preceding it
            //     2) A dependency on the package with the same Id minus the language suffix
            //     3) The dependency can be found by Id in the repository (as its path is needed for installation)
            // Example: foo.ja-jp, with a dependency on foo

            runtimePackage = null;

            if (package.IsSatellitePackage())
            {
                string runtimePackageId = package.Id.Substring(0, package.Id.Length - (package.Language.Length + 1));
                PackageDependency dependency = package.FindDependency(runtimePackageId, targetFramework);

                if (dependency != null)
                {
                    runtimePackage = repository.FindPackage(runtimePackageId, versionSpec: dependency.VersionSpec, allowPrereleaseVersions: true, allowUnlisted: true);
                }
            }

            return runtimePackage != null;
        }
开发者ID:themotleyfool,项目名称:NuGet,代码行数:27,代码来源:PackageUtility.cs


示例10: MirrorCommand

 public MirrorCommand(IPackageSourceProvider packageSourceProvider, ISettings settings, IPackageRepositoryFactory packageRepositoryFactory)
 {
     SourceProvider = packageSourceProvider;
     Settings = settings;
     RepositoryFactory = packageRepositoryFactory;
     _cacheRepository = MachineCache.Default;
 }
开发者ID:nickfloyd,项目名称:NuGet,代码行数:7,代码来源:MirrorCommand.cs


示例11: NuGetBrowser

        public NuGetBrowser(IEnumerable<string> repositories)
        {
            var reposToUse = new List<IPackageRepository>();

            reposToUse.AddRange(repositories.ToList().Select(r => PackageRepositoryFactory.Default.CreateRepository(r)));
            repository = new AggregateRepository(reposToUse);
        }
开发者ID:AntoineGa,项目名称:APIComparer,代码行数:7,代码来源:NuGetBrowser.cs


示例12: GetUpdatedPackages

		IEnumerable<IPackage> GetUpdatedPackages(
			IPackageRepository sourceRepository,
			IEnumerable<IPackage> localPackages,
			bool includePrelease)
		{
			return sourceRepository.GetUpdates(localPackages, includePrelease, false);
		}
开发者ID:kristjan84,项目名称:SharpDevelop,代码行数:7,代码来源:UpdatedPackages.cs


示例13: InstallWalker

        public InstallWalker(IPackageRepository localRepository,
                             IDependencyResolver2 dependencyResolver,
                             IPackageConstraintProvider constraintProvider,
                             FrameworkName targetFramework,
                             ILogger logger,
                             bool ignoreDependencies,
                             bool allowPrereleaseVersions,
                             DependencyVersion dependencyVersion)
            : base(targetFramework)
        {

            if (dependencyResolver == null)
            {
                throw new ArgumentNullException("dependencyResolver");
            }
            if (localRepository == null)
            {
                throw new ArgumentNullException("localRepository");
            }
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }

            Repository = localRepository;
            Logger = logger;
            DependencyResolver = dependencyResolver;
            _ignoreDependencies = ignoreDependencies;
            ConstraintProvider = constraintProvider;
            _operations = new OperationLookup();
            _allowPrereleaseVersions = allowPrereleaseVersions;
            DependencyVersion = dependencyVersion;
            CheckDowngrade = true;
        }
开发者ID:sistoimenov,项目名称:NuGet2,代码行数:34,代码来源:InstallWalker.cs


示例14: PackagesProviderBase

        protected PackagesProviderBase(
            IPackageRepository localRepository, 
            ResourceDictionary resources, 
            ProviderServices providerServices, 
            IProgressProvider progressProvider, 
            ISolutionManager solutionManager)
        {
            if (resources == null)
            {
                throw new ArgumentNullException("resources");
            }

            if (providerServices == null)
            {
                throw new ArgumentNullException("providerServices");
            }

            if (solutionManager == null)
            {
                throw new ArgumentNullException("solutionManager");
            }

            _localRepository = localRepository;
            _providerServices = providerServices;
            _progressProvider = progressProvider;
            _solutionManager = solutionManager;
            _resources = resources;
            _outputConsole = new Lazy<IConsole>(() => providerServices.OutputConsoleProvider.CreateOutputConsole(requirePowerShellHost: false));
        }
开发者ID:themotleyfool,项目名称:NuGet,代码行数:29,代码来源:PackagesProviderBase.cs


示例15: GetConstraintProvider

 public IPackageConstraintProvider GetConstraintProvider(IPackageRepository repository)
 {
     if (HasSingleProjectSelected()) {
         return GetSingleProjectSelected(repository).ConstraintProvider;
     }
     return NullConstraintProvider.Instance;
 }
开发者ID:ichengzi,项目名称:SharpDevelop,代码行数:7,代码来源:PackageManagementSelectedProjects.cs


示例16: TestGetCommand

 public TestGetCommand(IPackageRepositoryFactory packageRepositoryFactory, IPackageSourceProvider sourceProvider, IPackageRepository cacheRepository, Mock<MockFileSystem> fileSystem)
     : base(cacheRepository, fileSystem.Object, new MemoryBasedPackageCache(new Mock<IConsole>().Object))
 {
     RepositoryFactory = packageRepositoryFactory;
     SourceProvider = sourceProvider;
     mockFileSystem = fileSystem;
 }
开发者ID:modulexcite,项目名称:NuGet.Extensions,代码行数:7,代码来源:TestGetCommand.cs


示例17: AddSystemPackage

 public IEnumerable<PackageOperationResult> AddSystemPackage(PackageRequest packageToAdd,
     IEnumerable<IPackageRepository> sourceRepositories,
     IPackageRepository systemRepository,
     PackageAddOptions options = PackageAddOptions.Default)
 {
     return CopyPackageCore(sourceRepositories, new[] { systemRepository }, ToDescriptor(packageToAdd, options), x => true);
 }
开发者ID:seantfox,项目名称:openwrap,代码行数:7,代码来源:DefaultPackageManager.cs


示例18: InstallCommand

        protected internal InstallCommand(
            IPackageRepositoryFactory packageRepositoryFactory,
            IPackageSourceProvider sourceProvider,
            ISettings configSettings,
            IPackageRepository cacheRepository)
        {
            if (packageRepositoryFactory == null)
            {
                throw new ArgumentNullException("packageRepositoryFactory");
            }

            if (sourceProvider == null)
            {
                throw new ArgumentNullException("sourceProvider");
            }

            if (configSettings == null)
            {
                throw new ArgumentNullException("configSettings");
            }

            RepositoryFactory = packageRepositoryFactory;
            SourceProvider = sourceProvider;
            _cacheRepository = cacheRepository;
            _configSettings = configSettings;
        }
开发者ID:themotleyfool,项目名称:NuGet,代码行数:26,代码来源:InstallCommand.cs


示例19: UncompressedPackage

        public UncompressedPackage(IPackageRepository source,
                                   IFile originalPackageFile,
                                   IDirectory wrapCacheDirectory)
        {
            Check.NotNull(source, "source");
            if (originalPackageFile == null || originalPackageFile.Exists == false)
            {
                IsValid = false;
                return;
            }
            _originalPackageFile = originalPackageFile;
            BaseDirectory = wrapCacheDirectory;
            // get the descriptor file inside the package

            Source = source;
            var wrapDescriptor = wrapCacheDirectory.Files("*.wrapdesc").SingleOrDefault();

            if (wrapDescriptor == null)
            {
                IsValid = false;
                return;
            }

            var versionFile = wrapCacheDirectory.GetFile("version");
            _descriptor = new PackageDescriptorReader().Read(wrapDescriptor);
            _semver = _descriptor.SemanticVersion ?? _descriptor.Version.ToSemVer();
            if (_semver == null)
                _semver = versionFile.Exists ? versionFile.ReadString().ToSemVer() : null;

            IsValid = string.IsNullOrEmpty(Name) == false && _semver != null;
            if (IsValid)
                Identifier = new PackageIdentifier(Name, _semver);
        }
开发者ID:simonlaroche,项目名称:openwrap,代码行数:33,代码来源:UncompressedPackage.cs


示例20: PackageManager

        public PackageManager(
            IPackageRepository sourceRepository, 
            IPackagePathResolver pathResolver, 
            IFileSystem fileSystem, 
            ISharedPackageRepository localRepository)
        {
            if (sourceRepository == null)
            {
                throw new ArgumentNullException("sourceRepository");
            }
            if (pathResolver == null)
            {
                throw new ArgumentNullException("pathResolver");
            }
            if (fileSystem == null)
            {
                throw new ArgumentNullException("fileSystem");
            }
            if (localRepository == null)
            {
                throw new ArgumentNullException("localRepository");
            }

            SourceRepository = sourceRepository;
            DependencyResolver = new DependencyResolverFromRepo(sourceRepository);
            PathResolver = pathResolver;
            FileSystem = fileSystem;
            LocalRepository = localRepository;
            DependencyVersion = DependencyVersion.Lowest;
            CheckDowngrade = true;
        }
开发者ID:sistoimenov,项目名称:NuGet2,代码行数:31,代码来源:PackageManager.cs



注:本文中的IPackageRepository类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IPackageRepositoryFactory类代码示例发布时间:2022-05-24
下一篇:
C# IPackagePathResolver类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap