Skip to content

Adding deformation and electric ratio units #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
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
19 changes: 19 additions & 0 deletions Common/UnitDefinitions/Deformation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"Name": "Deformation",
"BaseUnit": "Microdeformation",
"XmlDoc": "Dimensionless quantity used to measure deformations in continuum mechanics.",
"Units": [
{
"SingularName": "Microdeformation",
"PluralName": "Microdeformations",
"FromUnitToBaseFunc": "x",
"FromBaseToUnitFunc": "x",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "µdef" ]
}
]
}
]
}
24 changes: 24 additions & 0 deletions Common/UnitDefinitions/ElectricRatio.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"Name": "ElectricRatio",
"BaseUnit": "VoltPerVolt",
"XmlDoc": "Used to measure an electrical signal which is proportional to the applied excitation voltage (also called ratio-metric system).",
"Units": [
{
"SingularName": "VoltPerVolt",
"PluralName": "VoltsPerVolt",
"FromUnitToBaseFunc": "x",
"FromBaseToUnitFunc": "x",
"Prefixes": [ "Micro", "Milli" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "V/V" ]
},
{
"Culture": "ru-RU",
"Abbreviations": [ "В/В" ]
}
]
}
]
}
32 changes: 32 additions & 0 deletions UnitsNet.Tests/CustomCode/DeformationTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by \generate-code.bat.
//
// Changes to this file will be lost when the code is regenerated.
// The build server regenerates the code before each build and a pre-build
// step will regenerate the code on each local build.
//
// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
//
// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
//
// </auto-generated>
//------------------------------------------------------------------------------

// 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;

namespace UnitsNet.Tests.CustomCode
{
public class DeformationTests : DeformationTestsBase
{
#region Overrides of DeformationTestsBase

protected override double MicrodeformationsInOneMicrodeformation => 1;

#endregion
}
}
35 changes: 35 additions & 0 deletions UnitsNet.Tests/CustomCode/ElectricRatioTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by \generate-code.bat.
//
// Changes to this file will be lost when the code is regenerated.
// The build server regenerates the code before each build and a pre-build
// step will regenerate the code on each local build.
//
// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
//
// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
//
// </auto-generated>
//------------------------------------------------------------------------------

// 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;

namespace UnitsNet.Tests.CustomCode
{
public class ElectricRatioTests : ElectricRatioTestsBase
{

#region Overrides of ElectricRatioTestsBase

protected override double MicrovoltsPerVoltInOneVoltPerVolt => 1e6;
protected override double MillivoltsPerVoltInOneVoltPerVolt => 1e3;
protected override double VoltsPerVoltInOneVoltPerVolt => 1;

#endregion
}
}
243 changes: 243 additions & 0 deletions UnitsNet.Tests/GeneratedCode/DeformationTestsBase.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading