---
title: SAIF.Framework.Common API reference
summary: Index of all public types in this library.
status: draft
owner: saif-docgen
last_reviewed: 2026-09-15
library: SAIF.Framework.Common
reference_type: package
---

# SAIF.Framework.Common API reference

This page lists all public types exposed by `SAIF.Framework.Common`. Each type links to its full API reference page.

## Types

| Type | Kind | Namespace | Purpose |
| --- | --- | --- | --- |
| [Enforce](SAIF/Enforce.md) | Class | `SAIF` | Static fail-fast guard class used to validate method arguments and internal state before use; the guard layer that IEnumerableExtensions, DictionaryExtensions, and other members throughout the library call at the top of their bodies. |
| [DateRange](SAIF.Common/DateRange.md) | Class | `SAIF.Common` | Concrete, mutable begin/end date-pair implementation of `IDateRange`, with value-equality semantics, string round-tripping, and a shared empty-range singleton. |
| [NullableDateRange](SAIF.Common/NullableDateRange.md) | Class | `SAIF.Common` | Date range whose end date may be open-ended (null), used to classify overlap relationships between two such ranges via `DateRangeOverlapResult`. |
| [DateMaker](SAIF.Common/DateMaker.md) | Class | `SAIF.Common` | Static helpers for building and formatting `DateTime` values from EDI-style date/time string fragments used by trading-partner file formats. |
| [Julian](SAIF.Common/Julian.md) | Class | `SAIF.Common` | Static helpers for validating and converting between Julian-format date strings (year + day-of-year) and `DateTime`, matching an EDI/legacy Julian date convention. |
| [Serializer](SAIF.Common/Serializer.md) | Class | `SAIF.Common` | Static JSON/XML serialization helpers built on `DataContractJsonSerializer` and `XmlSerializer`, used to persist and reload plain data objects. |
| [Reflector](SAIF.Common/Reflector.md) | Class | `SAIF.Common` | Single-method reflection helper that enumerates the public properties of a type, used by mapping/binding code that needs a type's property set without hand-written reflection calls. |
| [SequenceGenerator<T>](SAIF.Common/SequenceGenerator.md) | Class | `SAIF.Common` | Abstract base for in-memory monotonic sequence generators; concrete subclasses (`Sequence`, `LongSequence`) supply the increment logic for a specific numeric type. |
| [Sequence](SAIF.Common/Sequence.md) | Class | `SAIF.Common` | In-memory `int` sequence generator; not thread-safe, so concurrent callers can observe or produce duplicate values.* |
| [LongSequence](SAIF.Common/LongSequence.md) | Class | `SAIF.Common` | In-memory `long` sequence generator for value ranges that exceed `int` capacity; not thread-safe.* |
| [EntityBase<TEntity>](SAIF.Common/EntityBase.md) | Class | `SAIF.Common` | Marker base class (no members) that identifies a type as a data entity by implementing `IDataEntity`; consuming libraries use it as a common generic constraint anchor. |
| [ValidationResult](SAIF.Common/ValidationResult.md) | Class | `SAIF.Common` | Serializable, mutable implementation of `IValidationResult` that aggregates validation failures and free-text messages and derives its `IsValid` flag from whether any failures are present. |
| [ValidationFailure](SAIF.Common/ValidationFailure.md) | Class | `SAIF.Common` | Implementation of `IValidationFailure` describing one field-level validation error: which property failed, the attempted value, and the message to surface. |
| [SaifValidationException](SAIF.Common/SaifValidationException.md) | Class | `SAIF.Common` | Exception thrown to signal a validation failure, optionally carrying a full `IValidationResult` so callers can surface all failures rather than a single message. ([BR-044](../business-rules.md#br-044-a-saifvalidationexception-always-exposes-a-non-null-ivalidationresult)) |
| [IDateRange](SAIF.Common/IDateRange.md) | Interface | `SAIF.Common` | Contract for a begin/end date pair, implemented by `DateRange` and consumed throughout `DateRangeExtensions`. |
| [IDateRangeList](SAIF.Common/IDateRangeList.md) | Interface | `SAIF.Common` | Contract for a type that can project itself into a sequence of `IDateRange` values, used by `DateRangeExtensions` overlap/contiguity checks. |
| [IValidationResult](SAIF.Common/IValidationResult.md) | Interface | `SAIF.Common` | Contract for an aggregate validation outcome, implemented by `ValidationResult` and referenced by `SaifValidationException`. |
| [IValidationFailure](SAIF.Common/IValidationFailure.md) | Interface | `SAIF.Common` | Contract for a single field-level validation error, implemented by `ValidationFailure`. |
| [ISequenceGenerator<T>](SAIF.Common/ISequenceGenerator.md) | Interface | `SAIF.Common` | Contract for a monotonic value generator, implemented by `SequenceGenerator<T>` and its subclasses `Sequence`/`LongSequence`. |
| [IDataEntity](SAIF.Common/IDataEntity.md) | Interface | `SAIF.Common` | Marker interface (no members) identifying a type as a data entity; implemented by `EntityBase<TEntity>` for use as a generic constraint anchor by consuming libraries. |
| [ContiguousOptions](SAIF.Common/ContiguousOptions.md) | Enum | `SAIF.Common` | Controls how strictly adjacency is judged when testing whether a sequence of date ranges is contiguous. ([BR-007](../business-rules.md#br-007-the-default-contiguity-mode-is-startisnextday)) |
| [IncludeComparisons](SAIF.Common/IncludeComparisons.md) | Enum | `SAIF.Common` | Controls which boundary of a comparison range is treated as inclusive, used by `IComparableExtensions.IsBetween`. ([BR-036](../business-rules.md#br-036-the-default-date-in-range-inclusivity-is-firstonly-%E2%80%94-begin-date-inclusive%2C-end-date-exclusive)) |
| [OverlappingDateOptions](SAIF.Common/OverlappingDateOptions.md) | Enum | `SAIF.Common` | Controls whether two date ranges sharing an identical boundary date count as overlapping. ([BR-004](../business-rules.md#br-004-whether-shared-endpoints-count-as-an-overlap-is-caller-selectable)) |
| [ContextException](SAIF.Common.Classes/ContextException.md) | Class | `SAIF.Common.Classes` | Abstract base for exceptions that signal a UI/view context problem (missing, invalid, disabled), carrying the target view name and an optional model for the handler to act on. |
| [NoContextException](SAIF.Common.Classes/NoContextException.md) | Class | `SAIF.Common.Classes` | Signals that no context/view could be resolved at all; defaults `TargetView` to `"NoContext"`. ([BR-048](../business-rules.md#br-048-each-context-failure-condition-maps-to-a-fixed-default-target-view-name)) |
| [InvalidContextException](SAIF.Common.Classes/InvalidContextException.md) | Class | `SAIF.Common.Classes` | Signals that the resolved context/view is invalid for the current request; defaults `TargetView` to `"InvalidContext"`. ([BR-048](../business-rules.md#br-048-each-context-failure-condition-maps-to-a-fixed-default-target-view-name)) |
| [InvalidContextForUserException](SAIF.Common.Classes/InvalidContextForUserException.md) | Class | `SAIF.Common.Classes` | Signals that the resolved context/view is invalid specifically for the current user; defaults `TargetView` to `"InvalidContextForUser"`. ([BR-048](../business-rules.md#br-048-each-context-failure-condition-maps-to-a-fixed-default-target-view-name)) |
| [DisabledViewException](SAIF.Common.Classes/DisabledViewException.md) | Class | `SAIF.Common.Classes` | Signals that the target view exists but is currently disabled; defaults `TargetView` to `"DisabledView"` and can carry a model describing the disabled state. ([BR-048](../business-rules.md#br-048-each-context-failure-condition-maps-to-a-fixed-default-target-view-name)) |
| [DateRangeOverlapResult](SAIF.Common.Enums/DateRangeOverlapResult.md) | Enum | `SAIF.Common.Enums` | Classifies how two `NullableDateRange` values relate to one another — the full set of directional overlap states returned by `NullableDateRange.GetOverlapState`. ([BR-006](../business-rules.md#br-006-contiguity-is-evaluated-on-ranges-sorted-ascending-by-begindate%2C-and-fails-on-the-first-violating-pair)) |
| [LogType](SAIF.Common.Enums/LogType.md) | Enum | `SAIF.Common.Enums` | Identifies which of a console application's fixed log slots a message should be routed to, used by `IConsoleLogService`/`ILogWriter`. ([BR-092](<../business-rules.md#br-092-a-console-application-may-address-at-most-five-conventional-log-files-(file0-file4)-plus-a-custom-category>)) |
| [ILogWriter](SAIF.Common.Interfaces/ILogWriter.md) | Interface | `SAIF.Common.Interfaces` | Contract for a single log destination (one file), covering timestamp formatting and buffered writes. No implementation ships in this library. ([BR-091](../business-rules.md#br-091-a-log-file-must-be-registered-against-a-log-id-before-it-can-be-written-to%2C-and-log-writers-are-retrieved-by-that-id), [BR-094](../business-rules.md#br-094-log-services-and-log-writers-are-disposable-resources-and-must-be-released-by-the-consuming-application))* |
| [IConsoleLogService](SAIF.Common.Interfaces/IConsoleLogService.md) | Interface | `SAIF.Common.Interfaces` | Contract for a multi-log logging façade that registers named/typed log files and routes writes and exceptions to them. No implementation ships in this library. ([BR-091](../business-rules.md#br-091-a-log-file-must-be-registered-against-a-log-id-before-it-can-be-written-to%2C-and-log-writers-are-retrieved-by-that-id), [BR-094](../business-rules.md#br-094-log-services-and-log-writers-are-disposable-resources-and-must-be-released-by-the-consuming-application))* |
| [StringUtilities](SAIF.Common.Utility/StringUtilities.md) | Class | `SAIF.Common.Utility` | Static character-class filters that extract or strip specific categories of characters (digits, letters, punctuation, symbols, control characters, whitespace) from a string. ([BR-075](<../business-rules.md#br-075-character-class-filters-retain-(or%2C-for-the-remove-variants%2C-exclude)-exactly-the-characters-matching-the-corresponding-char.is-predicate%2C-and-treat-a-null-input-as-an-empty-string>)) |
| [BooleanExtensions](SAIF.Common.Extensions/BooleanExtensions.md) | Class | `SAIF.Common.Extensions` | Renders a `bool` as one of several fixed flag-string conventions used by file/UI formats. ([BR-073](../business-rules.md#br-073-booleans-render-to-flags-as-y%2Fn%2C-yes%2Fno%2C-or-on%2Foff-depending-on-the-method-chosen)) |
| [ByteExtensions](SAIF.Common.Extensions/ByteExtensions.md) | Class | `SAIF.Common.Extensions` | Byte-array helpers for locating a known signature (e.g. a PDF header), stripping a leading header, and hashing a payload. ([BR-053](../business-rules.md#br-053-a-string-search-pattern-over-a-binary-payload-is-encoded-as-ascii%2C-not-unicode), [BR-054](../business-rules.md#br-054-a-byte-search-returns--1-when-the-haystack-is-empty%2C-the-needle-is-empty%2C-the-needle-is-longer-than-the-haystack%2C-or-the-start-offset-leaves-too-few-bytes), [BR-056](../business-rules.md#br-056-a-header-is-stripped-only-when-the-signature-is-found-at-a-position-greater-than-zero)) |
| [DateExtensions](SAIF.Common.Extensions/DateExtensions.md) | Class | `SAIF.Common.Extensions` | Convenience predicates and formatters for `DateTime`/`DateTime?` values: current/future/past classification, min/max detection, short-date rendering, and epoch conversion. |
| [DateRangeExtensions](SAIF.Common.Extensions/DateRangeExtensions.md) | Class | `SAIF.Common.Extensions` | The library's date-range algorithm surface: equality, open-endedness, overlap and contiguity testing, and range filtering, operating on `IDateRange`/`IEnumerable<IDateRange>`. ([BR-001](../business-rules.md#br-001-a-date-range-is-valid-only-when-begindate-is-less-than-or-equal-to-enddate), [BR-003](../business-rules.md#br-003-two-ranges-with-identical-begin-and-end-dates-overlap-only-when-they-are-not-a-single-day), [BR-004](../business-rules.md#br-004-whether-shared-endpoints-count-as-an-overlap-is-caller-selectable), [BR-005](../business-rules.md#br-005-a-set-of-fewer-than-two-date-ranges-is-always-contiguous)) through [BR-011](../business-rules.md#br-011-the-default-collection-overlap-mode-is-datesmaynotmatch), [BR-034](../business-rules.md#br-034-two-date-ranges-are-equal-if-and-only-if-both-begindate-and-enddate-match), [BR-036](../business-rules.md#br-036-the-default-date-in-range-inclusivity-is-firstonly-%E2%80%94-begin-date-inclusive%2C-end-date-exclusive), [BR-037](../business-rules.md#br-037-a-null-date-is-never-in-range) |
| [DictionaryExtensions](SAIF.Common.Extensions/DictionaryExtensions.md) | Class | `SAIF.Common.Extensions` | Dictionary merge and safe-read/upsert helpers layered on `Enforce` guards. ([BR-082](../business-rules.md#br-082-merging-dictionaries-overwrites-existing-keys-by-default), [BR-083](../business-rules.md#br-083-a-dictionary-read-with-a-supplied-default-never-throws-on-a-missing-key), [BR-084](../business-rules.md#br-084-an-upsert-overwrites-an-existing-key-or-adds-a-new-one-and-always-returns-the-supplied-value)) |
| [DotNet40Extensions](SAIF.Common.Extensions/DotNet40Extensions.md) | Class | `SAIF.Common.Extensions` | JSON load/deserialize helpers for `string`, mirroring a subset of `Serializer`'s functionality for call sites that only have a JSON string/path and not a generic serializer reference. |
| [ExceptionExtensions](SAIF.Common.Extensions/ExceptionExtensions.md) | Class | `SAIF.Common.Extensions` | Formats an exception and its full `InnerException` chain for display or for a delimited application error log. ([BR-049](../business-rules.md#br-049-formatting-a-null-exception-yields-an-empty-string-rather-than-throwing)) through [BR-052](../business-rules.md#br-052-an-error-log-entry-begins-with-the-innermost-exception's-message%2C-followed-by-the-sentinel-%40%23elog%23%40%2C-followed-by-the-full-report%2C-so-a-log-reader-can-split-summary-from-detail) |
| [ExpressionExtensions](SAIF.Common.Extensions/ExpressionExtensions.md) | Class | `SAIF.Common.Extensions` | Strongly-typed property access via expression trees: resolving a `PropertyInfo` from a lambda and setting a property's value without reflecting by string name. ([BR-061](../business-rules.md#br-061-a-property-selector-lambda-must-select-a-member%2C-not-invoke-a-method)) through [BR-064](../business-rules.md#br-064-a-property-may-be-set-only-when-it-has-a-setter%2C-but-that-setter-may-be-non-public---reflective-assignment-deliberately-bypasses-accessibility) |
| [FileExtensions](SAIF.Common.Extensions/FileExtensions.md) | Class | `SAIF.Common.Extensions` | Materializes a `Stream` into an in-memory byte array via `MemoryStream`. ([BR-089](../business-rules.md#br-089-converting-a-stream-to-a-byte-array-copies-from-the-stream's-current-position---the-caller-owns-rewinding---and-does-not-dispose-the-source-stream)) |
| [GenericExtensions](SAIF.Common.Extensions/GenericExtensions.md) | Class | `SAIF.Common.Extensions` | Generic-object helpers: throw-if-null with a custom exception type, a reference/value-aware null test, and JSON/XML string conversion shortcuts. ([BR-058](<../business-rules.md#br-058-json-serialization-uses-javascriptserializer-(system.web.extensions)-and-xml-serialization-uses-xmlserializer%3B-serializable-targets-must-be-reference-types-(where-t-%3A-class)-except-for-savetojson%3Ct%3E%2C-which-is-unconstrained>)) |
| [IComparableExtensions](SAIF.Common.Extensions/IComparableExtensions.md) | Class | `SAIF.Common.Extensions` | Range-membership test for any `IComparable` value, with boundary-inclusivity controlled by `IncludeComparisons`. ([BR-036](../business-rules.md#br-036-the-default-date-in-range-inclusivity-is-firstonly-%E2%80%94-begin-date-inclusive%2C-end-date-exclusive)) |
| [IEnumerableExtensions](SAIF.Common.Extensions/IEnumerableExtensions.md) | Class | `SAIF.Common.Extensions` | General-purpose LINQ gap-fillers: eager iteration, string-joining, membership testing, trailing-item selection, keyed distinct, and full/left outer joins. ([BR-039](../business-rules.md#br-039-a-guarded-argument-must-not-be-null), [BR-085](../business-rules.md#br-085-joining-a-sequence-to-a-string-requires-a-non-null-separator)) through [BR-088](../business-rules.md#br-088-outer-joins-compare-keys-with-the-caller's-iequalitycomparer%3Ctkey%3E-when-supplied%2C-otherwise-equalitycomparer%3Ctkey%3E.default%2C-and-substitute-caller-supplied-defaults-for-unmatched-sides) |
| [NumericExtensions](SAIF.Common.Extensions/NumericExtensions.md) | Class | `SAIF.Common.Extensions` | Numeric string testing and decimal precision helpers. ([BR-079](../business-rules.md#br-079-the-isnumeric-test-is-32-bit-integer-bounded)) through [BR-081](../business-rules.md#br-081-reducing-a-decimal's-precision-truncates) |
| [SecurityPrincipalExtensions](SAIF.Common.Extensions/SecurityPrincipalExtensions.md) | Class | `SAIF.Common.Extensions` | Extracts the account name and domain portions from an `IIdentity`'s `Name` (typically a Windows identity in `DOMAIN\user` form). ([BR-071](../business-rules.md#br-071-a-windows-identity-name-is-interpreted-as-domain%5Cuser)) |
| [StringExtensions](SAIF.Common.Extensions/StringExtensions.md) | Class | `SAIF.Common.Extensions` | The library's largest extension surface: null/blank testing, boolean parsing, slicing/truncation, case conversion (including delegation to `TitleCase`), Unicode normalization, numeric-character testing, decimal conversion, and string wrapping. ([BR-072](../business-rules.md#br-072-a-string-is-truthy-only-when-it-uppercases-to-one-of-y%2C-yes%2C-true%2C-1%2C-or-on), [BR-074](../business-rules.md#br-074-non-ascii-typographic-characters-are-folded-to-ascii-equivalents-before-text-leaves-the-system), [BR-076](<../business-rules.md#br-076-truncate-is-length-safe-(clamps-and-tolerates-null)>)) through [BR-078](../business-rules.md#br-078-a-null-or-whitespace-decimal-string-converts-to-zero-rather-than-raising-an-error) |
| [UriExtensions](SAIF.Common.Extensions/UriExtensions.md) | Class | `SAIF.Common.Extensions` | Derives ASP.NET MVC-style application/controller/action/page name fragments from a request `Uri`'s path segments. ([BR-068](../business-rules.md#br-068-the-application-name-is-url-segment-1), [BR-069](../business-rules.md#br-069-the-page-name-is-url-segment-2%2C-defaulting-to-%22index%22-when-absent), [BR-070](../business-rules.md#br-070-the-default-controller%2Faction-route-is-home%2Findex)) |
| [IncludeComparisons](SAIF.Common.Extensions/IncludeComparisons.md) | Enum | `SAIF.Common.Extensions` | Duplicate of `SAIF.Common.IncludeComparisons`, declared separately in the `SAIF.Common.Extensions` namespace; controls which boundary of a comparison range is treated as inclusive. ([BR-036](../business-rules.md#br-036-the-default-date-in-range-inclusivity-is-firstonly-%E2%80%94-begin-date-inclusive%2C-end-date-exclusive)) |
| [DateRangeExtensions.OverlappingOptions](SAIF.Common.Extensions/DateRangeExtensions.OverlappingOptions.md) | Enum | `SAIF.Common.Extensions` | Nested enum controlling whether two date ranges sharing an identical boundary date count as overlapping, used by `DateRangeExtensions.IsOverlapping`. ([BR-004](../business-rules.md#br-004-whether-shared-endpoints-count-as-an-overlap-is-caller-selectable)) |
| [DateRangeExtensions.ContiguousOptions](SAIF.Common.Extensions/DateRangeExtensions.ContiguousOptions.md) | Enum | `SAIF.Common.Extensions` | Nested enum controlling how strictly adjacency is judged when testing whether a sequence of date ranges is contiguous, used by `DateRangeExtensions.IsContiguous`. ([BR-007](../business-rules.md#br-007-the-default-contiguity-mode-is-startisnextday)) |

<!-- Every public type (class, interface, enum, delegate) must appear in this table. -->
<!-- Every type name must be a markdown link to its documentation page. -->
<!-- Do not leave any type unlinked. -->

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

## Sources
- `Common/SAIF.Common/Interfaces/IDateRange.cs`
- `Common/SAIF.Common/Interfaces/IValidationResult.cs`
- `Common/SAIF.Common/Interfaces/IValidationFailure.cs`
- `Common/SAIF.Common/Interfaces/ISequenceGenerator.cs`
- `Common/SAIF.Common/Interfaces/IDataEntity.cs`
- `Common/SAIF.Common/Interfaces/ILogWriter.cs`
- `Common/SAIF.Common/Interfaces/IConsoleLogService.cs`
- `Common/SAIF.Common/Classes/Enforce.cs`
- `Common/SAIF.Common/Classes/DateRange.cs`
- `Common/SAIF.Common/Classes/NullableDateRange.cs`
- `Common/SAIF.Common/Classes/DateMaker.cs`
- `Common/SAIF.Common/Classes/Julian.cs`
- `Common/SAIF.Common/Classes/Serializer.cs`
- `Common/SAIF.Common/Classes/Reflector.cs`
- `Common/SAIF.Common/Classes/SequenceGenerator.cs`
- `Common/SAIF.Common/Classes/Sequence.cs`
- `Common/SAIF.Common/Classes/LongSequence.cs`
- `Common/SAIF.Common/Classes/EntityBase.cs`
- `Common/SAIF.Common/Classes/ValidationResult.cs`
- `Common/SAIF.Common/Classes/ValidationFailure.cs`
- `Common/SAIF.Common/Classes/SaifValidationException.cs`
- `Common/SAIF.Common/Classes/ContextException.cs`
- `Common/SAIF.Common/Utility/StringUtilities.cs`
- `Common/SAIF.Common/Utility/TitleCase.cs`
- `Common/SAIF.Common/Enums/Enums.cs`
- `Common/SAIF.Common/Enums/DateRangeOverlapResult.cs`
- `Common/SAIF.Common/Enums/LogType.cs`
- `Common/SAIF.Common/Extensions/BooleanExtensions.cs`
- `Common/SAIF.Common/Extensions/ByteExtensions.cs`
- `Common/SAIF.Common/Extensions/DateExtensions.cs`
- `Common/SAIF.Common/Extensions/DateRangeExtensions.cs`
- `Common/SAIF.Common/Extensions/DictionaryExtensions.cs`
- `Common/SAIF.Common/Extensions/DotNet40Extensions.cs`
- `Common/SAIF.Common/Extensions/ExceptionExtensions.cs`
- `Common/SAIF.Common/Extensions/ExpressionExtensions.cs`
- `Common/SAIF.Common/Extensions/FileExtensions.cs`
- `Common/SAIF.Common/Extensions/GenericExtensions.cs`
- `Common/SAIF.Common/Extensions/IComparableExtensions.cs`
- `Common/SAIF.Common/Extensions/IEnumerableExtensions.cs`
- `Common/SAIF.Common/Extensions/NumericExtensions.cs`
- `Common/SAIF.Common/Extensions/SecurityPrincipalExtensions.cs`
- `Common/SAIF.Common/Extensions/StringExtensions.cs`
- `Common/SAIF.Common/Extensions/UriExtensions.cs`
- `Common/SAIF.Common/Properties/AssemblyInfo.cs`
