Demolite.Core
0.2.0
dotnet add package Demolite.Core --version 0.2.0
NuGet\Install-Package Demolite.Core -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Demolite.Core" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Demolite.Core" Version="0.2.0" />
<PackageReference Include="Demolite.Core" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Demolite.Core --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Demolite.Core, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Demolite.Core@0.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Demolite.Core&version=0.2.0
#tool nuget:?package=Demolite.Core&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Demolite.Core
Shared Result, Result<T> and Error types for the Demolite packages (Demolite.Db, Demolite.Http).
using Demolite.Core.Models;
Result<int> Parse(string s) => int.TryParse(s, out var v)
? Result<int>.Success(v)
: Result<int>.Failure(new Error("Parse.Invalid", $"'{s}' is not a number."));
Use the non-generic Result for operations that return no value.
Result Validate(string s) => s.Length > 0
? Result.Success()
: Result.Failure(new Error("Validate.Empty", "The value is empty."));
Result<T> derives from Result, so IsSuccess and Error are available on both.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Demolite.Core:
| Package | Downloads |
|---|---|
|
Demolite.Http
A base class for typed api clients on top of HttpClient with Result types, pluggable authentication and dependency injection support. |
|
|
Demolite.Db
An easy to use abstract EF Core repository built on IDbContextFactory and Result types. |
GitHub repositories
This package is not used by any popular GitHub repositories.