Show / Hide Table of Contents

Class BlobContentStore

Implementation of IContentStore that downloads and stores update content in Azure Blob Storage

Inheritance
System.Object
BlobContentStore
Implements
IContentStore
Namespace: Microsoft.PackageGraph.Storage.Azure
Assembly: package-graph-microsoft-update.dll
Syntax
public class BlobContentStore : IContentStore

Fields

| Improve this Doc View Source

PendingFileDownloads

List of pending downloads

Declaration
public ConcurrentDictionary<string, IContentFile> PendingFileDownloads
Field Value
Type Description
System.Collections.Concurrent.ConcurrentDictionary<System.String, IContentFile>

Properties

| Improve this Doc View Source

DownloadedSize

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

Declaration
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public Stream Get(IContentFile contentFile)
Parameters
Type Name Description
IContentFile contentFile
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
public 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
public 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
public string GetUri(IContentFileDigest fileDigest)
Parameters
Type Name Description
IContentFileDigest fileDigest

The update file hash

Returns
Type Description
System.String

Uri to content file

| Improve this Doc View Source

OpenOrCreate(CloudBlobClient, String)

Opens an exiting or creates a new IContentStore with storage in the specified Azure Blob account and container

Declaration
public static BlobContentStore OpenOrCreate(CloudBlobClient client, string containerName)
Parameters
Type Name Description
Microsoft.Azure.Storage.Blob.CloudBlobClient client

The Azure Blob client to use

System.String containerName

The container name where to store update content

Returns
Type Description
BlobContentStore

Events

| Improve this Doc View Source

Progress

Raised on progress for long running content store operations

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

Progress data.

Implements

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