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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ root = true
[*]
indent_style = space
trim_trailing_whitespace = true
charset = utf-8
# (Please don't specify an indent_size here; that has too many unintended consequences.)

# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
insert_final_newline = true
charset = utf-8-bom

[*.{cmd,bat}]
indent_size = 2
Expand All @@ -25,7 +25,6 @@ insert_final_newline = false
indent_size = 2
end_of_line = crlf
insert_final_newline = true
charset = utf-8-bom

# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
Expand Down
2 changes: 1 addition & 1 deletion Build/build-functions.psm1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
$root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
$artifactsDir = Join-Path $root "Artifacts"
$localNuGetFeedDir = Join-Path $artifactsDir "Nugets"
$nugetOutDir = Join-Path $artifactsDir "NuGet"
Expand Down
2 changes: 1 addition & 1 deletion Build/build.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<#
<#
.SYNOPSIS
Build, run tests and pack nugets for all Units.NET projects.
.DESCRIPTION
Expand Down
2 changes: 1 addition & 1 deletion Build/init.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Don't allow using undeclared variables
# Don't allow using undeclared variables
Param(
[switch] $SkipCoverageTools
)
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/CodeGen.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Exceptions/UnitsNetCodeGenException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Generators/QuantityJsonFilesParser.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Generators/QuantityRelationsParser.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System.Diagnostics.CodeAnalysis;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using CodeGen.JsonTypes;

namespace CodeGen.Generators.UnitsNetGen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using CodeGen.JsonTypes;

namespace CodeGen.Generators.UnitsNetGen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using CodeGen.JsonTypes;

namespace CodeGen.Generators.UnitsNetGen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using CodeGen.JsonTypes;

namespace CodeGen.Generators.UnitsNetGen
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using CodeGen.JsonTypes;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Generators/UnitsNetGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Fractions;
using Fractions;

namespace CodeGen.Helpers.ExpressionAnalyzer;

Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Helpers/ExpressionAnalyzer/ExpressionEvaluator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;

namespace CodeGen.Helpers.ExpressionAnalyzer.Expressions;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Numerics;
using CodeGen.Helpers.ExpressionAnalyzer.Functions.Math;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using CodeGen.Helpers.ExpressionAnalyzer.Expressions;

namespace CodeGen.Helpers.ExpressionAnalyzer.Functions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System.Numerics;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using CodeGen.Helpers.ExpressionAnalyzer.Expressions;
using Fractions;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Globalization;
using CodeGen.Helpers.ExpressionAnalyzer.Expressions;
using Fractions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using CodeGen.Helpers.ExpressionAnalyzer.Expressions;
using Fractions;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Fractions;
using Fractions;

namespace CodeGen.Helpers.ExpressionAnalyzer.Functions.Math.Trigonometry;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Fractions;
using Fractions;

namespace CodeGen.Helpers.ExpressionAnalyzer.Functions.Math.Trigonometry;

Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Helpers/ExpressionEvaluationHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Helpers/FileInfoExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Helpers/HashGuid.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Helpers/PrefixBuilder/BaseUnitPrefix.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using CodeGen.JsonTypes;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Helpers/PrefixBuilder/BaseUnitPrefixes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System.Collections.Generic;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Helpers/PrefixBuilder/PrefixBuilderExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Helpers/PrefixBuilder/UnitPrefixBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/JsonTypes/BaseDimensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System.Text;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/JsonTypes/Quantity.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/JsonTypes/QuantityRelation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/JsonTypes/Unit.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/PrefixInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using CodeGen.JsonTypes;
Expand Down
2 changes: 1 addition & 1 deletion CodeGen/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion Common/UnitDefinitions/ElectricCurrentGradient.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"Name": "ElectricCurrentGradient",
"BaseUnit": "AmperePerSecond",
"XmlDocSummary": "In electromagnetism, the current gradient describes how the current changes in time.",
Expand Down
2 changes: 1 addition & 1 deletion Common/UnitDefinitions/FluidResistance.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"Name": "FluidResistance",
"BaseUnit": "PascalSecondPerCubicMeter",
"XmlDocSummary": "Fluid Resistance is a force acting opposite to the relative motion of any object moving with respect to a surrounding fluid. Fluid Resistance is sometimes referred to as drag or fluid friction.",
Expand Down
2 changes: 1 addition & 1 deletion Common/UnitDefinitions/PorousMediumPermeability.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"Name": "PorousMediumPermeability",
"BaseUnit": "SquareMeter",
"XmlDoc": "In fluid mechanics, permeability is the measure of the ability of a porous material to allow fluids to pass through it.",
Expand Down
2 changes: 1 addition & 1 deletion Common/UnitDefinitions/RadiationEquivalentDose.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"Name": "RadiationEquivalentDose",
"BaseUnit": "Sievert",
"XmlDocSummary": "Equivalent dose is a dose quantity representing the stochastic health effects of low levels of ionizing radiation on the human body which represents the probability of radiation-induced cancer and genetic damage.",
Expand Down
2 changes: 1 addition & 1 deletion Common/UnitDefinitions/RadiationExposure.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"Name": "RadiationExposure",
"BaseUnit": "CoulombPerKilogram",
"XmlDocSummary": "Radiation exposure is a measure of the ionization of air due to ionizing radiation from photons.",
Expand Down
2 changes: 1 addition & 1 deletion Common/UnitDefinitions/Radioactivity.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"Name": "Radioactivity",
"BaseUnit": "Becquerel",
"XmlDocSummary": "Amount of ionizing radiation released when an element spontaneously emits energy as a result of the radioactive decay of an unstable atom per unit time.",
Expand Down
2 changes: 1 addition & 1 deletion NullableAttributes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Workaround for nullable annotations when multitargeting against netstandard2.0 or .NET versions lower than .NET Core 3.0, which do not support it out of the box.
// Workaround for nullable annotations when multitargeting against netstandard2.0 or .NET versions lower than .NET Core 3.0, which do not support it out of the box.
// https://www.meziantou.net/how-to-use-nullable-reference-types-in-dotnet-standard-2-0-and-dotnet-.htm

// https://github.com/dotnet/runtime/blob/527f9ae88a0ee216b44d556f9bdc84037fe0ebda/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
Expand Down
2 changes: 1 addition & 1 deletion PerfTests/PerfTest_Startup/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using UnitsNet;
using UnitsNet;
using UnitsNet.Units;

Console.WriteLine(Power.From(5, PowerUnit.Watt));
2 changes: 1 addition & 1 deletion PerfTests/PerfTest_Startup_Aot/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using UnitsNet;
using UnitsNet;
using UnitsNet.Units;

Console.WriteLine(Power.From(5, PowerUnit.Watt));
2 changes: 1 addition & 1 deletion PerfTests/PerfTest_Startup_v4_144_0/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// See https://aka.ms/new-console-template for more information
// See https://aka.ms/new-console-template for more information

using UnitsNet;
using UnitsNet.Units;
Expand Down
2 changes: 1 addition & 1 deletion PerfTests/PerfTest_Startup_v4_72_0/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// See https://aka.ms/new-console-template for more information
// See https://aka.ms/new-console-template for more information

using UnitsNet;
using UnitsNet.Units;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![CI Build](https://github.com/angularsen/UnitsNet/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/angularsen/UnitsNet/actions/workflows/ci.yml)
[![CI Build](https://github.com/angularsen/UnitsNet/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/angularsen/UnitsNet/actions/workflows/ci.yml)
[![Pull Requests](https://github.com/angularsen/UnitsNet/actions/workflows/pr.yml/badge.svg)](https://github.com/angularsen/UnitsNet/actions/workflows/pr.yml)
[![.NET Framework 4.8](https://github.com/angularsen/UnitsNet/actions/workflows/net48-compatibility.yml/badge.svg)](https://github.com/angularsen/UnitsNet/actions/workflows/net48-compatibility.yml)
[![codecov](https://codecov.io/gh/angularsen/UnitsNet/branch/master/graph/badge.svg)](https://codecov.io/gh/angularsen/UnitsNet)
Expand Down
2 changes: 1 addition & 1 deletion Samples/MvvmSample.Wpf/MvvmSample.Wpf/App.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<unity:PrismApplication x:Class="WpfMVVMSample.App"
<unity:PrismApplication x:Class="WpfMVVMSample.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:unity="http://prismlibrary.com/">
Expand Down
2 changes: 1 addition & 1 deletion Samples/MvvmSample.Wpf/MvvmSample.Wpf/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Windows;
using System.Windows;
using Prism.Ioc;
using WpfMVVMSample.Settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Markup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion Samples/MvvmSample.Wpf/MvvmSample.Wpf/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Window x:Class="WpfMVVMSample.MainWindow"
<Window x:Class="WpfMVVMSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Expand Down
2 changes: 1 addition & 1 deletion Samples/MvvmSample.Wpf/MvvmSample.Wpf/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Windows;
using System.Windows;

namespace WpfMVVMSample
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Prism.Mvvm;
using Prism.Mvvm;
using UnitsNet;
using WpfMVVMSample.Settings;

Expand Down
Loading
Loading