OSDC.DotnetLibraries.Drilling.WebAppUtils
1.1.5
dotnet add package OSDC.DotnetLibraries.Drilling.WebAppUtils --version 1.1.5
NuGet\Install-Package OSDC.DotnetLibraries.Drilling.WebAppUtils -Version 1.1.5
<PackageReference Include="OSDC.DotnetLibraries.Drilling.WebAppUtils" Version="1.1.5" />
<PackageVersion Include="OSDC.DotnetLibraries.Drilling.WebAppUtils" Version="1.1.5" />
<PackageReference Include="OSDC.DotnetLibraries.Drilling.WebAppUtils" />
paket add OSDC.DotnetLibraries.Drilling.WebAppUtils --version 1.1.5
#r "nuget: OSDC.DotnetLibraries.Drilling.WebAppUtils, 1.1.5"
#:package OSDC.DotnetLibraries.Drilling.WebAppUtils@1.1.5
#addin nuget:?package=OSDC.DotnetLibraries.Drilling.WebAppUtils&version=1.1.5
#tool nuget:?package=OSDC.DotnetLibraries.Drilling.WebAppUtils&version=1.1.5
OSDC.DotnetLibraries.Drilling.WebAppUtils
The package depends on OSDC.UnitConversion.DrillingRazorMudComponents 3.4.2, aligned with MudBlazor 9.9.0.
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.UnitAndReferenceParametersfor shared unit/reference selector state.DataUtilsreference-source classes compatible withMudUnitAndReferenceChoiceTag.- 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:
ICartographicProjectionHostURLIClusterHostURLIDrillingFluidHostURLIDrillStringHostURLIFieldHostURLIGeodeticDatumHostURLIGeologicalPropertiesHostURLIGeothermalPropertiesHostURLIRigHostURLISurveyInstrumentHostURLITrajectoryHostURLIUnitConversionHostURLIWellBoreArchitectureHostURLIWellBoreHostURLIWellHostURL
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.
FieldPositionReferenceSourcereplaces the olderLeaseLinePositionReferenceSourcenaming.- Use
CartographicProjectionDatumGeodeticReferenceSourcewhen enabling the geodetic reference selector inMudUnitAndReferenceChoiceTag.
License
This project is licensed under the terms specified in the LICENSE file.
| 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
NuGet packages (29)
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.Cluster.WebPages
Reusable Razor class library containing the Cluster 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.CartographicProjection.WebPages
Reusable Razor class library containing the CartographicProjection, CartographicConverter, and statistics web pages. See the package README for setup, dependencies, and usage. |
GitHub repositories
This package is not used by any popular GitHub repositories.