OSDC.Drilling.EarthGravity.WebPages 1.0.1

dotnet add package OSDC.Drilling.EarthGravity.WebPages --version 1.0.1
                    
NuGet\Install-Package OSDC.Drilling.EarthGravity.WebPages -Version 1.0.1
                    
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="OSDC.Drilling.EarthGravity.WebPages" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OSDC.Drilling.EarthGravity.WebPages" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="OSDC.Drilling.EarthGravity.WebPages" />
                    
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 OSDC.Drilling.EarthGravity.WebPages --version 1.0.1
                    
#r "nuget: OSDC.Drilling.EarthGravity.WebPages, 1.0.1"
                    
#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 OSDC.Drilling.EarthGravity.WebPages@1.0.1
                    
#: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=OSDC.Drilling.EarthGravity.WebPages&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=OSDC.Drilling.EarthGravity.WebPages&version=1.0.1
                    
Install as a Cake Tool

OSDC.Drilling.EarthGravity.WebPages

Author: Eric Cayeux
Company: NORCE Research

Reusable server-side Blazor pages for the OSDC Earth Gravity service. The package consumes the generated ModelSharedOut NSwag client and uses OSDC.UnitConversion.DrillingRazorMudComponents so users can work in a selected OSDC unit system while the Earth Gravity API remains strictly SI.

Included pages

  • /Home: service purpose and SI/WGS84 conventions.
  • /EarthGravityCalculation: unit-aware single-position gravity evaluation.
  • /EarthGravityModel: EGM96 provenance and coefficient hash.
  • /StatisticsEarthGravity: per-replica operational counters.

EarthGravityCalculation uses:

  • MudUnitAndReferenceChoiceTag for the selected OSDC unit system.
  • MudInputAngleWithUnitAdornment for sexagesimal latitude/longitude entry.
  • MudInputWithUnitAdornment with PlaneAngleGeodesic, DepthDrilling, and AccelerationDrilling.

The generated client always sends radians, metres, and metres per second squared. The WGS84 depth reference is fixed by the Earth Gravity contract and is not user-selectable; only display units change.

Package dependencies

  • MudBlazor
  • OSDC.DotnetLibraries.Drilling.WebAppUtils
  • OSDC.UnitConversion.DrillingRazorMudComponents
  • Generated ModelSharedOut/EarthGravityMergedModel.cs

The generated client and PseudoConstructors.cs are linked into this Razor class library at build time.

Host configuration

The host must implement IEarthGravityWebPagesConfiguration:

public sealed class WebPagesHostConfiguration : IEarthGravityWebPagesConfiguration
{
    public string EarthGravityHostURL { get; set; } = string.Empty;
    public string? UnitConversionHostURL { get; set; } = string.Empty;
}

Both values are host roots, normally with trailing slashes. APIUtils appends EarthGravity/api/ and UnitConversion/api/.

Register the pages and API utilities:

builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddMudServices();
builder.Services.AddSingleton<IEarthGravityWebPagesConfiguration>(configuration);
builder.Services.AddSingleton<IEarthGravityAPIUtils, APIUtils>();

Add this assembly to the Blazor router:

<Router AppAssembly="@typeof(App).Assembly"
        AdditionalAssemblies="new[] { typeof(OSDC.Drilling.EarthGravity.WebPages.EarthGravityCalculation).Assembly }">
    ...
</Router>

The host layout must include MudBlazor providers, CSS, and JavaScript, and must map the Blazor hub. See the repository WebApp project for a complete host.

Build and package

From the repository root:

dotnet build WebPages/WebPages.csproj -c Release
dotnet pack WebPages/WebPages.csproj -c Release -p:PackageVersion=1.0.0

The project currently generates a package during Release builds. The GitHub workflow publishes OSDC.Drilling.EarthGravity.WebPages for webpages-v* tags or a manually supplied version.

Regenerate ModelSharedOut before building the package whenever the service API changes.

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.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 94 8/24/2026
1.0.0 80 8/21/2026