C# Class NuGetGallery.PackageService

Inheritance: IPackageService
Mostra file Open project: NuGet/NuGetGallery Class Usage Examples

Public Methods

Method Description
AddPackageOwnerAsync ( NuGetGallery.PackageRegistration package, User user ) : Task
ConfirmPackageOwnerAsync ( NuGetGallery.PackageRegistration package, User pendingOwner, string token ) : Task
CreatePackageAsync ( PackageArchiveReader nugetPackage, PackageStreamMetadata packageStreamMetadata, User user, bool commitChanges = true ) : Task
CreatePackageOwnerRequestAsync ( NuGetGallery.PackageRegistration package, User currentOwner, User newOwner ) : Task
EnrichPackageFromNuGetPackage ( Package package, PackageArchiveReader packageArchive, PackageMetadata packageMetadata, PackageStreamMetadata packageStreamMetadata, User user ) : Package
EnsureValid ( PackageArchiveReader packageArchiveReader ) : void
FindDependentPackages ( Package package ) : IEnumerable
FindPackageByIdAndVersion ( string id, string version, bool allowPrerelease = true ) : Package
FindPackageRegistrationById ( string id ) : NuGetGallery.PackageRegistration
FindPackagesByOwner ( User user, bool includeUnlisted ) : IEnumerable
GetSupportedFrameworks ( PackageArchiveReader package ) : IEnumerable
IncrementDownloadCountAsync ( string id, string version, bool commitChanges = true ) : Task
MarkPackageListedAsync ( Package package, bool commitChanges = true ) : Task
MarkPackageUnlistedAsync ( Package package, bool commitChanges = true ) : Task
PackageService ( IEntityRepository packageRegistrationRepository, IEntityRepository packageRepository, IEntityRepository packageOwnerRequestRepository, IIndexingService indexingService, IPackageNamingConflictValidator packageNamingConflictValidator, AuditingService auditingService ) : System
PublishPackageAsync ( Package package, bool commitChanges = true ) : Task
PublishPackageAsync ( string id, string version, bool commitChanges = true ) : Task
RemovePackageOwnerAsync ( NuGetGallery.PackageRegistration package, User user ) : Task
SetLicenseReportVisibilityAsync ( Package package, bool visible, bool commitChanges = true ) : Task
UpdateIsLatestAsync ( NuGetGallery.PackageRegistration packageRegistration, bool commitChanges = true ) : Task

Private Methods

Method Description
CreateOrGetPackageRegistration ( User currentUser, PackageMetadata packageMetadata ) : NuGetGallery.PackageRegistration
CreatePackageFromNuGetPackage ( NuGetGallery.PackageRegistration packageRegistration, PackageArchiveReader nugetPackage, PackageMetadata packageMetadata, PackageStreamMetadata packageStreamMetadata, User user ) : Package
FindExistingPackageOwnerRequest ( NuGetGallery.PackageRegistration package, User pendingOwner ) : NuGetGallery.PackageOwnerRequest
FindPackage ( IEnumerable packages, bool>.Func predicate = null ) : Package
NotifyIndexingService ( ) : void
ValidateNuGetPackageMetadata ( PackageMetadata packageMetadata ) : void
ValidatePackageTitle ( PackageMetadata packageMetadata ) : void
ValidateSupportedFrameworks ( string supportedFrameworks ) : void

Method Details

AddPackageOwnerAsync() public method

public AddPackageOwnerAsync ( NuGetGallery.PackageRegistration package, User user ) : Task
package NuGetGallery.PackageRegistration
user User
return Task

ConfirmPackageOwnerAsync() public method

public ConfirmPackageOwnerAsync ( NuGetGallery.PackageRegistration package, User pendingOwner, string token ) : Task
package NuGetGallery.PackageRegistration
pendingOwner User
token string
return Task

CreatePackageAsync() public method

public CreatePackageAsync ( PackageArchiveReader nugetPackage, PackageStreamMetadata packageStreamMetadata, User user, bool commitChanges = true ) : Task
nugetPackage PackageArchiveReader
packageStreamMetadata PackageStreamMetadata
user User
commitChanges bool
return Task

CreatePackageOwnerRequestAsync() public method

public CreatePackageOwnerRequestAsync ( NuGetGallery.PackageRegistration package, User currentOwner, User newOwner ) : Task
package NuGetGallery.PackageRegistration
currentOwner User
newOwner User
return Task

EnrichPackageFromNuGetPackage() public method

public EnrichPackageFromNuGetPackage ( Package package, PackageArchiveReader packageArchive, PackageMetadata packageMetadata, PackageStreamMetadata packageStreamMetadata, User user ) : Package
package Package
packageArchive PackageArchiveReader
packageMetadata PackageMetadata
packageStreamMetadata PackageStreamMetadata
user User
return Package

EnsureValid() public method

public EnsureValid ( PackageArchiveReader packageArchiveReader ) : void
packageArchiveReader PackageArchiveReader
return void

FindDependentPackages() public method

public FindDependentPackages ( Package package ) : IEnumerable
package Package
return IEnumerable

FindPackageByIdAndVersion() public method

public FindPackageByIdAndVersion ( string id, string version, bool allowPrerelease = true ) : Package
id string
version string
allowPrerelease bool
return Package

FindPackageRegistrationById() public method

public FindPackageRegistrationById ( string id ) : NuGetGallery.PackageRegistration
id string
return NuGetGallery.PackageRegistration

FindPackagesByOwner() public method

public FindPackagesByOwner ( User user, bool includeUnlisted ) : IEnumerable
user User
includeUnlisted bool
return IEnumerable

GetSupportedFrameworks() public method

public GetSupportedFrameworks ( PackageArchiveReader package ) : IEnumerable
package PackageArchiveReader
return IEnumerable

IncrementDownloadCountAsync() public method

public IncrementDownloadCountAsync ( string id, string version, bool commitChanges = true ) : Task
id string
version string
commitChanges bool
return Task

MarkPackageListedAsync() public method

public MarkPackageListedAsync ( Package package, bool commitChanges = true ) : Task
package Package
commitChanges bool
return Task

MarkPackageUnlistedAsync() public method

public MarkPackageUnlistedAsync ( Package package, bool commitChanges = true ) : Task
package Package
commitChanges bool
return Task

PackageService() public method

public PackageService ( IEntityRepository packageRegistrationRepository, IEntityRepository packageRepository, IEntityRepository packageOwnerRequestRepository, IIndexingService indexingService, IPackageNamingConflictValidator packageNamingConflictValidator, AuditingService auditingService ) : System
packageRegistrationRepository IEntityRepository
packageRepository IEntityRepository
packageOwnerRequestRepository IEntityRepository
indexingService IIndexingService
packageNamingConflictValidator IPackageNamingConflictValidator
auditingService AuditingService
return System

PublishPackageAsync() public method

public PublishPackageAsync ( Package package, bool commitChanges = true ) : Task
package Package
commitChanges bool
return Task

PublishPackageAsync() public method

public PublishPackageAsync ( string id, string version, bool commitChanges = true ) : Task
id string
version string
commitChanges bool
return Task

RemovePackageOwnerAsync() public method

public RemovePackageOwnerAsync ( NuGetGallery.PackageRegistration package, User user ) : Task
package NuGetGallery.PackageRegistration
user User
return Task

SetLicenseReportVisibilityAsync() public method

public SetLicenseReportVisibilityAsync ( Package package, bool visible, bool commitChanges = true ) : Task
package Package
visible bool
commitChanges bool
return Task

UpdateIsLatestAsync() public method

public UpdateIsLatestAsync ( NuGetGallery.PackageRegistration packageRegistration, bool commitChanges = true ) : Task
packageRegistration NuGetGallery.PackageRegistration
commitChanges bool
return Task