-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feature/simplification-rule
- Loading branch information
Showing
211 changed files
with
3,520 additions
and
2,460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "dev", master ] | ||
pull_request: | ||
branches: [ "dev", master ] | ||
schedule: | ||
- cron: '44 18 * * 3' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'csharp' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Setup .NET Core SDK | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: "7.0.x" | ||
|
||
- run: | | ||
dotnet restore xFunc.sln | ||
dotnet build -c Release xFunc.sln | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" /> | ||
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.5.119" /> | ||
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.435" /> | ||
<PackageVersion Include="System.Collections.Immutable" Version="7.0.0" /> | ||
<PackageVersion Include="CommandLineParser" Version="2.9.1" /> | ||
<PackageVersion Include="BenchmarkDotNet" Version="0.13.2" /> | ||
|
||
<PackageVersion Include="coverlet.msbuild" Version="3.2.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.0" /> | ||
<PackageVersion Include="Moq" Version="4.18.3" /> | ||
<PackageVersion Include="ReportGenerator" Version="5.1.12" /> | ||
<PackageVersion Include="xunit" Version="2.4.2" /> | ||
<PackageVersion Include="xunit.analyzers" Version="1.1.0" /> | ||
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright (c) Dmytro Kyshchenko. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using xFunc.Maths.Expressions.Units.AngleUnits; | ||
using xFunc.Maths.Expressions.Units.AreaUnits; | ||
using xFunc.Maths.Expressions.Units.Converters; | ||
using xFunc.Maths.Expressions.Units.LengthUnits; | ||
using xFunc.Maths.Expressions.Units.MassUnits; | ||
using xFunc.Maths.Expressions.Units.PowerUnits; | ||
using xFunc.Maths.Expressions.Units.TemperatureUnits; | ||
using xFunc.Maths.Expressions.Units.TimeUnits; | ||
using xFunc.Maths.Expressions.Units.VolumeUnits; | ||
|
||
namespace xFunc.Benchmark.Benchmarks; | ||
|
||
public class ConvertBenchmark | ||
{ | ||
private static IConverter converter = new Converter(); | ||
|
||
[Benchmark] | ||
public object AngleConvert() | ||
=> converter.Convert(AngleValue.Gradian(90), "deg"); | ||
|
||
[Benchmark] | ||
public object PowerConvert() | ||
=> converter.Convert(PowerValue.Kilowatt(1), "hp"); | ||
|
||
[Benchmark] | ||
public object TemperatureConvert() | ||
=> converter.Convert(TemperatureValue.Kelvin(1), "°F"); | ||
|
||
[Benchmark] | ||
public object MassConvert() | ||
=> converter.Convert(MassValue.Kilogram(1), "lb"); | ||
|
||
[Benchmark] | ||
public object AreaConvert() | ||
=> converter.Convert(AreaValue.Kilometer(1), "in^2"); | ||
|
||
[Benchmark] | ||
public object LengthConvert() | ||
=> converter.Convert(LengthValue.Kilometer(1), "in"); | ||
|
||
[Benchmark] | ||
public object TimeConvert() | ||
=> converter.Convert(TimeValue.Hour(1), "min"); | ||
|
||
[Benchmark] | ||
public object VolumeConvert() | ||
=> converter.Convert(VolumeValue.Gallon(1), "in^3"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.