---
title: TransactionSet
summary: API reference for TransactionSet.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-15
library: SAIF.Framework.Common.Files
reference_type: package
---

# TransactionSet

`TransactionSet` represents one X12 transaction set — the ST/SE-delimited envelope — keyed by the ST segment's transaction set control number (ST02) ([BR-034](../../business-rules.md#br-034-group-keys-derived-from-control-number-elements)). Instances are produced by `EdiGroupParser.CreateTransactionSets`, called from `FunctionalGroup`'s construction, and each instance in turn nests `HierarchialTransaction` groups.

## Purpose
- Provides typed `Header`/`Trailer` access to the parsed ST and SE segments delimiting this transaction set, in addition to the raw `HeaderSegment`/`TrailerSegment` inherited from `GroupContainer`.
- Owns `HierarchialTransactions`, the collection of `IHierarchialTransaction` instances parsed out of this transaction set's member segments by `EdiGroupParser.CreateHierarchialTransactions`, nesting BHT-rooted hierarchical transactions inside the transaction set ([BR-035](../../business-rules.md#br-035-hierarchical-levels-nested-inside-hierarchical-transaction)).

## Context
- Namespace: `SAIF.Common.Files.Edi`
- Assembly/package: `SAIF.Framework.Common.Files`
- Base class: `GroupContainer`
- Also derives (transitively) from `SegmentGroup` and `List<IEdiSegment>` (framework-standard collection base)
- Implements: `ITransactionSet`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Header | `public StSegment Header { get; internal set; }` | The strongly-typed ST (transaction set header) segment for this transaction set. |
| Trailer | `public SeSegment Trailer { get; internal set; }` | The strongly-typed SE (transaction set trailer) segment for this transaction set. |
| HierarchialTransactions | `public IHierarchialTransactionContainer HierarchialTransactions { get; internal set; }` | The BHT-rooted hierarchical transactions nested within this transaction set, parsed by `EdiGroupParser.CreateHierarchialTransactions` ([BR-035](../../business-rules.md#br-035-hierarchical-levels-nested-inside-hierarchical-transaction)). |

## Inherited public members

Members in this section are inherited from `GroupContainer` in `SAIF.Framework.Common.Files`. They are available on this type through inheritance.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| HeaderSegment | `public IEdiSegment HeaderSegment { get; internal set; }` | The raw ST segment that opens this transaction set. | `SAIF.Framework.Common.Files` — `GroupContainer` |
| TrailerSegment | `public IEdiSegment TrailerSegment { get; internal set; }` | The raw SE segment that closes this transaction set. | `SAIF.Framework.Common.Files` — `GroupContainer` |
| Segments | `public IEnumerable<IEdiSegment> Segments { get; internal set; }` | This transaction set's member segments with the ST/SE control segments excluded ([BR-033](../../business-rules.md#br-033-control-segments-excluded-from-member-segments-collections)). | `SAIF.Framework.Common.Files` — `GroupContainer` |

Members in this section are also inherited from `SegmentGroup` in `SAIF.Framework.Common.Files` (the next ancestor up the chain).

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| SegmentGroupId | `public string SegmentGroupId { get; set; }` | The segment tag (`"ST"`) that this group was delimited by during parsing. | `SAIF.Framework.Common.Files` — `SegmentGroup` |
| Index | `public int Index { get; set; }` | The sequential ordinal assigned to this transaction set among its siblings. | `SAIF.Framework.Common.Files` — `SegmentGroup` |
| Key | `public string Key { get; set; }` | The ST02 transaction set control number value that uniquely identifies this transaction set ([BR-034](../../business-rules.md#br-034-group-keys-derived-from-control-number-elements)). | `SAIF.Framework.Common.Files` — `SegmentGroup` |
| Level | `public int Level { get; set; }` | The nesting depth of this group, defaulted to `0`. | `SAIF.Framework.Common.Files` — `SegmentGroup` |

## Sources
- Common\SAIF.Common.Files\Edi\TransactionSet.cs
- Common\SAIF.Common.Files\Edi\ITransactionSet.cs
