---
title: EnvironmentOptions
summary: API reference for EnvironmentOptions.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Services
reference_type: package
---

# EnvironmentOptions

A `List<CodeDescription>` pre-populated with the fixed set of environment-group codes (Dev, Test, Qa, Prod, Localhost, Other) offered by the Online Support error-log UI, and a static helper that maps each code to the hostname/path fragments used to identify that environment. It has no runtime collaborators.

## Purpose
- Provides the standard, ready-to-bind list of environment codes/descriptions for error-log filtering UI.
- Provides the set of hostname/path substrings associated with each environment code, used to auto-detect an error's environment from machine name or file path.

## Context
- Namespace: `SAIF.Services.OnlineSupport.ErrorLogs`
- Assembly/package: `SAIF.Services` (packaged inside the `SAIF.SAIFCode.Core` NuGet package)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| EnvironmentOptions() | `public EnvironmentOptions()` | Populates the list with the six fixed `CodeDescription` entries: D/Dev, T/Test, Q/Qa, P/Prod, L/Localhost, O/Other. |
| GetSearchString | `public static IEnumerable<string> GetSearchString(string code)` | Returns the list of hostname/path substrings (always including an empty string) associated with the given environment code (`P`, `Q`, `T`, `D`, `L`, or `O`); returns just the empty-string entry for any unrecognized code. |

## Behavioral notes
- The environment code set and their associated hostname fragments (e.g. `"netprod"`, `"webqa"`, `"nettest01"`) are hardcoded, reflecting a fixed, legacy set of known server names rather than a configurable list*.

> **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/OnlineSupport/ErrorLogs/EnvironmentOptions.cs
