---
title: WorkCalendarServiceProxy
summary: API reference for WorkCalendarServiceProxy.
status: draft
owner: SAIF.Core Documentation Team
last_reviewed: 2026-09-24
library: SAIF.Services.Web.Proxies
reference_type: package
---

# WorkCalendarServiceProxy

`WorkCalendarServiceProxy` hides the internal generated `SAIFDatesSoapClient` behind four work-day calendar queries, each a direct pass-through to the same-named wire operation with no local business logic. It has no in-repository caller and is reachable only by package consumers*.

## Purpose
- Answer first/last work-day-of-month, working-day, and next-work-day questions for a named calendar ([OP-WP-06](../../operations/work-calendar-date-queries.md)).

## Context
- Namespace: `SAIF.Services.Web.Proxies`
- Assembly/package: `SAIF.Services.Web.Proxies` (packaged in `SAIF.SAIFCode.Core`)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Constructor | `WorkCalendarServiceProxy(string serviceUrl)` | Guards `serviceUrl`, then builds a default `BasicHttpBinding` client ([WP-BR-001](../../business-rules.md#wp-br-001-required-arguments-must-be-non-null-or-non-empty)) |
| `FirstWorkDayOfMonth` | `DateTime FirstWorkDayOfMonth(DateTime date, string calendar)` | Returns the first work day of the month containing `date`, per the named calendar |
| `IsWorkingDay` | `bool IsWorkingDay(DateTime date, string calendar)` | Returns whether `date` is a working day per the named calendar |
| `LastWorkDayOfMonth` | `DateTime LastWorkDayOfMonth(DateTime date, string calendar)` | Returns the last work day of the month containing `date`, per the named calendar |
| `NextWorkDay` | `DateTime NextWorkDay(DateTime date, string calendar)` | Returns the next work day after `date`, per the named calendar |
| `Dispose` | `void Dispose()` | Closes the underlying generated `SAIFDatesSoapClient` by calling `Close()`, without an `Abort()` fallback on a faulted channel* |

## Behavioral notes
- None of the four query methods performs local validation of `date` or `calendar`; an unknown calendar name or invalid date is handled entirely by the remote WorkCalendar service*.

## Constraints and usage notes
- Callers must supply the endpoint URL; this wrapper reads no configuration of its own.

> **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/WorkCalendarServiceProxy.cs`
