Class UpstreamServerClient
Retrieves update metadata for expired updates from an upstream update server.
This class should only be used for retrieving individual expired updates when their ID is known. For querying updates use UpstreamUpdatesSource. For querying products and classifications, use UpstreamCategoriesSource
Inheritance
Namespace: Microsoft.PackageGraph.MicrosoftUpdate.Source
Assembly: package-graph-microsoftupdate-source.dll
Syntax
public class UpstreamServerClient
Constructors
| Improve this Doc View SourceUpstreamServerClient(Endpoint)
Initializes a new instance of UpstreamServerClient.
Declaration
public UpstreamServerClient(Endpoint upstreamEndpoint)
Parameters
| Type | Name | Description |
|---|---|---|
| Endpoint | upstreamEndpoint | The server endpoint this client will connect to. |
Properties
| Improve this Doc View SourceUpstreamEndpoint
Gets the update server Endpoint this client connects to.
Declaration
public Endpoint UpstreamEndpoint { get; }
Property Value
| Type | Description |
|---|---|
| Endpoint | Update server Endpoint |
Methods
| Improve this Doc View SourceGetServerConfigData()
Retrieves configuration data from the upstream server.
Declaration
public async Task<ServerSyncConfigData> GetServerConfigData()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Microsoft.UpdateServices.WebServices.ServerSync.ServerSyncConfigData> | Server configuration data |
TryGetExpiredUpdate(Guid, Int32, Int32)
Attempts to retrieve metadata for an update that has expired and was removed from the update catalog index. Sometimes, the metadata for the expired update can still be retrieved. This method takes the update ID (without revision), a starting revision and a maximum range of revisions to attempt retrieval for. This method returns the metadata corresponding to the first revision found.
Declaration
public async Task<MicrosoftUpdatePackage> TryGetExpiredUpdate(Guid partialId, int revisionHint, int searchSpaceWindow)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | partialId | The update ID, without the revision part. |
| System.Int32 | revisionHint | The revision at which to start the search. |
| System.Int32 | searchSpaceWindow | The range of revisions to attempt retrieval for. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<MicrosoftUpdatePackage> | An update if a revision was found, null otherwise |
Events
| Improve this Doc View SourceMetadataQueryProgress
Raised on progress during a metadata query. Reports the current query stage.
Declaration
public event EventHandler<MetadataQueryProgress> MetadataQueryProgress
Event Type
| Type | Description |
|---|---|
| System.EventHandler<MetadataQueryProgress> | Progress data |