Skip to content

Commit 569c7d0

Browse files
committed
Updated readme
1 parent 542d7f6 commit 569c7d0

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@ See [wiki](https://github.com/PawelGerr/Thinktecture.Runtime.Extensions/wiki) fo
3030

3131
# Requirements
3232

33-
* Version 8:
34-
* C# 11 (or higher) for generated code
35-
* SDK 8.0.400 (or higher) for building projects
36-
* Version 7:
37-
* C# 11 (or higher) for generated code
38-
* SDK 7.0.401 (or higher) for building projects
33+
* C# 11 (or higher) for generated code
34+
* SDK 8.0.400 (or higher) for building projects
3935

4036
# Migrations
4137

@@ -299,7 +295,7 @@ Value objects help solve several common problems in software development:
299295
4. **Complex Value Objects**: Encapsulate multiple related values with validation
300296
```csharp
301297
[ComplexValueObject]
302-
public sealed partial class DateRange
298+
public partial class DateRange
303299
{
304300
public DateOnly Start { get; }
305301
public DateOnly End { get; }
@@ -444,13 +440,12 @@ public partial record Result<T>
444440
public record Success(T Value) : Result<T>;
445441
public record Failure(string Error) : Result<T>;
446442

447-
// Convenient implicit conversions
448-
public static implicit operator Result<T>(T value) => new Success(value);
449-
public static implicit operator Result<T>(string error) => new Failure(error);
443+
// Implicit conversions from T and string are implemented automatically
450444
}
451445

452446
// Usage
453447
Result<int> result = await GetDataAsync();
448+
454449
var message = result.Switch(
455450
success: s => $"Got value: {s.Value}",
456451
failure: f => $"Error: {f.Error}"

docs

Submodule docs updated from 44d1c64 to 2f49925

0 commit comments

Comments
 (0)