Hal.Core 1.0.0

dotnet add package Hal.Core --version 1.0.0                
NuGet\Install-Package Hal.Core -Version 1.0.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="Hal.Core" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hal.Core --version 1.0.0                
#r "nuget: Hal.Core, 1.0.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.
// Install Hal.Core as a Cake Addin
#addin nuget:?package=Hal.Core&version=1.0.0

// Install Hal.Core as a Cake Tool
#tool nuget:?package=Hal.Core&version=1.0.0                

Hal.Core

Hal.Core is a robust library designed to streamline the implementation of Hypertext Application Language (HAL) in .NET applications. It provides a foundation for creating HAL-compliant APIs, enhancing the readability and maintainability of your code.

Features

  • Resource Building: Simplifies the creation of HAL resources with embedded links.
  • Link Generation: Easily generate and manage hyperlinks within your resources.
  • Collection Handling: Manage collections of resources effectively with built-in utilities.
  • Extensibility: Customizable to fit various use cases.

Installation

Install the package via NuGet:

dotnet add package Hal.Core

Usage

Here's a basic example of how to use Hal.Core in your .NET application:

using Hal.Core;

var forecast = Enumerable.Range(1, 5).Select(index =>
    new WeatherForecast
    (
        DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
        Random.Shared.Next(-20, 55),
        summaries[Random.Shared.Next(summaries.Length)]
    ))
    .ToArray();

var response = new ResourceCollectionBuilder<WeatherForecast, string>(forecast, "meta")
    .AddLink(linkGenerator
    .SetRouteName("GetWeatherForecast")
    .Build())
    .Build();
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Hal.Core:

Package Downloads
VHal.AspNetCore

VHal.AspNetCore provides ASP.NET Core extensions for implementing Hypertext Application Language (HAL) in web APIs. It includes: - ASP.NET Core Integration for creating HAL resources. - Request Handling within the HAL framework. - Resource Link Management for collections and individual resources.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 74 12/22/2024