PTrampert.Optionals
0.4.0
See the version list below for details.
dotnet add package PTrampert.Optionals --version 0.4.0
NuGet\Install-Package PTrampert.Optionals -Version 0.4.0
<PackageReference Include="PTrampert.Optionals" Version="0.4.0" />
<PackageVersion Include="PTrampert.Optionals" Version="0.4.0" />
<PackageReference Include="PTrampert.Optionals" />
paket add PTrampert.Optionals --version 0.4.0
#r "nuget: PTrampert.Optionals, 0.4.0"
#:package PTrampert.Optionals@0.4.0
#addin nuget:?package=PTrampert.Optionals&version=0.4.0
#tool nuget:?package=PTrampert.Optionals&version=0.4.0
PTrampert.Optionals
Library supporting "Optional" objects, distinct from nullable. Possibly useful for PATCH routes.
Overview
PTrampert.Optionals is a C# library designed to facilitate the handling of flat PATCH objects in .NET web applications. With this library, you can easily distinguish between properties that are omitted from a PATCH request and those explicitly set to null or a value.
This is especially useful when you want to update only specific properties of an object, leaving others unchanged. For example, if you send a PATCH request like:
{
"name": "New Name"
}
and your object contains additional properties besides name, PTrampert.Optionals makes it easy to ensure that only name is updated, and all other properties remain untouched.
Features
- Supports "Optional" types for PATCH operations.
- Distinguishes between omitted properties and properties set to
null. - Designed for use in .NET web APIs.
- Streamlines partial updates to complex objects.
Getting Started
The library is intended for scenarios where you need precise control over which properties are updated during a PATCH request. If a property is omitted from the PATCH body, it will not be changed in the target object.
Code examples and installation instructions will be added soon.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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 was computed. 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. |
-
net8.0
- Microsoft.CodeAnalysis.CSharp (>= 4.14.0)
- Microsoft.CodeDom.Providers.DotNetCompilerPlatform (>= 4.1.0)
- System.CodeDom (>= 9.0.8)
- System.Text.Json (>= 9.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.