OSDC.DotnetLibraries.Drilling.WebAppUtils 1.1.4

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

OSDC.DotnetLibraries.Drilling.WebAppUtils

Shared .NET utilities and small configuration abstractions used by OSDC drilling web applications.

The package targets net8.0 and is intended for Blazor/web-page projects that need common host URL configuration, API client setup, and reusable unit/reference source objects for OSDC.UnitConversion.DrillingRazorMudComponents.

Features

  • Host URL interfaces for drilling-related microservices.
  • APIUtils.SetHttpClient(...) helper for JSON HTTP clients.
  • DataUtils.UnitAndReferenceParameters for shared unit/reference selector state.
  • DataUtils reference-source classes compatible with MudUnitAndReferenceChoiceTag.
  • Support for depth, position, and geodetic datum reference sources.

Installation

dotnet add package OSDC.DotnetLibraries.Drilling.WebAppUtils

The package depends on:

  • OSDC.UnitConversion.DrillingRazorMudComponents

Host URL Interfaces

The package provides small interfaces for projects that need to pass service host URLs through configuration or dependency injection.

Available interfaces:

  • ICartographicProjectionHostURL
  • IClusterHostURL
  • IDrillingFluidHostURL
  • IDrillStringHostURL
  • IFieldHostURL
  • IGeodeticDatumHostURL
  • IGeologicalPropertiesHostURL
  • IGeothermalPropertiesHostURL
  • IRigHostURL
  • ISurveyInstrumentHostURL
  • ITrajectoryHostURL
  • IUnitConversionHostURL
  • IWellBoreArchitectureHostURL
  • IWellBoreHostURL
  • IWellHostURL

Each interface exposes a nullable string property named after the service. For example:

using OSDC.DotnetLibraries.Drilling.WebAppUtils;

public sealed class WebPagesHostConfiguration : IWellHostURL, ITrajectoryHostURL
{
    public string? WellHostURL { get; set; }
    public string? TrajectoryHostURL { get; set; }
}

Example dependency injection registration:

builder.Services.AddSingleton<IWellHostURL>(configuration);
builder.Services.AddSingleton<ITrajectoryHostURL>(configuration);

APIUtils

APIUtils.SetHttpClient creates an HttpClient with:

  • BaseAddress = new Uri(host + microServiceUri)
  • Accept: application/json
  • a handler that accepts the server certificate presented by the service
HttpClient httpClient = APIUtils.SetHttpClient(
    host: "https://localhost:5001",
    microServiceUri: "/api/Trajectory/");

DataUtils

DataUtils contains lightweight classes used by drilling web pages to share unit and reference settings with MudUnitAndReferenceChoiceTag.

UnitAndReferenceParameters

DataUtils.UnitAndReferenceParameters.UnitSystemName
DataUtils.UnitAndReferenceParameters.DepthReferenceName
DataUtils.UnitAndReferenceParameters.PositionReferenceName
DataUtils.UnitAndReferenceParameters.GeodeticReferenceName
DataUtils.UnitAndReferenceParameters.AzimuthReferenceName
DataUtils.UnitAndReferenceParameters.PressureReferenceName
DataUtils.UnitAndReferenceParameters.DateReferenceName

Defaults:

  • UnitSystemName = "Metric"
  • DepthReferenceName = "Rotary table"
  • PositionReferenceName = "Well-head"

The remaining reference names default to null.

Reference Source Classes

The nested DataUtils classes implement the reference-source interfaces from OSDC.UnitConversion.DrillingRazorMudComponents.

Depth references:

DataUtils.GroundMudLineDepthReferenceSource
DataUtils.RotaryTableDepthReferenceSource
DataUtils.SeaWaterLevelDepthReferenceSource

Position references:

DataUtils.WellHeadPositionReferenceSource
DataUtils.CartographicGridPositionReferenceSource
DataUtils.FieldPositionReferenceSource
DataUtils.ClusterPositionReferenceSource

Geodetic datum reference:

DataUtils.CartographicProjectionDatumGeodeticReferenceSource

FieldPositionReferenceSource is the current name for the former lease-line reference concept.

Reference Source Properties

Depth

public class GroundMudLineDepthReferenceSource : IGroundMudLineDepthReferenceSource
{
    public double? GroundMudLineDepthReference { get; set; }
}

public class RotaryTableDepthReferenceSource : IRotaryTableDepthReferenceSource
{
    public double? RotaryTableDepthReference { get; set; }
}

public class SeaWaterLevelDepthReferenceSource : ISeaWaterLevelDepthReferenceSource
{
    public double? SeaWaterLevelDepthReference { get; set; }
}

Position

public class WellHeadPositionReferenceSource : IWellHeadPositionReferenceSource
{
    public double? WellHeadNorthPositionReference { get; set; }
    public double? WellHeadEastPositionReference { get; set; }
}

public class CartographicGridPositionReferenceSource : ICartographicGridPositionReferenceSource
{
    public double? CartographicGridNorthPositionReference { get; set; }
    public double? CartographicGridEastPositionReference { get; set; }
}

public class FieldPositionReferenceSource : IFieldPositionReferenceSource
{
    public double? FieldNorthPositionReference { get; set; }
    public double? FieldEastPositionReference { get; set; }
}

public class ClusterPositionReferenceSource : IClusterPositionReferenceSource
{
    public double? ClusterNorthPositionReference { get; set; }
    public double? ClusterEastPositionReference { get; set; }
}

Geodetic Datum

public class CartographicProjectionDatumGeodeticReferenceSource
    : ICartographicProjectionDatumGeodeticReferenceSource
{
    public double? CartographicProjectionDatumLatitudeReference { get; set; }
    public double? CartographicProjectionDatumLongitudeReference { get; set; }
}

Latitude and longitude references are expected in SI angle units.

Example: Wiring MudUnitAndReferenceChoiceTag

@using OSDC.DotnetLibraries.Drilling.WebAppUtils
@using OSDC.UnitConversion.DrillingRazorMudComponents

<MudUnitAndReferenceChoiceTag UnitSystemName="@DataUtils.UnitAndReferenceParameters.UnitSystemName"
                              DepthReferenceName="@DataUtils.UnitAndReferenceParameters.DepthReferenceName"
                              PositionReferenceName="@DataUtils.UnitAndReferenceParameters.PositionReferenceName"
                              GeodeticReferenceName="@DataUtils.UnitAndReferenceParameters.GeodeticReferenceName"
                              RotaryTableDepthReferenceSource="@rotaryTable"
                              WellHeadPositionReferenceSource="@wellHead"
                              FieldPositionReferenceSource="@field"
                              CartographicProjectionDatumGeodeticReferenceSource="@cartographicProjectionDatum">
    @ChildContent
</MudUnitAndReferenceChoiceTag>

@code {
    private readonly DataUtils.RotaryTableDepthReferenceSource rotaryTable = new();
    private readonly DataUtils.WellHeadPositionReferenceSource wellHead = new();
    private readonly DataUtils.FieldPositionReferenceSource field = new();
    private readonly DataUtils.CartographicProjectionDatumGeodeticReferenceSource cartographicProjectionDatum = new();
}

Project Structure

OSDC.DotnetLibraries.Drilling.WebAppUtils/
├── APIUtils.cs
├── DataUtils.cs
├── I*HostURL.cs
├── OSDC.DotnetLibraries.Drilling.WebAppUtils.csproj
└── Readme.md

Notes

  • Reference source values are expected in SI units.
  • The helper source classes are intentionally small data carriers.
  • FieldPositionReferenceSource replaces the older LeaseLinePositionReferenceSource naming.
  • Use CartographicProjectionDatumGeodeticReferenceSource when enabling the geodetic reference selector in MudUnitAndReferenceChoiceTag.

License

This project is licensed under the terms specified in the LICENSE file.

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 (17)

Showing the top 5 NuGet packages that depend on OSDC.DotnetLibraries.Drilling.WebAppUtils:

Package Downloads
NORCE.Drilling.Field.WebPages

Reusable Razor class library containing the Field, CartographicConverter, and statistics web pages. See the package README for setup, dependencies, and usage.

NORCE.Drilling.WellBore.WebPages

Reusable Razor class library containing the WellBore and statistics web pages. See the package README for setup, dependencies, and usage.

NORCE.Drilling.Well.WebPages

Reusable Razor class library containing the Well and statistics web pages. See the package README for setup, dependencies, and usage.

NORCE.Drilling.Cluster.WebPages

Reusable Razor class library containing the Cluster and statistics web pages. See the package README for setup, dependencies, and usage.

NORCE.Drilling.Rig.WebPages

Reusable Razor class library containing the Rig pages, editor components, and helper utilities. See the package README for setup, dependencies, and usage.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.4 0 6/29/2026
1.1.3 186 6/22/2026
1.1.2 895 5/30/2026
1.1.1 235 5/30/2026
1.1.0 1,167 4/16/2026
1.0.1 107 4/16/2026
1.0.0 105 4/16/2026