HiLang 2.5.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package HiLang --version 2.5.0
                    
NuGet\Install-Package HiLang -Version 2.5.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="HiLang" Version="2.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HiLang" Version="2.5.0" />
                    
Directory.Packages.props
<PackageReference Include="HiLang" />
                    
Project file
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 HiLang --version 2.5.0
                    
#r "nuget: HiLang, 2.5.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 HiLang@2.5.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=HiLang&version=2.5.0
                    
Install as a Cake Addin
#tool nuget:?package=HiLang&version=2.5.0
                    
Install as a Cake Tool

HiLang

HiLang is a minimal high-level language to describe the schema of a domain, taking inspiration from protobuf (.proto models) for hierarchical structures and SQL DML for entities, relations and views.

Product 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 was computed.  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. 
.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. 
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 HiLang:

Package Downloads
Hiperspace.SQL

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.5.32 84 1/30/2026
2.5.29 94 1/17/2026
2.5.28 576 12/31/2025
2.5.26 1,608 12/21/2025
2.5.21 3,790 12/10/2025
2.5.18 5,860 12/3/2025
2.5.8 5,346 11/15/2025
2.5.2 5,360 11/6/2025
2.5.1 5,334 10/23/2025
2.5.0 5,345 10/20/2025
2.4.6 5,358 9/23/2025
2.4.4 5,441 8/7/2025
2.4.2 5,323 7/28/2025
2.4.0 5,343 7/10/2025
2.3.8 5,328 7/1/2025
2.3.7 5,360 6/18/2025
2.3.4 5,348 6/5/2025
2.2.2 5,345 5/5/2025
2.2.1 5,396 4/14/2025
2.2.0 5,298 3/29/2025
2.1.9 5,406 3/5/2025
2.1.6 5,305 2/15/2025
2.1.0 5,307 1/24/2025
2.0.0 5,284 1/14/2025
1.3.9 5,322 11/15/2024
1.3.0 5,304 10/5/2024
1.2.18 5,352 9/15/2024
1.2.16 5,338 9/7/2024
1.2.15 5,318 9/1/2024
1.2.11 5,300 8/6/2024
1.2.9 5,298 7/26/2024
1.2.8 5,339 7/19/2024
1.2.6 5,312 7/15/2024
1.2.4 5,330 7/4/2024
1.2.0 5,342 5/30/2024
1.1.37 5,327 5/11/2024
1.1.34 5,316 4/22/2024
1.1.30 5,323 3/24/2024
1.1.26 5,337 3/14/2024
1.1.23 5,336 2/26/2024
1.1.22 5,335 2/16/2024
1.1.21 5,387 1/11/2024
1.1.19 5,364 1/1/2024
1.1.17 5,344 12/23/2023
1.1.11 5,348 12/16/2023
1.1.10 5,352 12/6/2023
1.1.7 5,351 11/30/2023
1.1.5 5,340 11/21/2023
1.0.14-prerelease 260 8/6/2023

https://www.cepheis.com/hiperspace/20251020
## Overview

This release introduced the **message**  element for client/server scenarios where you might want to run a  query on a server and transfer only the final results to a client.  This is especially useful for whole graph queries that select every element that is related to the subject ***node*** for a *butterfly* view.

-----

## Message
The [HiLang Message](https://www.cepheis.com/hiperspace/message) page goes into detail about the structure of *messages*.. but it is worth referring to an example for clarity. The `CustomerCube` *message*  takes a reference to a *Customer* and returns all the information need to display a *hipercube* in a [Web Assembly](https://webassembly.org/) browser client, transfered with [Protobuf](https://protobuf.dev/) compression between client and server
```
message API.CustomerCube
(
   Customer        : Acc.Customer #1
)
{
   CustomerTree    : List<Acc.Customer> #2,
   Sector          : List<Acc.Sector> #3,
   Accounts        : List<Acc.Account> #4 ,

   "Using the generated cube element from Transaction and its dimensions"
   Cube            : List<Acc.Transaction_Cube> #5,

   "Using the generated cube drilldown from cube"
   Drilldown       : List<Acc.Transaction_CubeDrillDown> #6
};
```
**NB** `Cube            : List<Acc.Transaction_Cube>` is a *physical* element, generated from the `Transaction` *@Fact* property, and including the *@Dimension*  {*Customer, Account, Sector*} and *@Measure* analysis properties

When the schema is compiled with [HiLang](HiLang), implementations are not provided for
```
namespace API
{
   public partial class CustomerCube : IMessage
   {
       public Task<IMessage> InvokeAsync(CancellationToken token = default)
       {
       }
       public async IAsyncEnumerable<IMessage> InvokeStreamAsync([EnumeratorCancellation]CancellationToken token = default)
       {
           yield return await InvokeAsync(token);
       }
   }
}
```
which must be added to the schema project to provide implementation for the server-side functions

-----

### HiperSpace
`HiperSpace` has two additional methods that transfer messages through the layers of Hiperspaces, until a server `SubSpace` is found that will execute the message, and return the value
```
       public virtual Task<byte[]> InvokeAsync(byte[] key, CancellationToken token = default) => Task.FromResult(key);
       public virtual IAsyncEnumerable<byte[]> InvokeStreamAsync(byte[] key, CancellationToken token = default) => new byte[][] { key }.ToAsyncEnumerable();
```

### SubSpace
`SubSpace` has the above functions (*because they also implement* `HiperSpace`), plus the domain specific functions needed for code like `var msg = await space.InvokeAsync(new CustomerCube {Customer = myCust}); to be executed on a client.

```
       public async Task<TMessage> InvokeAsync<TMessage>(TMessage item, CancellationToken token = default)
           where TMessage : class, IMessage
       public async IAsyncEnumerable<TMessage> InvokeStreamAsync<TMessage>(TMessage item, [EnumeratorCancellation]CancellationToken token = default)
```
There are no equivalent synchronous messages handling functions because the only reason for using messages is to perform query processing on a server, and Blazor client cannot use any blocking operations.

With this release the *obsolete* function `public abstract object? Get(string sid);`  has been removed, and `Get<object?>(string sid)` should be used instead.


-----

#### Domain implementation
The Domain implementation of `SubSpace` (*generated by HiLang*) includes logic to execute the message logic in the first *domain Space* that has the `RemoteLabel` set to true.  Generated HiLang schema will not compile until the `InvokeAsync` and `InvokeStreamAsync` functions have been added by the implementor.


-----

### HiLang

HiLang `segment` (*many*) and `aspect` (*optionally one*) can be applied to any `entity` to extend the definition of the entity with information that is versioned separately.  Consider the example of [TOGAF](https://github.com/channell/Hiperspace/blob/master/examples/TOGAF/TOGAF.hilang) where every entity type can include any  number of ***Gaps*** each of which have separate storage and references to their `owner` with navigation from the `owner` using the ***Gap*** property.

[HiLang](HiLang) Generates {*ServiceGap, DriverGap, ActorGap, FunctionGap, CapabilityGap, ProductGap, GoalGap, ObjectiveGap, MeasureGap, ActivityGap, EventGap, ProcessGap, ControlGap, ValueStreamGap, CourseOfActionGap, EntityGap, LogicalGap, PhysicalGap, SystemGap, ComponentGap, DeployedGap, PlatformGap, HostGap, InstanceGap*} to provide storage for entity specific versions of the ***Gap***, and *View* to bring togther every different implementation for query together.

When *segment*/*aspect* is only used in a single comtext, we can end-up with very long segment implementation names like `CustomerAccountTransaction` when `Customer` has many `Account` *segments* , which has many `Transaction` segments.  To minimise the generated classes, an additional *step* has been added to HiLang to remove the generated prefix when a segment is only used in one context.

This version changes `CustomerAccountTransaction`  to `Transaction`.  If we subsequently need to add the segment to another *entity*, the prefix would be added back to distinguish different owners of `Transaction`.

**NB** Hiperspace does not  store the name of the *element* with every instance (only the #id is stored), so any change will be transparent.


-----

### LatestSpace
`LatestSpace` is a specialisation fo HeapSpace, that discards history to reduce memory usage.  the main use-case is with  Blazor Web-Assembly clients that have no interest in the history of an Element, but need to hold the durable representation for synchronization at the end of a session.

## References
References to other libraries have been updated