1.1 MacAddress value type
Permissive parser (colon, hyphen, unseparated; case-insensitive; surrounding whitespace) with canonical lowercase no-separator ToString. Implements IParsable/ISpanParsable for ASP.NET route binding and ships a System.Text.Json converter that normalizes on read. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,7 @@ When working through this file, mark increments complete by changing `[ ]` to `[
|
||||
|
||||
Each type lives in `src/FrameProcessor/Domain/`. Tests in `tests/FrameProcessor.Tests/`.
|
||||
|
||||
### [ ] 1.1 `MacAddress`
|
||||
### [x] 1.1 `MacAddress`
|
||||
- `record struct` storing 6 bytes.
|
||||
- `static bool TryParse(string, out MacAddress)` accepting `AA:BB:CC:DD:EE:FF`, `aa-bb-cc-dd-ee-ff`, `AABBCCDDEEFF`, surrounding whitespace.
|
||||
- `ToString()` → canonical lowercase no-separator (`aabbccddeeff`).
|
||||
|
||||
Reference in New Issue
Block a user