Class UpstreamCategoriesSource
Retrieves all available categories from the Microsoft Update catalog.
Categories consist of Detectoids, Products and Classifications.
Products and classifications are used to categorize updates; they are useful as filters for selectively sync'ing updates from an upstream server.
Inheritance
Implements
Namespace: Microsoft.PackageGraph.MicrosoftUpdate.Source
Assembly: package-graph-microsoftupdate-source.dll
Syntax
public class UpstreamCategoriesSource : IMetadataSource
Constructors
| Improve this Doc View SourceUpstreamCategoriesSource(Endpoint)
Create a new MicrosoftUpdate package source that retrieves updates from the specified endpoint
Declaration
public UpstreamCategoriesSource(Endpoint upstreamEndpoint)
Parameters
Type | Name | Description |
---|---|---|
Endpoint | upstreamEndpoint | Endpoint to get updates from |
Methods
| Improve this Doc View SourceContainsMetadata(IPackageIdentity)
Not implemented for an upstream categories source
Declaration
public bool ContainsMetadata(IPackageIdentity packageIdentity)
Parameters
Type | Name | Description |
---|---|---|
IPackageIdentity | packageIdentity | Indentity of category to lookup |
Returns
Type | Description |
---|---|
System.Boolean | True if found, false otherwise |
Exceptions
Type | Condition |
---|---|
System.NotImplementedException |
CopyTo(IMetadataSink, IMetadataFilter, CancellationToken)
Filtered copy not implemented for the categories source as categories cannot be filtered when sync'ing from an upstream server.
Declaration
public void CopyTo(IMetadataSink destination, IMetadataFilter filter, CancellationToken cancelToken)
Parameters
Type | Name | Description |
---|---|---|
IMetadataSink | destination | Destination store for the retrieved metadata |
IMetadataFilter | filter | Filter to apply during the copy operation |
System.Threading.CancellationToken | cancelToken | Cancellation token |
Exceptions
Type | Condition |
---|---|
System.NotImplementedException |
CopyTo(IMetadataSink, CancellationToken)
Copies all package metadata from this source to the target metadata sink
Declaration
public void CopyTo(IMetadataSink destination, CancellationToken cancelToken)
Parameters
Type | Name | Description |
---|---|---|
IMetadataSink | destination | Metadata destination |
System.Threading.CancellationToken | cancelToken | Cancellation token |
GetCategories(CancellationToken)
Retrieves categories from the upstream source
Declaration
public List<MicrosoftUpdatePackage> GetCategories(CancellationToken cancelToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancelToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<MicrosoftUpdatePackage> | List of Microsoft Update categories |
GetFiles<T>(IPackageIdentity)
Not implemented for an upstream update source. Also, do not contain files.
Declaration
public List<T> GetFiles<T>(IPackageIdentity packageIdentity)
Parameters
Type | Name | Description |
---|---|---|
IPackageIdentity | packageIdentity | Identity of the category to retrieve files for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T> | List of files in the category |
Type Parameters
Name | Description |
---|---|
T | Type of file to retrieve. |
Exceptions
Type | Condition |
---|---|
System.NotImplementedException |
GetMetadata(IPackageIdentity)
Not implemented for an upstream categories source
Declaration
public Stream GetMetadata(IPackageIdentity packageIdentity)
Parameters
Type | Name | Description |
---|---|---|
IPackageIdentity | packageIdentity | Identity of the category to retrieve |
Returns
Type | Description |
---|---|
System.IO.Stream | Category metadata as stream |
Exceptions
Type | Condition |
---|---|
System.NotImplementedException |
Events
| Improve this Doc View SourceMetadataCopyProgress
Progress indicator during metadata copy operations
Declaration
public event EventHandler<PackageStoreEventArgs> MetadataCopyProgress
Event Type
Type | Description |
---|---|
System.EventHandler<PackageStoreEventArgs> |
OpenProgress
Progress indicator during source open operations. Not used by UpstreamCategoriesSource.
Declaration
public event EventHandler<PackageStoreEventArgs> OpenProgress
Event Type
Type | Description |
---|---|
System.EventHandler<PackageStoreEventArgs> |