Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions UnitsNet/GeneratedCode/UnitClasses/Angle.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,21 @@ public static Angle FromRadians(double radians)
}
}

/// <summary>
/// Get nullable Angle from nullable Microdegrees.
/// </summary>
public static Angle? FromMicrodegrees(double? microdegrees)
{
if (microdegrees.HasValue)
{
return FromMicrodegrees(microdegrees.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable Angle from nullable Microradians.
/// </summary>
Expand All @@ -377,6 +392,21 @@ public static Angle FromRadians(double radians)
}
}

/// <summary>
/// Get nullable Angle from nullable Millidegrees.
/// </summary>
public static Angle? FromMillidegrees(double? millidegrees)
{
if (millidegrees.HasValue)
{
return FromMillidegrees(millidegrees.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable Angle from nullable Milliradians.
/// </summary>
Expand All @@ -392,6 +422,21 @@ public static Angle FromRadians(double radians)
}
}

/// <summary>
/// Get nullable Angle from nullable Nanodegrees.
/// </summary>
public static Angle? FromNanodegrees(double? nanodegrees)
{
if (nanodegrees.HasValue)
{
return FromNanodegrees(nanodegrees.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable Angle from nullable Nanoradians.
/// </summary>
Expand Down Expand Up @@ -491,10 +536,16 @@ public static Angle From(double value, AngleUnit fromUnit)
return FromDegrees(value.Value);
case AngleUnit.Gradian:
return FromGradians(value.Value);
case AngleUnit.Microdegree:
return FromMicrodegrees(value.Value);
case AngleUnit.Microradian:
return FromMicroradians(value.Value);
case AngleUnit.Millidegree:
return FromMillidegrees(value.Value);
case AngleUnit.Milliradian:
return FromMilliradians(value.Value);
case AngleUnit.Nanodegree:
return FromNanodegrees(value.Value);
case AngleUnit.Nanoradian:
return FromNanoradians(value.Value);
case AngleUnit.Radian:
Expand Down
102 changes: 102 additions & 0 deletions UnitsNet/GeneratedCode/UnitClasses/Flow.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,21 @@ public static Flow FromUsGallonsPerMinute(double usgallonsperminute)
}


/// <summary>
/// Get nullable Flow from nullable CentilitersPerMinute.
/// </summary>
public static Flow? FromCentilitersPerMinute(double? centilitersperminute)
{
if (centilitersperminute.HasValue)
{
return FromCentilitersPerMinute(centilitersperminute.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable Flow from nullable CubicFeetPerSecond.
/// </summary>
Expand Down Expand Up @@ -301,6 +316,36 @@ public static Flow FromUsGallonsPerMinute(double usgallonsperminute)
}
}

/// <summary>
/// Get nullable Flow from nullable DecilitersPerMinute.
/// </summary>
public static Flow? FromDecilitersPerMinute(double? decilitersperminute)
{
if (decilitersperminute.HasValue)
{
return FromDecilitersPerMinute(decilitersperminute.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable Flow from nullable KilolitersPerMinute.
/// </summary>
public static Flow? FromKilolitersPerMinute(double? kilolitersperminute)
{
if (kilolitersperminute.HasValue)
{
return FromKilolitersPerMinute(kilolitersperminute.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable Flow from nullable LitersPerMinute.
/// </summary>
Expand All @@ -316,6 +361,36 @@ public static Flow FromUsGallonsPerMinute(double usgallonsperminute)
}
}

/// <summary>
/// Get nullable Flow from nullable MicrolitersPerMinute.
/// </summary>
public static Flow? FromMicrolitersPerMinute(double? microlitersperminute)
{
if (microlitersperminute.HasValue)
{
return FromMicrolitersPerMinute(microlitersperminute.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable Flow from nullable MillilitersPerMinute.
/// </summary>
public static Flow? FromMillilitersPerMinute(double? millilitersperminute)
{
if (millilitersperminute.HasValue)
{
return FromMillilitersPerMinute(millilitersperminute.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable Flow from nullable MillionUsGallonsPerDay.
/// </summary>
Expand All @@ -331,6 +406,21 @@ public static Flow FromUsGallonsPerMinute(double usgallonsperminute)
}
}

/// <summary>
/// Get nullable Flow from nullable NanolitersPerMinute.
/// </summary>
public static Flow? FromNanolitersPerMinute(double? nanolitersperminute)
{
if (nanolitersperminute.HasValue)
{
return FromNanolitersPerMinute(nanolitersperminute.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable Flow from nullable UsGallonsPerMinute.
/// </summary>
Expand Down Expand Up @@ -401,16 +491,28 @@ public static Flow From(double value, FlowUnit fromUnit)
}
switch (fromUnit)
{
case FlowUnit.CentilitersPerMinute:
return FromCentilitersPerMinute(value.Value);
case FlowUnit.CubicFootPerSecond:
return FromCubicFeetPerSecond(value.Value);
case FlowUnit.CubicMeterPerHour:
return FromCubicMetersPerHour(value.Value);
case FlowUnit.CubicMeterPerSecond:
return FromCubicMetersPerSecond(value.Value);
case FlowUnit.DecilitersPerMinute:
return FromDecilitersPerMinute(value.Value);
case FlowUnit.KilolitersPerMinute:
return FromKilolitersPerMinute(value.Value);
case FlowUnit.LitersPerMinute:
return FromLitersPerMinute(value.Value);
case FlowUnit.MicrolitersPerMinute:
return FromMicrolitersPerMinute(value.Value);
case FlowUnit.MillilitersPerMinute:
return FromMillilitersPerMinute(value.Value);
case FlowUnit.MillionUsGallonsPerDay:
return FromMillionUsGallonsPerDay(value.Value);
case FlowUnit.NanolitersPerMinute:
return FromNanolitersPerMinute(value.Value);
case FlowUnit.UsGallonsPerMinute:
return FromUsGallonsPerMinute(value.Value);

Expand Down
102 changes: 102 additions & 0 deletions UnitsNet/GeneratedCode/UnitClasses/ForceChangeRate.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,96 @@ public static ForceChangeRate FromNewtonsPerSecond(double newtonspersecond)
}


/// <summary>
/// Get nullable ForceChangeRate from nullable CentinewtonsPerSecond.
/// </summary>
public static ForceChangeRate? FromCentinewtonsPerSecond(double? centinewtonspersecond)
{
if (centinewtonspersecond.HasValue)
{
return FromCentinewtonsPerSecond(centinewtonspersecond.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable ForceChangeRate from nullable DecinewtonsPerSecond.
/// </summary>
public static ForceChangeRate? FromDecinewtonsPerSecond(double? decinewtonspersecond)
{
if (decinewtonspersecond.HasValue)
{
return FromDecinewtonsPerSecond(decinewtonspersecond.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable ForceChangeRate from nullable KilonewtonsPerSecond.
/// </summary>
public static ForceChangeRate? FromKilonewtonsPerSecond(double? kilonewtonspersecond)
{
if (kilonewtonspersecond.HasValue)
{
return FromKilonewtonsPerSecond(kilonewtonspersecond.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable ForceChangeRate from nullable MicronewtonsPerSecond.
/// </summary>
public static ForceChangeRate? FromMicronewtonsPerSecond(double? micronewtonspersecond)
{
if (micronewtonspersecond.HasValue)
{
return FromMicronewtonsPerSecond(micronewtonspersecond.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable ForceChangeRate from nullable MillinewtonsPerSecond.
/// </summary>
public static ForceChangeRate? FromMillinewtonsPerSecond(double? millinewtonspersecond)
{
if (millinewtonspersecond.HasValue)
{
return FromMillinewtonsPerSecond(millinewtonspersecond.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable ForceChangeRate from nullable NanonewtonsPerSecond.
/// </summary>
public static ForceChangeRate? FromNanonewtonsPerSecond(double? nanonewtonspersecond)
{
if (nanonewtonspersecond.HasValue)
{
return FromNanonewtonsPerSecond(nanonewtonspersecond.Value);
}
else
{
return null;
}
}

/// <summary>
/// Get nullable ForceChangeRate from nullable NewtonsPerSecond.
/// </summary>
Expand Down Expand Up @@ -236,6 +326,18 @@ public static ForceChangeRate From(double value, ForceChangeRateUnit fromUnit)
}
switch (fromUnit)
{
case ForceChangeRateUnit.CentinewtonPerSecond:
return FromCentinewtonsPerSecond(value.Value);
case ForceChangeRateUnit.DecinewtonPerSecond:
return FromDecinewtonsPerSecond(value.Value);
case ForceChangeRateUnit.KilonewtonPerSecond:
return FromKilonewtonsPerSecond(value.Value);
case ForceChangeRateUnit.MicronewtonPerSecond:
return FromMicronewtonsPerSecond(value.Value);
case ForceChangeRateUnit.MillinewtonPerSecond:
return FromMillinewtonsPerSecond(value.Value);
case ForceChangeRateUnit.NanonewtonPerSecond:
return FromNanonewtonsPerSecond(value.Value);
case ForceChangeRateUnit.NewtonPerSecond:
return FromNewtonsPerSecond(value.Value);

Expand Down
Loading