PdfServiceProxy¶
PdfServiceProxy hides the internal generated PDFServiceClient (WCF) behind a single GetImage operation, requesting an immediate-priority cache entry and delegating the wait/retry behavior to the remote PDF service via PDFCacheArgs rather than implementing client-side retries itself. It has no in-repository caller and is reachable only by package consumers*.
Purpose¶
- Retrieve a cached PDF page image by sequence number, waiting for the remote service to render and cache it if it is not yet available (OP-WP-05, WP-BR-011).
Context¶
- Namespace:
SAIF.Services.Web.Proxies - Assembly/package:
SAIF.Services.Web.Proxies(packaged inSAIF.SAIFCode.Core)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| Constructor | PdfServiceProxy(string serviceUrl, string database) |
Guards both arguments, then builds a BasicHttpBinding with int.MaxValue quotas; database is stored as the data environment for later requests (WP-BR-001) |
GetImage |
byte[] GetImage(long imageSeqNum, int maxWaitTimeInSeconds = 10) |
Requests immediate caching (priority 10000) under data user "IMG", retrying up to maxWaitTimeInSeconds times at 1-second intervals, and returns the cached image bytes (WP-BR-011) |
Dispose |
void Dispose() |
Closes the underlying generated PDFServiceClient by calling Close(), without an Abort() fallback on a faulted channel* |
Behavioral notes¶
- A null
resultreturned by the wireLoadCachecall throwsNullReferenceException; there is no null guard on the wire response. "IMG"is a fixed data-user pool code, not a database schema.
Constraints and usage notes¶
- Callers must supply both the endpoint URL and the target data environment/database at construction; neither is read from configuration by this wrapper.
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
Services/SAIF.Services.Web.Proxies/PDFServiceProxy.cs