Show / Hide Table of Contents

Class MicrosoftUpdatePackage

A base class for all updates stored on an upstream Microsoft Update server.

Stores generic update metadata applicable to both categories (classifications, products, detectoids) and updates (software and driver updates).

Inheritance
System.Object
MicrosoftUpdatePackage
ClassificationCategory
DetectoidCategory
DriverUpdate
ProductCategory
SoftwareUpdate
Implements
IPackage
Namespace: Microsoft.PackageGraph.MicrosoftUpdate.Metadata
Assembly: package-graph-microsoft-update.dll
Syntax
public abstract class MicrosoftUpdatePackage : IPackage

Properties

| Improve this Doc View Source

ApplicabilityRules

Gets the applicability rules for an update

Declaration
public List<ApplicabilityRule> ApplicabilityRules { get; }
Property Value
Type Description
System.Collections.Generic.List<ApplicabilityRule>
| Improve this Doc View Source

Categories

The list of category IDs associated to this update

Declaration
public IReadOnlyList<Guid> Categories { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyList<System.Guid>
| Improve this Doc View Source

Description

Get the category or update description

Declaration
[JsonProperty]
public string Description { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Files

Gets the list of files (content) for update

Declaration
public IEnumerable<IContentFile> Files { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<IContentFile>

List of content files

| Improve this Doc View Source

Handler

Gets the handler that can apply this update to a Windows device

Declaration
public HandlerMetadata Handler { get; }
Property Value
Type Description
HandlerMetadata
| Improve this Doc View Source

Id

Returns the identity of this Microsoft Update package

Declaration
public MicrosoftUpdatePackageIdentity Id { get; }
Property Value
Type Description
MicrosoftUpdatePackageIdentity
| Improve this Doc View Source

Prerequisites

Get the list of prerequisites

Declaration
public List<IPrerequisite> Prerequisites { get; }
Property Value
Type Description
System.Collections.Generic.List<IPrerequisite>

List of prerequisites

| Improve this Doc View Source

Title

Get the category or update title

Declaration
public string Title { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

FromMetadataXml(Byte[], Dictionary<String, UpdateFileUrl>)

Creates a MicrosoftUpdatePackage from raw metadata and a list of content files associated with the package

Declaration
public static MicrosoftUpdatePackage FromMetadataXml(byte[] metadata, Dictionary<string, UpdateFileUrl> filesCollection)
Parameters
Type Name Description
System.Byte[] metadata

RAW metadata. Expected to be UTF8 encoded XML

System.Collections.Generic.Dictionary<System.String, UpdateFileUrl> filesCollection

List of URLs for content files

Returns
Type Description
MicrosoftUpdatePackage

Rehydrated MicrosoftUpdatePackage object

| Improve this Doc View Source

GetCategories(ILookup<Guid, MicrosoftUpdatePackage>)

The list of categories associated with this update.

Declaration
public List<MicrosoftUpdatePackage> GetCategories(ILookup<Guid, MicrosoftUpdatePackage> knownCategories)
Parameters
Type Name Description
System.Linq.ILookup<System.Guid, MicrosoftUpdatePackage> knownCategories

List of known categories. The updates's category IDs will be resolved from this list.

Returns
Type Description
System.Collections.Generic.List<MicrosoftUpdatePackage>

List of categories for the update

| Improve this Doc View Source

GetMetadataStream()

Returns the XML metadata stream from which this update metadata was created.

Declaration
public Stream GetMetadataStream()
Returns
Type Description
System.IO.Stream

XML stream, UTF8 encoded

| Improve this Doc View Source

IsApplicable(List<Guid>)

Determines if the update is applicable based on its list of prerequisites and the list of installed updates (prerequisites) on a computer

Declaration
public bool IsApplicable(List<Guid> installedPrerequisites)
Parameters
Type Name Description
System.Collections.Generic.List<System.Guid> installedPrerequisites

List of installed updates on a computer

Returns
Type Description
System.Boolean

True if all prerequisites are met, false otherwise

| Improve this Doc View Source

MatchTitle(String[])

Matches keywords in the title of the update

Declaration
public bool MatchTitle(string[] keywords)
Parameters
Type Name Description
System.String[] keywords

List of keywords to match. All keywords must match

Returns
Type Description
System.Boolean

True if all keywords match, false otherwise.

| Improve this Doc View Source

ReleaseMetadataBytes()

Releases raw metadata cached in memory.

Declaration
public void ReleaseMetadataBytes()

Explicit Interface Implementations

| Improve this Doc View Source

IPackage.Id

Returns the identity of this Microsoft Update package

Declaration
IPackageIdentity IPackage.Id { get; }
Returns
Type Description
IPackageIdentity

Implements

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