# Samples

Runnable .NET 10 projects that reference `../lib/SWIFTFramework.dll`.

**These samples do not contain a license key.** Set yours, then run:

```bash
export SWIFTFRAMEWORK_RUNTIME_LICENSE_KEY='your-purchased-key'
dotnet run --project ParseAndModify/ParseAndModify.csproj
```

From the repository root (source sample):

```bash
export SWIFTFRAMEWORK_RUNTIME_LICENSE_KEY='your-purchased-key'
dotnet run --project Framework/SourceCode/ConsoleSample/ConsoleSample.csproj
```

Windows (PowerShell):

```powershell
$env:SWIFTFRAMEWORK_RUNTIME_LICENSE_KEY = 'your-purchased-key'
dotnet run --project ParseAndModify/ParseAndModify.csproj
```

Or store the key in .NET User Secrets as `SWIFTFramework:RuntimeLicenseKey` (user secrets id `SWIFTFramework`). Never commit a key.

| Sample | What it shows |
|---|---|
| [ParseAndModify](ParseAndModify/) | Parse FIN text, print XML, change tags, write FIN |
| [CreateMessage](CreateMessage/) | Build an MT103 from code and emit FIN |
| [XmlRoundTrip](XmlRoundTrip/) | Structured XML export and import |

```bash
export SWIFTFRAMEWORK_RUNTIME_LICENSE_KEY='your-purchased-key'
dotnet run --project CreateMessage/CreateMessage.csproj
dotnet run --project XmlRoundTrip/XmlRoundTrip.csproj
```
