Show / Hide Table of Contents

Interface IContentStore

Download, storage and retrieval for package content (update content). Stores IContentFile

Namespace: Microsoft.PackageGraph.Storage
Assembly: package-graph-microsoft-update.dll
Syntax
public interface IContentStore

Properties

| Improve this Doc View Source

DownloadedSize

The size in bytes of content downloaded during the current download operation

Declaration
long DownloadedSize { get; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

QueuedCount

The count of content files left to be downloaded in the current download operation

Declaration
int QueuedCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

QueuedSize

The size in bytes of content left to be downloaded in the current download operation

Declaration
long QueuedSize { get; }
Property Value
Type Description
System.Int64

Methods

| Improve this Doc View Source

Contains(IContentFile)

Checks if a content file has been downloaded

Declaration
bool Contains(IContentFile file)
Parameters
Type Name Description
IContentFile file

File to check if it was downloaded

Returns
Type Description
System.Boolean

True if the file was downloaded, false otherwise

| Improve this Doc View Source

Contains(IContentFileDigest, out String)

Checks if an update file (by hash) has been downloaded

Declaration
bool Contains(IContentFileDigest fileDigest, out string fileName)
Parameters
Type Name Description
IContentFileDigest fileDigest

File hash to check if it was downloaded

System.String fileName

If the store contains the file by hash, this parameter receives the original file name

Returns
Type Description
System.Boolean

True if the file was downloaded, false otherwise

| Improve this Doc View Source

Download(IEnumerable<IContentFile>, CancellationToken)

Downloads the specified update content files.

Declaration
void Download(IEnumerable<IContentFile> files, CancellationToken cancelToken)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IContentFile> files

List of update content files to download

System.Threading.CancellationToken cancelToken

Cancellation token for aborting the operation

| Improve this Doc View Source

DownloadAsync(IContentFile, CancellationToken)

Downloads the specified update content file

Declaration
Task DownloadAsync(IContentFile file, CancellationToken cancelToken)
Parameters
Type Name Description
IContentFile file
System.Threading.CancellationToken cancelToken
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

Get(IContentFile)

Gets a read only stream for an update content file

Declaration
Stream Get(IContentFile updateFile)
Parameters
Type Name Description
IContentFile updateFile

The update file to open

Returns
Type Description
System.IO.Stream

Read only stream for the requested update content file

| Improve this Doc View Source

Get(IContentFileDigest)

Gets a read only stream for an update content file (by hash)

Declaration
Stream Get(IContentFileDigest fileDigest)
Parameters
Type Name Description
IContentFileDigest fileDigest

The update file (by hash) to open

Returns
Type Description
System.IO.Stream

Read only stream for the requested update content file

| Improve this Doc View Source

GetUri(IContentFile)

Gets the source URI for the update content file

Declaration
string GetUri(IContentFile updateFile)
Parameters
Type Name Description
IContentFile updateFile

The update file

Returns
Type Description
System.String

Source Uri for the content file

| Improve this Doc View Source

GetUri(IContentFileDigest)

Gets an URI for the content file (by hash)

Declaration
string GetUri(IContentFileDigest fileDigest)
Parameters
Type Name Description
IContentFileDigest fileDigest

The update file hash

Returns
Type Description
System.String

Uri to content file

Events

| Improve this Doc View Source

Progress

Raised on progress for long running content store operations

Declaration
event EventHandler<ContentOperationProgress> Progress
Event Type
Type Description
System.EventHandler<ContentOperationProgress>

Progress data.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX