Skip to content

Commit a22b9bc

Browse files
author
Buildvana
committed
Prepare release 2.0.31 [skip ci]
1 parent e644709 commit a22b9bc

18 files changed

+407
-473
lines changed

CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### New features
1111

12+
### Changes to existing features
13+
14+
### Bugs fixed in this release
15+
16+
### Known problems introduced by this release
17+
18+
## [2.0.31](https://github.com/Tenacom/Louis/releases/tag/2.0.31) (2024-02-26)
19+
20+
### New features
21+
1222
- Class `Louis.ComponentModel.ParsableStringConverter<T>` and method `Louis.ComponentModel.SimpleStringConverter.AddToTypeDescriptor<T>` offer a ready-made type converter for any type implementing [`IParsable<TSelf>`](https://learn.microsoft.com/en-us/dotnet/api/system.iparsable-1).
1323
`ParsableStringConverter<T>` and `AddToTypeDescriptor<T>` are only available on target platforms where `IParsable<TSelf>` is available, i.e. .NET 7 and later versions.
1424
- Two new boolean properties in class `Louis.Hosting.AsyncHostedService` let subclasses decide whether `StartAsync` should fail when the service is stopped before starting (`FailOnSetupNotStarted`) or `SetupAsync` completes with `false` (`FailOnSetupUnsuccessful`).
@@ -30,10 +40,6 @@ The default value is `true` for both properties.
3040
- Class `Louis.Hosting.AsyncHostedService` now explicitly implements the `StartAsync` and `StopAsync` methods from `IHostedService`.
3141
The two methods were previously only visible when casting an instance to `IHostedService`, to avoid confusion with methods inherited from `Luois.Threading.AsyncService`. However, this violated design rule [CA1033](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1033).
3242

33-
### Bugs fixed in this release
34-
35-
### Known problems introduced by this release
36-
3743
## [1.3.4](https://github.com/Tenacom/Louis/releases/tag/1.3.4) (2023-11-26)
3844

3945
### New features
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
#nullable enable
22
Louis.Hosting.AsyncHostedService
33
Louis.Hosting.AsyncHostedService.AsyncHostedService(Microsoft.Extensions.Logging.ILogger! logger) -> void
4+
Louis.Hosting.AsyncHostedService.StartAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
5+
Louis.Hosting.AsyncHostedService.StopAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
46
override sealed Louis.Hosting.AsyncHostedService.LogBeforeExecute() -> void
57
override sealed Louis.Hosting.AsyncHostedService.LogBeforeSetup() -> void
68
override sealed Louis.Hosting.AsyncHostedService.LogBeforeTeardown() -> void
79
override sealed Louis.Hosting.AsyncHostedService.LogExecuteCanceled() -> void
810
override sealed Louis.Hosting.AsyncHostedService.LogExecuteCompleted() -> void
911
override sealed Louis.Hosting.AsyncHostedService.LogExecuteFailed(System.Exception! exception) -> void
1012
override sealed Louis.Hosting.AsyncHostedService.LogSetupCanceled() -> void
11-
override sealed Louis.Hosting.AsyncHostedService.LogSetupCompleted() -> void
13+
override sealed Louis.Hosting.AsyncHostedService.LogSetupCompleted(bool success) -> void
1214
override sealed Louis.Hosting.AsyncHostedService.LogSetupFailed(System.Exception! exception) -> void
1315
override sealed Louis.Hosting.AsyncHostedService.LogStateChanged(Louis.Threading.AsyncServiceState oldState, Louis.Threading.AsyncServiceState newState) -> void
1416
override sealed Louis.Hosting.AsyncHostedService.LogStopRequested(Louis.Threading.AsyncServiceState previousState, Louis.Threading.AsyncServiceState currentState, bool result) -> void
1517
override sealed Louis.Hosting.AsyncHostedService.LogTeardownCompleted() -> void
1618
override sealed Louis.Hosting.AsyncHostedService.LogTeardownFailed(System.Exception! exception) -> void
19+
virtual Louis.Hosting.AsyncHostedService.FailOnSetupNotStarted.get -> bool
20+
virtual Louis.Hosting.AsyncHostedService.FailOnSetupUnsuccessful.get -> bool
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
11
#nullable enable
2-
*REMOVED*override sealed Louis.Hosting.AsyncHostedService.LogSetupCompleted() -> void
3-
Louis.Hosting.AsyncHostedService.StartAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
4-
Louis.Hosting.AsyncHostedService.StopAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
5-
override sealed Louis.Hosting.AsyncHostedService.LogSetupCompleted(bool success) -> void
6-
virtual Louis.Hosting.AsyncHostedService.FailOnSetupNotStarted.get -> bool
7-
virtual Louis.Hosting.AsyncHostedService.FailOnSetupUnsuccessful.get -> bool

src/Louis/PublicAPI/net462/PublicAPI.Shipped.txt

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ Louis.Fluency.FluentAction<T, TArg1, TArg2>
4141
Louis.Fluency.FluentAction<T, TArg>
4242
Louis.Fluency.FluentAction<T>
4343
Louis.Fluency.FluentExtensions
44+
Louis.IO.ReadOnlyMemoryStream
45+
Louis.IO.ReadOnlyMemoryStream.CopyTo(System.IO.Stream! destination, int bufferSize) -> void
46+
Louis.IO.ReadOnlyMemoryStream.Read(System.Span<byte> buffer) -> int
47+
Louis.IO.ReadOnlyMemoryStream.ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<int>
48+
Louis.IO.ReadOnlyMemoryStream.ReadOnlyMemoryStream(System.ReadOnlyMemory<byte> data) -> void
49+
Louis.IO.ReadOnlyMemoryStream.Write(System.ReadOnlySpan<byte> buffer) -> void
50+
Louis.IO.ReadOnlyMemoryStream.WriteAsync(System.ReadOnlyMemory<byte> buffer, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask
4451
Louis.LocalActionDisposable
4552
Louis.LocalActionDisposable.Dispose() -> void
4653
Louis.LocalActionDisposable.LocalActionDisposable() -> void
@@ -62,12 +69,18 @@ Louis.Threading.AsyncService.DisposeAsync() -> System.Threading.Tasks.ValueTask
6269
Louis.Threading.AsyncService.DoneToken.get -> System.Threading.CancellationToken
6370
Louis.Threading.AsyncService.RunAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
6471
Louis.Threading.AsyncService.Start(System.Threading.CancellationToken cancellationToken) -> void
65-
Louis.Threading.AsyncService.StartAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<bool>!
72+
Louis.Threading.AsyncService.StartAndWaitAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<Louis.Threading.AsyncServiceSetupResult>!
6673
Louis.Threading.AsyncService.State.get -> Louis.Threading.AsyncServiceState
6774
Louis.Threading.AsyncService.Stop() -> bool
68-
Louis.Threading.AsyncService.StopAsync() -> System.Threading.Tasks.Task<bool>!
69-
Louis.Threading.AsyncService.WaitUntilStartedAsync() -> System.Threading.Tasks.Task<bool>!
75+
Louis.Threading.AsyncService.StopAndWaitAsync() -> System.Threading.Tasks.Task<bool>!
76+
Louis.Threading.AsyncService.WaitUntilStartedAsync() -> System.Threading.Tasks.Task<Louis.Threading.AsyncServiceSetupResult>!
7077
Louis.Threading.AsyncService.WaitUntilStoppedAsync() -> System.Threading.Tasks.Task!
78+
Louis.Threading.AsyncServiceSetupResult
79+
Louis.Threading.AsyncServiceSetupResult.Canceled = 3 -> Louis.Threading.AsyncServiceSetupResult
80+
Louis.Threading.AsyncServiceSetupResult.Faulted = 4 -> Louis.Threading.AsyncServiceSetupResult
81+
Louis.Threading.AsyncServiceSetupResult.NotStarted = 1 -> Louis.Threading.AsyncServiceSetupResult
82+
Louis.Threading.AsyncServiceSetupResult.Successful = 0 -> Louis.Threading.AsyncServiceSetupResult
83+
Louis.Threading.AsyncServiceSetupResult.Unsuccessful = 2 -> Louis.Threading.AsyncServiceSetupResult
7184
Louis.Threading.AsyncServiceState
7285
Louis.Threading.AsyncServiceState.Created = 0 -> Louis.Threading.AsyncServiceState
7386
Louis.Threading.AsyncServiceState.Disposed = 5 -> Louis.Threading.AsyncServiceState
@@ -78,13 +91,24 @@ Louis.Threading.AsyncServiceState.Stopping = 3 -> Louis.Threading.AsyncServiceSt
7891
Louis.Threading.InterlockedFlag
7992
Louis.Threading.InterlockedFlag.CheckAndSet(bool value) -> bool
8093
Louis.Threading.InterlockedFlag.Equals(Louis.Threading.InterlockedFlag other) -> bool
94+
Louis.Threading.InterlockedFlag.Equals(bool other) -> bool
8195
Louis.Threading.InterlockedFlag.InterlockedFlag() -> void
8296
Louis.Threading.InterlockedFlag.InterlockedFlag(bool value) -> void
8397
Louis.Threading.InterlockedFlag.TryReset() -> bool
8498
Louis.Threading.InterlockedFlag.TrySet() -> bool
8599
Louis.Threading.InterlockedFlag.TrySet(bool value) -> bool
86100
Louis.Threading.InterlockedFlag.Value.get -> bool
87101
Louis.Threading.InterlockedFlag.Value.set -> void
102+
Louis.Threading.InterlockedReference<T>
103+
Louis.Threading.InterlockedReference<T>.CompareExchange(T? value, T? comparand) -> T?
104+
Louis.Threading.InterlockedReference<T>.Equals(Louis.Threading.InterlockedReference<T!> other) -> bool
105+
Louis.Threading.InterlockedReference<T>.Equals(T? other) -> bool
106+
Louis.Threading.InterlockedReference<T>.Exchange(T? value) -> T?
107+
Louis.Threading.InterlockedReference<T>.InterlockedReference() -> void
108+
Louis.Threading.InterlockedReference<T>.InterlockedReference(T? value) -> void
109+
Louis.Threading.InterlockedReference<T>.IsNull.get -> bool
110+
Louis.Threading.InterlockedReference<T>.Value.get -> T?
111+
Louis.Threading.InterlockedReference<T>.Value.set -> void
88112
Louis.Threading.ValueTaskUtility
89113
Louis.TimeConstants
90114
abstract Louis.Threading.AsyncService.ExecuteAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
@@ -112,9 +136,29 @@ const Louis.TimeConstants.TicksPerMillisecond = 10000 -> long
112136
const Louis.TimeConstants.TicksPerMinute = 600000000 -> long
113137
const Louis.TimeConstants.TicksPerSecond = 10000000 -> long
114138
const Louis.TimeConstants.TicksPerWeek = 6048000000000 -> long
139+
override Louis.IO.ReadOnlyMemoryStream.CanRead.get -> bool
140+
override Louis.IO.ReadOnlyMemoryStream.CanSeek.get -> bool
141+
override Louis.IO.ReadOnlyMemoryStream.CanWrite.get -> bool
142+
override Louis.IO.ReadOnlyMemoryStream.CopyToAsync(System.IO.Stream! destination, int bufferSize, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
143+
override Louis.IO.ReadOnlyMemoryStream.Flush() -> void
144+
override Louis.IO.ReadOnlyMemoryStream.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
145+
override Louis.IO.ReadOnlyMemoryStream.Length.get -> long
146+
override Louis.IO.ReadOnlyMemoryStream.Position.get -> long
147+
override Louis.IO.ReadOnlyMemoryStream.Position.set -> void
148+
override Louis.IO.ReadOnlyMemoryStream.Read(byte[]! buffer, int offset, int count) -> int
149+
override Louis.IO.ReadOnlyMemoryStream.ReadAsync(byte[]! buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<int>!
150+
override Louis.IO.ReadOnlyMemoryStream.ReadByte() -> int
151+
override Louis.IO.ReadOnlyMemoryStream.Seek(long offset, System.IO.SeekOrigin origin) -> long
152+
override Louis.IO.ReadOnlyMemoryStream.SetLength(long value) -> void
153+
override Louis.IO.ReadOnlyMemoryStream.Write(byte[]! buffer, int offset, int count) -> void
154+
override Louis.IO.ReadOnlyMemoryStream.WriteAsync(byte[]! buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
155+
override Louis.IO.ReadOnlyMemoryStream.WriteByte(byte value) -> void
115156
override Louis.Threading.InterlockedFlag.Equals(object? obj) -> bool
116157
override Louis.Threading.InterlockedFlag.GetHashCode() -> int
117158
override Louis.Threading.InterlockedFlag.ToString() -> string!
159+
override Louis.Threading.InterlockedReference<T>.Equals(object? obj) -> bool
160+
override Louis.Threading.InterlockedReference<T>.GetHashCode() -> int
161+
override Louis.Threading.InterlockedReference<T>.ToString() -> string!
118162
override sealed Louis.ComponentModel.SimpleStringConverter<T>.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type! sourceType) -> bool
119163
override sealed Louis.ComponentModel.SimpleStringConverter<T>.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool
120164
override sealed Louis.ComponentModel.SimpleStringConverter<T>.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object?
@@ -279,7 +323,13 @@ static Louis.Text.UnicodeCharacterUtility.IsValidIdentifier(string? name) -> boo
279323
static Louis.Text.Utf8Utility.GetMaxCharsInBytes(System.ReadOnlySpan<char> chars, int maxBytes) -> int
280324
static Louis.Text.Utf8Utility.GetMaxCharsInBytes(string! str, int maxBytes) -> int
281325
static Louis.Threading.InterlockedFlag.operator !=(Louis.Threading.InterlockedFlag a, Louis.Threading.InterlockedFlag b) -> bool
326+
static Louis.Threading.InterlockedFlag.operator !=(Louis.Threading.InterlockedFlag a, bool b) -> bool
282327
static Louis.Threading.InterlockedFlag.operator ==(Louis.Threading.InterlockedFlag a, Louis.Threading.InterlockedFlag b) -> bool
328+
static Louis.Threading.InterlockedFlag.operator ==(Louis.Threading.InterlockedFlag a, bool b) -> bool
329+
static Louis.Threading.InterlockedReference<T>.operator !=(Louis.Threading.InterlockedReference<T!> a, Louis.Threading.InterlockedReference<T!> b) -> bool
330+
static Louis.Threading.InterlockedReference<T>.operator !=(Louis.Threading.InterlockedReference<T!> a, T? b) -> bool
331+
static Louis.Threading.InterlockedReference<T>.operator ==(Louis.Threading.InterlockedReference<T!> a, Louis.Threading.InterlockedReference<T!> b) -> bool
332+
static Louis.Threading.InterlockedReference<T>.operator ==(Louis.Threading.InterlockedReference<T!> a, T? b) -> bool
283333
static Louis.Threading.ValueTaskUtility.WhenAll(System.Collections.Generic.IEnumerable<System.Threading.Tasks.ValueTask>! valueTasks) -> System.Threading.Tasks.ValueTask
284334
static Louis.Threading.ValueTaskUtility.WhenAll(params System.Threading.Tasks.ValueTask[]! valueTasks) -> System.Threading.Tasks.ValueTask
285335
static readonly Louis.Text.Utf8Utility.Utf8NoBomEncoding -> System.Text.Encoding!
@@ -291,11 +341,11 @@ virtual Louis.Threading.AsyncService.LogExecuteCanceled() -> void
291341
virtual Louis.Threading.AsyncService.LogExecuteCompleted() -> void
292342
virtual Louis.Threading.AsyncService.LogExecuteFailed(System.Exception! exception) -> void
293343
virtual Louis.Threading.AsyncService.LogSetupCanceled() -> void
294-
virtual Louis.Threading.AsyncService.LogSetupCompleted() -> void
344+
virtual Louis.Threading.AsyncService.LogSetupCompleted(bool success) -> void
295345
virtual Louis.Threading.AsyncService.LogSetupFailed(System.Exception! exception) -> void
296346
virtual Louis.Threading.AsyncService.LogStateChanged(Louis.Threading.AsyncServiceState oldState, Louis.Threading.AsyncServiceState newState) -> void
297347
virtual Louis.Threading.AsyncService.LogStopRequested(Louis.Threading.AsyncServiceState previousState, Louis.Threading.AsyncServiceState currentState, bool result) -> void
298348
virtual Louis.Threading.AsyncService.LogTeardownCompleted() -> void
299349
virtual Louis.Threading.AsyncService.LogTeardownFailed(System.Exception! exception) -> void
300-
virtual Louis.Threading.AsyncService.SetupAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask
350+
virtual Louis.Threading.AsyncService.SetupAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<bool>
301351
virtual Louis.Threading.AsyncService.TeardownAsync() -> System.Threading.Tasks.ValueTask

0 commit comments

Comments
 (0)