当前位置: 首页>>代码示例>>C#>>正文


C# IPackageRepository类代码示例

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


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


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