SystemRequirementsTryGetPackageThatWasDownloadedAlready Method |
If there already the currently best package in the download directory, this function gets the present downloaded package.
If anything is invalid (wrong format of the version file,
wrong hash sum), the return value is Null.
Namespace: Altaxo.Serialization.AutoUpdatesAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3261.0 (4.8.3261.0)
Syntax public static (PackageInfo packageInfo, FileStream? packageFileStream) TryGetPackageThatWasDownloadedAlready(
Stream versionFileStream,
string storagePath,
bool leavePackageFileStreamOpen = false
)
Parameters
- versionFileStream Stream
- Stream to read the version info from. This must be the opened stream of the VersionInfo.json file in the download directory.
- storagePath String
- Path to the directory that stores the downloaded package.
- leavePackageFileStreamOpen Boolean (Optional)
- If true, the file stream of the package file that was opened for checking the hash is left opened and
returned as the second item of the returned tuple. In that case, you are responsible for disposing the stream.
Return Value
ValueTuplePackageInfo,
FileStreamThe info for the already present package in the download directory. If anything is invalid, the return value is null.
See Also