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

C# IPackageFileService类代码示例

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

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



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

示例1: PackagesController

 public PackagesController(
     IPackageService packageService,
     IUploadFileService uploadFileService,
     IMessageService messageService,
     ISearchService searchService,
     IAutomaticallyCuratePackageCommand autoCuratedPackageCmd,
     IPackageFileService packageFileService,
     IEntitiesContext entitiesContext,
     IAppConfiguration config,
     IIndexingService indexingService,
     ICacheService cacheService,
     EditPackageService editPackageService,
     IPackageDeleteService packageDeleteService,
     ISupportRequestService supportRequestService,
     AuditingService auditingService)
 {
     _packageService = packageService;
     _uploadFileService = uploadFileService;
     _messageService = messageService;
     _searchService = searchService;
     _autoCuratedPackageCmd = autoCuratedPackageCmd;
     _packageFileService = packageFileService;
     _entitiesContext = entitiesContext;
     _config = config;
     _indexingService = indexingService;
     _cacheService = cacheService;
     _editPackageService = editPackageService;
     _packageDeleteService = packageDeleteService;
     _supportRequestService = supportRequestService;
     _auditingService = auditingService;
 }
开发者ID:rhysawilliams2010,项目名称:NuGetGallery,代码行数:31,代码来源:PackagesController.cs


示例2: PackageService

 public PackageService(
     ICryptographyService cryptoSvc,
     IEntityRepository<PackageRegistration> packageRegistrationRepo,
     IEntityRepository<Package> packageRepo,
     IEntityRepository<PackageStatistics> packageStatsRepo,
     IPackageFileService packageFileSvc,
     IEntityRepository<PackageOwnerRequest> packageOwnerRequestRepository,
     IIndexingService indexingSvc,
     IEntityRepository<PackageAuthor> packageAuthorRepo,
     IEntityRepository<PackageFramework> packageFrameworksRepo,
     IEntityRepository<PackageDependency> packageDependenciesRepo,
     IEntityRepository<PackageFile> packageFilesRepo,
     IMessageService messageSvc)
 {
     this.cryptoSvc = cryptoSvc;
     this.packageRegistrationRepo = packageRegistrationRepo;
     this.packageRepo = packageRepo;
     this.packageStatsRepo = packageStatsRepo;
     this.packageFileSvc = packageFileSvc;
     this.packageOwnerRequestRepository = packageOwnerRequestRepository;
     this.indexingSvc = indexingSvc;
     this.packageAuthorRepo = packageAuthorRepo;
     this.packageFrameworksRepo = packageFrameworksRepo;
     this.packageDependenciesRepo = packageDependenciesRepo;
     this.packageFilesRepo = packageFilesRepo;
     this.messageSvc = messageSvc;
 }
开发者ID:PatOShea,项目名称:chocolatey.org,代码行数:27,代码来源:PackageService.cs


示例3: ApiController

 public ApiController(
     IEntitiesContext entitiesContext,
     IPackageService packageService,
     IPackageFileService packageFileService,
     IUserService userService,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IContentService contentService,
     IIndexingService indexingService,
     ISearchService searchService,
     IAutomaticallyCuratePackageCommand autoCuratePackage,
     IStatusService statusService,
     IAppConfiguration config)
 {
     EntitiesContext = entitiesContext;
     PackageService = packageService;
     PackageFileService = packageFileService;
     UserService = userService;
     NugetExeDownloaderService = nugetExeDownloaderService;
     ContentService = contentService;
     StatisticsService = null;
     IndexingService = indexingService;
     SearchService = searchService;
     AutoCuratePackage = autoCuratePackage;
     StatusService = statusService;
     _config = config;
 }
开发者ID:whyleee,项目名称:RemoteFeedNuGetGallery,代码行数:26,代码来源:ApiController.cs


示例4: ApiController

 public ApiController(IPackageService packageSvc, IPackageFileService packageFileSvc, IUserService userSvc, INuGetExeDownloaderService nugetExeDownloaderSvc)
 {
     this.packageSvc = packageSvc;
     this.packageFileSvc = packageFileSvc;
     this.userSvc = userSvc;
     this.nugetExeDownloaderSvc = nugetExeDownloaderSvc;
 }
开发者ID:rhillaardvark,项目名称:chocolatey.org,代码行数:7,代码来源:ApiController.cs


示例5: PackagesController

 public PackagesController(
     IPackageService packageService,
     IUploadFileService uploadFileService,
     IUserService userService,
     IMessageService messageService,
     ISearchService searchService,
     IAutomaticallyCuratePackageCommand autoCuratedPackageCmd,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IPackageFileService packageFileService,
     IEntitiesContext entitiesContext,
     IAppConfiguration config,
     IIndexingService indexingService,
     ICacheService cacheService)
 {
     _packageService = packageService;
     _uploadFileService = uploadFileService;
     _userService = userService;
     _messageService = messageService;
     _searchService = searchService;
     _autoCuratedPackageCmd = autoCuratedPackageCmd;
     _nugetExeDownloaderService = nugetExeDownloaderService;
     _packageFileService = packageFileService;
     _entitiesContext = entitiesContext;
     _config = config;
     _indexingService = indexingService;
     _cacheService = cacheService;
 }
开发者ID:ryanhartley84332,项目名称:NuGetGallery,代码行数:27,代码来源:PackagesController.cs


示例6: ApiController

 public ApiController(IPackageService packageSvc, IPackageFileService packageFileSvc, IUserService userSvc, INuGetExeDownloaderService nugetExeDownloaderSvc, GallerySetting settings)
 {
     this.packageSvc = packageSvc;
     this.packageFileSvc = packageFileSvc;
     this.userSvc = userSvc;
     this.nugetExeDownloaderSvc = nugetExeDownloaderSvc;
     this.settings = settings;
 }
开发者ID:shrenujgandhi,项目名称:chocolatey.org,代码行数:8,代码来源:ApiController.cs


示例7: ReflowPackageService

 public ReflowPackageService(
     IEntitiesContext entitiesContext,
     IPackageService packageService,
     IPackageFileService packageFileService)
 {
     _entitiesContext = entitiesContext;
     _packageService = packageService;
     _packageFileService = packageFileService;
 }
开发者ID:ZhiYuanHuang,项目名称:NuGetGallery,代码行数:9,代码来源:ReflowPackageService.cs


示例8: NuGetExeDownloaderService

 public NuGetExeDownloaderService(
     IPackageService packageService,
     IPackageFileService packageFileService,
     IFileStorageService fileStorageService)
 {
     _packageService = packageService;
     _packageFileService = packageFileService;
     _fileStorageService = fileStorageService;
 }
开发者ID:ChrisMissal,项目名称:NuGetGallery,代码行数:9,代码来源:NuGetExeDownloaderService.cs


示例9: NuGetExeDownloaderService

 public NuGetExeDownloaderService(
     IPackageService packageSvc,
     IPackageFileService packageFileSvc,
     IFileStorageService fileStorageSvc)
 {
     this.packageSvc = packageSvc;
     this.packageFileSvc = packageFileSvc;
     this.fileStorageSvc = fileStorageSvc;
 }
开发者ID:shrenujgandhi,项目名称:chocolatey.org,代码行数:9,代码来源:NuGetExeDownloaderService.cs


示例10: ApiController

 public ApiController(IPackageService packageSvc, IScanService scanSvc, IPackageFileService packageFileSvc, IUserService userSvc, INuGetExeDownloaderService nugetExeDownloaderSvc, IConfiguration settings)
 {
     this.packageSvc = packageSvc;
     this.scanSvc = scanSvc;
     this.packageFileSvc = packageFileSvc;
     this.userSvc = userSvc;
     this.nugetExeDownloaderSvc = nugetExeDownloaderSvc;
     this.settings = settings;
 }
开发者ID:chocolatey,项目名称:chocolatey.org,代码行数:9,代码来源:ApiController.cs


示例11: ApiController

 public ApiController(
     IPackageService packageService,
     IPackageFileService packageFileService,
     IUserService userService,
     INuGetExeDownloaderService nugetExeDownloaderService)
 {
     _packageService = packageService;
     _packageFileService = packageFileService;
     _userService = userService;
     _nugetExeDownloaderService = nugetExeDownloaderService;
 }
开发者ID:rajwilkhu,项目名称:NuGetGallery,代码行数:11,代码来源:ApiController.cs


示例12: ApiController

 public ApiController(
     IPackageService packageService,
     IPackageFileService packageFileService,
     IUserService userService,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IContentService contentService,
     IIndexingService indexingService,
     IStatisticsService statisticsService)
     : this(packageService, packageFileService, userService, nugetExeDownloaderService, contentService, indexingService)
 {
     _statisticsService = statisticsService;
 }
开发者ID:argsv,项目名称:NuGetGallery,代码行数:12,代码来源:ApiController.cs


示例13: PackageService

 public PackageService(
     ICryptographyService cryptoSvc,
     IEntityRepository<PackageRegistration> packageRegistrationRepo,
     IEntityRepository<Package> packageRepo,
     IEntityRepository<PackageStatistics> packageStatsRepo,
     IPackageFileService packageFileSvc)
 {
     this.cryptoSvc = cryptoSvc;
     this.packageRegistrationRepo = packageRegistrationRepo;
     this.packageRepo = packageRepo;
     this.packageStatsRepo = packageStatsRepo;
     this.packageFileSvc = packageFileSvc;
 }
开发者ID:aldion,项目名称:NuGetGallery,代码行数:13,代码来源:PackageService.cs


示例14: PackagesController

 public PackagesController(
     ICryptographyService cryptoSvc,
     IPackageService packageSvc,
     IPackageFileService packageFileRepo,
     IUserService userSvc,
     IMessageService messageService)
 {
     this.cryptoSvc = cryptoSvc;
     this.packageSvc = packageSvc;
     this.packageFileSvc = packageFileRepo;
     this.userSvc = userSvc;
     this.messageService = messageService;
 }
开发者ID:aldion,项目名称:NuGetGallery,代码行数:13,代码来源:PackagesController.cs


示例15: ApiController

 public ApiController(
     IEntitiesContext entitiesContext,
     IPackageService packageService,
     IPackageFileService packageFileService,
     IUserService userService,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IContentService contentService,
     IIndexingService indexingService,
     IAutomaticallyCuratePackageCommand autoCuratePackage,
     IStatisticsService statisticsService)
     : this(entitiesContext, packageService, packageFileService, userService, nugetExeDownloaderService, contentService, indexingService, autoCuratePackage)
 {
     StatisticsService = statisticsService;
 }
开发者ID:SaqibS,项目名称:NuGetGallery,代码行数:14,代码来源:ApiController.cs


示例16: PackageDeleteService

 public PackageDeleteService(
     IEntityRepository<Package> packageRepository,
     IEntityRepository<PackageDelete> packageDeletesRepository,
     IEntitiesContext entitiesContext,
     IPackageService packageService,
     IIndexingService indexingService,
     IPackageFileService packageFileService,
     AuditingService auditingService)
 {
     _packageRepository = packageRepository;
     _packageDeletesRepository = packageDeletesRepository;
     _entitiesContext = entitiesContext;
     _packageService = packageService;
     _indexingService = indexingService;
     _packageFileService = packageFileService;
     _auditingService = auditingService;
 }
开发者ID:ZhiYuanHuang,项目名称:NuGetGallery,代码行数:17,代码来源:PackageDeleteService.cs


示例17: PackageService

 public PackageService(
     ICryptographyService cryptoSvc,
     IEntityRepository<PackageRegistration> packageRegistrationRepo,
     IEntityRepository<Package> packageRepo,
     IEntityRepository<PackageStatistics> packageStatsRepo,
     IPackageFileService packageFileSvc,
     IEntityRepository<PackageOwnerRequest> packageOwnerRequestRepository,
     IIndexingService indexingSvc)
 {
     this.cryptoSvc = cryptoSvc;
     this.packageRegistrationRepo = packageRegistrationRepo;
     this.packageRepo = packageRepo;
     this.packageStatsRepo = packageStatsRepo;
     this.packageFileSvc = packageFileSvc;
     this.packageOwnerRequestRepository = packageOwnerRequestRepository;
     this.indexingSvc = indexingSvc;
 }
开发者ID:micahlmartin,项目名称:NuGetGallery,代码行数:17,代码来源:PackageService.cs


示例18: ApiController

 public ApiController(
     IEntitiesContext entitiesContext,
     IPackageService packageService,
     IPackageFileService packageFileService,
     IUserService userService,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IContentService contentService,
     IIndexingService indexingService)
 {
     EntitiesContext = entitiesContext;
     PackageService = packageService;
     PackageFileService = packageFileService;
     UserService = userService;
     NugetExeDownloaderService = nugetExeDownloaderService;
     ContentService = contentService;
     StatisticsService = null;
     IndexingService = indexingService;
 }
开发者ID:nicholaspei,项目名称:NuGetGallery,代码行数:18,代码来源:ApiController.cs


示例19: ApiController

 public ApiController(
     IEntitiesContext entitiesContext,
     IPackageService packageService,
     IPackageFileService packageFileService,
     IUserService userService,
     INuGetExeDownloaderService nugetExeDownloaderService,
     IContentService contentService,
     IIndexingService indexingService,
     ISearchService searchService,
     IAutomaticallyCuratePackageCommand autoCuratePackage,
     IStatusService statusService,
     IStatisticsService statisticsService,
     IMessageService messageService,
     AuditingService auditingService,
     IGalleryConfigurationService configurationService)
     : this(entitiesContext, packageService, packageFileService, userService, nugetExeDownloaderService, contentService, indexingService, searchService, autoCuratePackage, statusService, messageService, auditingService, configurationService)
 {
     StatisticsService = statisticsService;
 }
开发者ID:rhysawilliams2010,项目名称:NuGetGallery,代码行数:19,代码来源:ApiController.cs


示例20: GetPackageFromCacheOrDownloadIt

        /// <summary>
        /// Look for the INupkg instance in the cache first. If it's in the cache, return it.
        /// Otherwise, download the package from the storage service and store it into the cache.
        /// </summary>
        public static async Task<INupkg> GetPackageFromCacheOrDownloadIt(
            Package package,
            IPackageCacheService cacheService,
            IPackageFileService packageFileService)
        {
            Debug.Assert(package != null);
            Debug.Assert(cacheService != null);
            Debug.Assert(packageFileService != null);

            string cacheKey = CreateCacheKey(package.PackageRegistration.Id, package.Version);
            byte[] buffer = cacheService.GetBytes(cacheKey);
            if (buffer == null)
            {
                // In the past, some very old packages can specify an external package binary not hosted at nuget.org.
                // We no longer allow that today.
                if (!String.IsNullOrEmpty(package.ExternalPackageUrl))
                {
                    var httpClient = new HttpClient();
                    using (var responseStream = await httpClient.GetStreamAsync(package.ExternalPackageUrl))
                    {
                        buffer = responseStream.ReadAllBytes();
                    }
                }
                else
                {
                    using (Stream stream = await packageFileService.DownloadPackageFileAsync(package))
                    {
                        if (stream == null)
                        {
                            throw new InvalidOperationException("Couldn't download the package from the storage.");
                        }

                        buffer = stream.ReadAllBytes();
                    }
                }

                cacheService.SetBytes(cacheKey, buffer);
            }

            return new Nupkg(new MemoryStream(buffer), leaveOpen: false);
        }
开发者ID:rajwilkhu,项目名称:NuGetGallery,代码行数:45,代码来源:PackageHelper.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IPackageFromRepository类代码示例发布时间:2022-05-24
下一篇:
C# IPackageFile类代码示例发布时间: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