VelopackAsset class
Namespace: Velopack
An individual Velopack asset, could refer to an asset on-disk or in a remote package feed.
public record VelopackAsset : IEquatable<VelopackAsset>
Implements: IEquatable<VelopackAsset>
Constructors
| Constructor | Summary |
|---|---|
VelopackAsset | |
VelopackAsset |
VelopackAsset(original)
protected VelopackAsset(VelopackAsset original)
Parameters
| Name | Type | Description |
|---|---|---|
original | VelopackAsset |
VelopackAsset()
public VelopackAsset()
Properties
| Property | Summary |
|---|---|
EqualityContract | |
PackageId | The name or Id of the package containing this release. |
Version | The version of this release. |
Type | The type of asset (eg. full or delta). |
FileName | The filename of the update package containing this release. |
SHA1 | The SHA1 checksum of the update package containing this release. |
SHA256 | The SHA256 checksum (if available) of the update package containing this release. |
Size | The size in bytes of the update package containing this release. |
NotesMarkdown | The release notes in markdown format, as passed to Velopack when packaging the release. |
NotesHTML | The release notes in HTML format, transformed from Markdown when packaging the release. |
EqualityContract
protected virtual Type EqualityContract { get; }
PackageId
public string PackageId { get; set; }
The name or Id of the package containing this release.
Version
public SemanticVersion Version { get; set; }
The version of this release.
Type
public VelopackAssetType Type { get; set; }
The type of asset (eg. full or delta).
FileName
public string FileName { get; set; }
The filename of the update package containing this release.
SHA1
public string SHA1 { get; set; }
The SHA1 checksum of the update package containing this release.
SHA256
public string SHA256 { get; set; }
The SHA256 checksum (if available) of the update package containing this release.
Size
public long Size { get; set; }
The size in bytes of the update package containing this release.
NotesMarkdown
public string NotesMarkdown { get; set; }
The release notes in markdown format, as passed to Velopack when packaging the release.
NotesHTML
public string NotesHTML { get; set; }
The release notes in HTML format, transformed from Markdown when packaging the release.
Methods
| Method | Summary |
|---|---|
FromZipPackageNoChecksum | Convert a ZipPackage to a VelopackAsset without computing checksums. |
FromZipPackageGenerateChecksumAsync | Convert a ZipPackage to a VelopackAsset, computing SHA1 and SHA256 checksums asynchronously. |
FromNupkgNoChecksum | Load a VelopackAsset from a .nupkg file on disk without computing checksums. |
FromNupkgGenerateChecksumAsync | Load a VelopackAsset from a .nupkg file on disk, computing SHA1 and SHA256 checksums asynchronously. |
ToString | |
PrintMembers | |
GetHashCode | |
Equals | |
Equals |
FromZipPackageNoChecksum(zip)
public static VelopackAsset FromZipPackageNoChecksum(ZipPackage zip)
Convert a ZipPackage to a VelopackAsset without computing checksums.
Parameters
| Name | Type | Description |
|---|---|---|
zip | ZipPackage |
Returns VelopackAsset
FromZipPackageGenerateChecksumAsync(zip)
public static Task<VelopackAsset> FromZipPackageGenerateChecksumAsync(ZipPackage zip)
Convert a ZipPackage to a VelopackAsset, computing SHA1 and SHA256 checksums asynchronously.
Parameters
| Name | Type | Description |
|---|---|---|
zip | ZipPackage |
Returns Task<VelopackAsset>
FromNupkgNoChecksum(filePath)
public static VelopackAsset FromNupkgNoChecksum(string filePath)
Load a VelopackAsset from a .nupkg file on disk without computing checksums.
Parameters
| Name | Type | Description |
|---|---|---|
filePath | string |
Returns VelopackAsset
FromNupkgGenerateChecksumAsync(filePath)
public static Task<VelopackAsset> FromNupkgGenerateChecksumAsync(string filePath)
Load a VelopackAsset from a .nupkg file on disk, computing SHA1 and SHA256 checksums asynchronously.
Parameters
| Name | Type | Description |
|---|---|---|
filePath | string |
Returns Task<VelopackAsset>
ToString()
public override string ToString()
Returns string
PrintMembers(builder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
| Name | Type | Description |
|---|---|---|
builder | StringBuilder |
Returns bool
GetHashCode()
public override int GetHashCode()
Returns int
Equals(obj)
public override bool Equals(object? obj)
Parameters
| Name | Type | Description |
|---|---|---|
obj | object |
Returns bool
Equals(other)
public virtual bool Equals(VelopackAsset? other)
Parameters
| Name | Type | Description |
|---|---|---|
other | VelopackAsset |
Returns bool
Operators
| Operator | Summary |
|---|---|
operator != | |
operator == |
operator !=(left, right)
public static bool operator !=(VelopackAsset? left, VelopackAsset? right)
Parameters
| Name | Type | Description |
|---|---|---|
left | VelopackAsset | |
right | VelopackAsset |
Returns bool
operator ==(left, right)
public static bool operator ==(VelopackAsset? left, VelopackAsset? right)
Parameters
| Name | Type | Description |
|---|---|---|
left | VelopackAsset | |
right | VelopackAsset |
Returns bool
Generated from Velopack 1.1.1