OpenUrzednik.Core
1.0.21-preview.g824c7f3c14
Prefix Reserved
See the version list below for details.
dotnet add package OpenUrzednik.Core --version 1.0.21-preview.g824c7f3c14
NuGet\Install-Package OpenUrzednik.Core -Version 1.0.21-preview.g824c7f3c14
<PackageReference Include="OpenUrzednik.Core" Version="1.0.21-preview.g824c7f3c14" />
<PackageVersion Include="OpenUrzednik.Core" Version="1.0.21-preview.g824c7f3c14" />
<PackageReference Include="OpenUrzednik.Core" />
paket add OpenUrzednik.Core --version 1.0.21-preview.g824c7f3c14
#r "nuget: OpenUrzednik.Core, 1.0.21-preview.g824c7f3c14"
#:package OpenUrzednik.Core@1.0.21-preview.g824c7f3c14
#addin nuget:?package=OpenUrzednik.Core&version=1.0.21-preview.g824c7f3c14&prerelease
#tool nuget:?package=OpenUrzednik.Core&version=1.0.21-preview.g824c7f3c14&prerelease
OpenUrzednik.Core
Wspólne abstrakcje dla całego zestawu OpenUrzednik.NET — wzorzec Result (OpenUrzednikResult / OpenUrzednikResult<T>), typowane błędy (OpenUrzednikError) oraz wyjątki (OpenUrzednikException) dla konsumentów preferujących klasyczny styl.
Część zestawu OpenUrzednik.NET — zobacz główne README po pełny przegląd projektu.
Instalacja
dotnet add package OpenUrzednik.Core
Przykład użycia
using OpenUrzednik.Core;
using OpenUrzednik.Core.Errors;
using OpenUrzednik.Core.Extensions;
OpenUrzednikResult<int> result = OpenUrzednikResult.Success(42);
int value = result.EnsureSuccess();
Praca z wynikiem
var label = result
.Map(v => v * 2)
.Match(v => $"Wartość: {v}", errors => $"Błąd: {errors[0].Message}");
if (result.TryGetValue(out var current))
Console.WriteLine(current);
Map zmienia wartość udanego wyniku, Bind uruchamia kolejną operację, która też zwraca wynik, a Match obsługuje oba przypadki. Jeśli wynik zawiera błędy, przechodzą one dalej bez zmian, a przekazane funkcje nie są wywoływane.
EnsureSuccess() rzuca wyjątek pochodny od OpenUrzednikException. Jego właściwość Error zawiera błąd razem z metadanymi (np. kodem statusu HTTP), a Errors wszystkie błędy wyniku. Kilka błędów walidacji trafia do jednego OpenUrzednikValidationException.
Ten pakiet jest zależnością wszystkich pakietów provider-specific (OpenUrzednik.Gus, OpenUrzednik.Krs, OpenUrzednik.Mf, OpenUrzednik.Nbp) i zwykle nie instaluje się go samodzielnie, chyba że budujesz własnego klienta w tym samym stylu.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on OpenUrzednik.Core:
| Package | Downloads |
|---|---|
|
OpenUrzednik.Nbp
Unofficial .NET client for the NBP (Narodowy Bank Polski) API: currency exchange rates, rate tables and gold prices. Not affiliated with NBP. |
|
|
OpenUrzednik.Diagnostics
Unofficial OpenUrzednik.NET adapter for System.Diagnostics: turns the clients' spans into Activities for OpenTelemetry and other listeners. |
|
|
OpenUrzednik.Extensions.Logging
Unofficial OpenUrzednik.NET adapter for Microsoft.Extensions.Logging: sends the clients' structured logs to ILogger. |
|
|
OpenUrzednik.Transport.Http
Unofficial OpenUrzednik.NET HTTP transport types: the errors caused by HTTP responses (HttpNotFoundError and the others, subclasses of Core's condition errors) and their status code, for the REST providers and the apps that use them. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0-preview.59.g7f68699ce6 | 61 | 11/13/2026 |
| 1.1.0-preview.57.g8a5d48a15c | 55 | 11/13/2026 |
| 1.1.0-preview.55.g7af4705210 | 61 | 11/11/2026 |
| 1.1.0-preview.53.g798e9237fb | 68 | 11/10/2026 |
| 1.1.0-preview.51.g592b93df71 | 65 | 11/10/2026 |
| 1.1.0-preview.49.g808afd533a | 69 | 11/10/2026 |
| 1.1.0-preview.47.gf86ba5d361 | 74 | 11/8/2026 |
| 1.1.0-preview.43.g788ba55dc4 | 80 | 11/8/2026 |
| 1.1.0-preview.40.g0abf7d5b40 | 72 | 11/8/2026 |
| 1.1.0-preview.38.ge9ca6746b2 | 70 | 11/7/2026 |
| 1.1.0-preview.36.g872918d5d4 | 70 | 11/7/2026 |
| 1.1.0-preview.34.g4765295f16 | 80 | 11/7/2026 |
| 1.1.0-preview.32.g1c7adaeed0 | 74 | 11/7/2026 |
| 1.1.0-preview.30.g0c6301ab81 | 74 | 11/7/2026 |
| 1.1.0-preview.28.gfe9b9c152a | 69 | 11/7/2026 |
| 1.1.0-preview.26.g03e8e27645 | 75 | 11/7/2026 |
| 1.1.0-preview.17.g5f51e9d18b | 74 | 11/6/2026 |
| 1.1.0-preview.12.gdc30608049 | 75 | 11/6/2026 |
| 1.0.0 | 488 | 11/6/2026 |