Table of Contents

Class SignedPackageArchive

Namespace
NuGet.Packaging.Signing
Assembly
Chocolatey.NuGet.Packaging.dll

A nupkg that supports both reading and writing signatures.

public class SignedPackageArchive : PackageArchiveReader, IPackageCoreReader, IPackageContentReader, IAsyncPackageCoreReader, IAsyncPackageContentReader, ISignedPackage, ISignedPackageReader, IDisposable, ISignedPackageWriter
Inheritance
SignedPackageArchive
Implements
Inherited Members
Extension Methods

Constructors

SignedPackageArchive(Stream, Stream)

public SignedPackageArchive(Stream packageReadStream, Stream packageWriteStream)

Parameters

packageReadStream Stream
packageWriteStream Stream

Methods

AddSignatureAsync(Stream, CancellationToken)

Adds a signature to a package if it is not already signed.

public Task AddSignatureAsync(Stream signatureStream, CancellationToken token)

Parameters

signatureStream Stream

Stream of the signature SignedCms object to be added to the package.

token CancellationToken

Cancellation Token.

Returns

Task

Dispose(bool)

protected override void Dispose(bool disposing)

Parameters

disposing bool

IsZip64Async(CancellationToken)

Check if a package is Zip64.

public Task<bool> IsZip64Async(CancellationToken token)

Parameters

token CancellationToken

A cancellation token.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result (Result) returns a bool indicating whether the package is signed.

Exceptions

OperationCanceledException

Thrown if token is cancelled.

RemoveSignatureAsync(CancellationToken)

Remove a signature from the package, if it exists.

public Task RemoveSignatureAsync(CancellationToken token)

Parameters

token CancellationToken

Cancellation token.

Returns

Task